|
|
@@ -44,22 +44,17 @@ func (l *AcquirerMktQrUpdateLogic) AcquirerMktQrUpdate(r *http.Request) (*types.
|
|
|
logx.Error(err.Error())
|
|
|
return &types.Response{500, err.Error(), nil}, nil
|
|
|
}
|
|
|
- userInfo, err := model.GetI2bilUserInfo(userId, l.svcCtx.DB)
|
|
|
+ userInfo, err := model.GetAcquirePermInfo(userId, l.svcCtx.Transformer, l.svcCtx.DB)
|
|
|
if err != nil {
|
|
|
logx.Error(err.Error())
|
|
|
return &types.Response{500, err.Error(), nil}, nil
|
|
|
}
|
|
|
+ if userInfo == nil || userInfo.UserId == "" {
|
|
|
+ return &types.Response{500, "请先申请成为兼职", nil}, nil
|
|
|
+ }
|
|
|
//var ty = "part"
|
|
|
//mk
|
|
|
- if userInfo.ErpId != "" {
|
|
|
- erpUser, err := model.GetErpUser("", userInfo.ErpId, l.svcCtx.Transformer)
|
|
|
- if err != nil {
|
|
|
- logx.Error(err.Error())
|
|
|
- return &types.Response{500, err.Error(), nil}, nil
|
|
|
- }
|
|
|
- if erpUser == nil || erpUser.UserId == "" {
|
|
|
- return &types.Response{500, "未找到mk用户", nil}, nil
|
|
|
- }
|
|
|
+ if userInfo.Role == 2 {
|
|
|
bean.Role = 2
|
|
|
//ty = "mk"
|
|
|
} else {
|