feat:完善信息
This commit is contained in:
15
app/api/enterprise/model/sys_menu.go
Normal file
15
app/api/enterprise/model/sys_menu.go
Normal file
@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
|
||||
type SysMenu struct {
|
||||
*model.SysMenu
|
||||
}
|
||||
|
||||
func (m *SysMenu) Menus() {
|
||||
|
||||
}
|
||||
|
||||
func NewSysMenu() *SysMenu {
|
||||
return &SysMenu{model.NewSysMenu()}
|
||||
}
|
@ -15,16 +15,17 @@ type UserManage struct {
|
||||
type (
|
||||
// UserManageForExpert 专家信息
|
||||
UserManageForExpert struct {
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Mobile string `json:"mobile"`
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Mobile string `json:"mobile"`
|
||||
IdentityInfo string `json:"-"`
|
||||
}
|
||||
)
|
||||
|
||||
// Expert 专家数据
|
||||
func (m *UserManage) Expert(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*UserManageForExpert, error) {
|
||||
query := orm.GetDB().Table(m.TableName()+" AS m").
|
||||
Select(strings.Join([]string{"m.id", "m.name", "u.mobile"}, ",")).
|
||||
Select(strings.Join([]string{"m.id", "m.name", "u.mobile", "m.identity_info"}, ",")).
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS u ON m.uid = u.uuid", model.NewUserInstance().TableName())).
|
||||
Where("m.is_deleted = ?", model.DeleteStatusForNot).
|
||||
Where("m.identity = ?", config.TenantUserIdentityForExpert)
|
||||
|
Reference in New Issue
Block a user