diff --git a/users/src/main/java/com/huoran/users/entity/res/UserInfoDetailsRes.java b/users/src/main/java/com/huoran/users/entity/res/UserInfoDetailsRes.java index 02b00ca..c19df85 100644 --- a/users/src/main/java/com/huoran/users/entity/res/UserInfoDetailsRes.java +++ b/users/src/main/java/com/huoran/users/entity/res/UserInfoDetailsRes.java @@ -30,9 +30,14 @@ public class UserInfoDetailsRes implements Serializable { * 用户id */ @ApiModelProperty("用户id") - @TableId(value = "userId", type = IdType.AUTO) private Integer userId; + @ApiModelProperty("无数据状态") + private boolean status; + + @ApiModelProperty("信息") + private String message; + /** * 用户对象 */ diff --git a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java index 517ddba..b37a933 100644 --- a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java +++ b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java @@ -417,6 +417,11 @@ public class HrUserAccountServiceImpl extends ServiceImpl userAccountList = hrUserAccountMapper.selectList(new QueryWrapper() .eq("app_open_id", openId)); + if (userAccountList.size() == 0){ + res.setStatus(false); + res.setMessage("用户不存在,请先重新登录注册!"); + return res; + } //查询个人端用户信息 Integer userId = null;