Commit 0f5869a6 authored by 唐峰's avatar 唐峰

Merge branch 'feature-tob-20230809' of git.quantgroup.cn:head_group/xyqb-user2...

Merge branch 'feature-tob-20230809' of git.quantgroup.cn:head_group/xyqb-user2 into feature-tob-20230809
parents bf2e6661 edd9a3cf
...@@ -48,7 +48,7 @@ public class UserInfoEntityApiV2Controller implements IBaseController { ...@@ -48,7 +48,7 @@ public class UserInfoEntityApiV2Controller implements IBaseController {
@Transactional @Transactional
public JsonResult<UserInfoEntity> token(@RequestBody UserInfoEntityReq req) { public JsonResult<UserInfoEntity> token(@RequestBody UserInfoEntityReq req) {
if (UserInfoEntityReq.checkParam(req)) { if (!UserInfoEntityReq.checkParam(req)) {
return JsonResult.buildErrorStateResult(BizExceptionEnum.ERROR_PARAM.getMsg(), null); return JsonResult.buildErrorStateResult(BizExceptionEnum.ERROR_PARAM.getMsg(), null);
} }
......
...@@ -15,42 +15,36 @@ import java.time.LocalDate; ...@@ -15,42 +15,36 @@ import java.time.LocalDate;
@Data @Data
public class UserInfoEntityReq { public class UserInfoEntityReq {
//用户ID //用户ID
private Long userId; private Long userId;
//0 未知 1 女 2 男 //0 未知 1 女 2 男
private Gender gender; private Gender gender;
private String email; private String email;
private String qq; private String qq;
//姓名预留字段,目前无场景使用 //姓名预留字段,目前无场景使用
private String name; private String name;
//昵称 //昵称
private String nickName; private String nickName;
//头像 //头像
private String photo; private String photo;
//生日 //生日
private String birthday; private String birthday;
public static boolean checkParam(UserInfoEntityReq req) { public static boolean checkParam(UserInfoEntityReq req) {
if (req == null || req.getUserId() == null || if (req == null || req.getUserId() == null ||
(StringUtils.isEmpty(req.getBirthday()) (StringUtils.isEmpty(req.getNickName()) && StringUtils.isEmpty(req.getPhoto()))) {
&& StringUtils.isEmpty(req.getEmail())
&& StringUtils.isEmpty(req.getQq())
&& StringUtils.isEmpty(req.getName())
&& StringUtils.isEmpty(req.getNickName())
&& StringUtils.isEmpty(req.getPhoto())
&& req.getGender() == null)) {
return false; return false;
}
return true;
} }
return true;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment