feat:完善信息
This commit is contained in:
@ -3,8 +3,10 @@ package identity
|
||||
import (
|
||||
"SciencesServer/app/api/enterprise/model"
|
||||
"SciencesServer/app/api/manage/controller"
|
||||
"SciencesServer/app/basic/config"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Instance struct {
|
||||
@ -18,7 +20,8 @@ type (
|
||||
// InstanceForExpert 专家信息
|
||||
InstanceForExpert struct {
|
||||
*model.UserManageForExpert
|
||||
ID string `json:"id"`
|
||||
ID string `json:"id"`
|
||||
Industry string `json:"industry"`
|
||||
}
|
||||
)
|
||||
|
||||
@ -46,8 +49,15 @@ func (c *Instance) Expert(name, mobile string, page, pageSize int) (*controller.
|
||||
|
||||
for _, v := range out {
|
||||
mUserManage.ID = v.ID
|
||||
mUserManage.IdentityInfo = v.IdentityInfo
|
||||
obj := mUserManage.GetIdentityInfoAttribute().(*model2.UserIdentityForExpert)
|
||||
industry := make([]string, 0)
|
||||
|
||||
for _, v := range strings.Split(obj.Industry, ";") {
|
||||
industry = append(industry, config.GetIndustryInfo(v, "-"))
|
||||
}
|
||||
list = append(list, &InstanceForExpert{
|
||||
UserManageForExpert: v, ID: mUserManage.GetEncodeID(),
|
||||
UserManageForExpert: v, ID: mUserManage.GetEncodeID(), Industry: strings.Join(industry, ";"),
|
||||
})
|
||||
}
|
||||
return &controller.ReturnPages{Data: list, Count: count}, nil
|
||||
|
Reference in New Issue
Block a user