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 {
@Transactional
public JsonResult<UserInfoEntity> token(@RequestBody UserInfoEntityReq req) {
if (UserInfoEntityReq.checkParam(req)) {
if (!UserInfoEntityReq.checkParam(req)) {
return JsonResult.buildErrorStateResult(BizExceptionEnum.ERROR_PARAM.getMsg(), null);
}
......
......@@ -15,42 +15,36 @@ import java.time.LocalDate;
@Data
public class UserInfoEntityReq {
//用户ID
private Long userId;
//用户ID
private Long userId;
//0 未知 1 女 2 男
private Gender gender;
//0 未知 1 女 2 男
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) {
if (req == null || req.getUserId() == null ||
(StringUtils.isEmpty(req.getBirthday())
&& StringUtils.isEmpty(req.getEmail())
&& StringUtils.isEmpty(req.getQq())
&& StringUtils.isEmpty(req.getName())
&& StringUtils.isEmpty(req.getNickName())
&& StringUtils.isEmpty(req.getPhoto())
&& req.getGender() == null)) {
public static boolean checkParam(UserInfoEntityReq req) {
if (req == null || req.getUserId() == null ||
(StringUtils.isEmpty(req.getNickName()) && StringUtils.isEmpty(req.getPhoto()))) {
return false;
}
return true;
return false;
}
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