Explorar o código

查询用户信息,绑定erp账号

icole %!s(int64=4) %!d(string=hai) anos
pai
achega
3d80a8437d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      internal/logic/user/get_user_logic.go

+ 3 - 0
internal/logic/user/get_user_logic.go

@@ -70,6 +70,9 @@ func (l *GetUserLogic) GetUser() (*types.InfoResponse, error) {
 		} else {
 			resp.ErpRoleType = 0
 		}
+	} else {
+		user.ErpId = resp.Id
+		l.svcCtx.DB.Cols("erp_id").Update(map[string]interface{}{"erp_id": user.ErpId})
 	}
 	if !strings.HasPrefix(user.Avatar, "http") && user.Avatar != "" {
 		domain := strings.TrimRight(l.svcCtx.Config.AliYunOss.FileUrl, "/")