Przeglądaj źródła

修正账号角色权限查询失败

icole 4 lat temu
rodzic
commit
a73f27bbef
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      internal/logic/user/get_user_logic.go

+ 1 - 1
internal/logic/user/get_user_logic.go

@@ -72,7 +72,7 @@ func (l *GetUserLogic) GetUser() (*types.InfoResponse, error) {
 		}
 	} else {
 		user.ErpId = resp.Id
-		l.svcCtx.DB.Cols("erp_id").Update(map[string]interface{}{"erp_id": user.ErpId})
+		l.svcCtx.DB.Table("i2bill_user").Where("id = ?", user.Id).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, "/")