...
|
...
|
@@ -19,7 +19,6 @@ import ( |
|
|
"strings"
|
|
|
)
|
|
|
|
|
|
//TODO 用户信息返回合伙人编号
|
|
|
func UserInfo(header *protocol.RequestHeader, request *protocol.UserInfoRequest) (rsp *protocol.UserInfoResponse, err error) {
|
|
|
var (
|
|
|
partnerInfo *domain.PartnerInfo
|
...
|
...
|
@@ -206,6 +205,7 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
}()
|
|
|
rsp = &protocol.UserInfoResponse{}
|
|
|
rspMap := make(map[string]interface{})
|
|
|
|
|
|
funcPartnerInfo := func() {
|
|
|
if partnerInfo, err = PartnerInfoService.FindOne(map[string]interface{}{"id": header.UserId}); err != nil {
|
|
|
err = protocol.NewErrWithMessage(502, err) //账号不存在
|
...
|
...
|
@@ -247,8 +247,6 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
},
|
|
|
}
|
|
|
|
|
|
//TODO 获取合伙人分类
|
|
|
|
|
|
//TODO 获取编号
|
|
|
for _, partnerCategoryInfo := range partnerInfo.PartnerCategoryInfos {
|
|
|
if partnerCategoryInfo.Id == 1 {
|
...
|
...
|
@@ -270,6 +268,7 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
rspMap["user"] = u
|
|
|
rsp = rspMap
|
|
|
}
|
|
|
|
|
|
funcManagerInfo := func() {
|
|
|
if user, err = UsersRepository.FindOne(map[string]interface{}{"id": header.UserId}); err != nil {
|
|
|
err = protocol.NewErrWithMessage(502, err) //账号不存在
|
...
|
...
|
@@ -291,6 +290,7 @@ func UserInfoV2(header *protocol.RequestHeader, request *protocol.UserInfoReques |
|
|
}
|
|
|
rsp = rspMap
|
|
|
}
|
|
|
|
|
|
switch header.AdminType {
|
|
|
case int(protocolx.AdminTypePartner):
|
|
|
funcPartnerInfo()
|
...
|
...
|
|