Explorar el Código

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

icole hace 4 años
padre
commit
3d80a8437d
Se han modificado 1 ficheros con 3 adiciones y 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, "/")