Browse Source

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

icole 4 năm trước cách đây
mục cha
commit
3d80a8437d
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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, "/")