From 92444077e656d211779a78356278905904f5bebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 14 Oct 2024 08:50:30 +0800 Subject: [PATCH] =?UTF-8?q?debug=EF=BC=9A=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/domain/entity/SmUser.java | 2 +- .../java/com/ruoyi/framework/web/service/SysLoginService.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java index 8769ff9d..8ce834a6 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/core/domain/entity/SmUser.java @@ -125,7 +125,6 @@ public class SmUser extends BaseEntity @ApiModelProperty("是否商家") @JsonView(JsonViewProfile.App.class) - @NotNull(message = "用户类型不允许为空", groups = {ValidGroup.Create.class}) private Boolean isMch; @ApiModelProperty("服务费费率") @@ -203,6 +202,7 @@ public class SmUser extends BaseEntity private LocalDateTime limitWithdrawTime; @ApiModelProperty("用户类型") + @NotNull(message = "用户类型不允许为空", groups = {ValidGroup.Create.class}) private String type; @Excel(name = "代理商服务费比例") diff --git a/smart-switch-ruoyi/smart-switch-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/smart-switch-ruoyi/smart-switch-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java index a9c1d385..cc51989f 100644 --- a/smart-switch-ruoyi/smart-switch-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java +++ b/smart-switch-ruoyi/smart-switch-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java @@ -8,6 +8,7 @@ import com.alibaba.fastjson2.JSONObject; import com.ruoyi.common.core.domain.entity.SmUser; import com.ruoyi.common.core.domain.model.WxLoginBody; import com.ruoyi.common.enums.UserStatus; +import com.ruoyi.common.enums.UserType; import com.ruoyi.common.utils.ServiceUtil; import com.ruoyi.common.utils.http.HttpUtils; import com.ruoyi.common.auth.wx.AccessTokenUtil; @@ -319,6 +320,7 @@ public class SysLoginService newUser.setUserName(name); newUser.setWxOpenId(openId); newUser.setPhonenumber(mobile); + newUser.setType(UserType.USER.getType()); smUserService.insertSmUser(newUser); // 添加微信账户