diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/param/UserEditParam.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/param/UserEditParam.java index 674b38f5..cd14393e 100644 --- a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/param/UserEditParam.java +++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/param/UserEditParam.java @@ -6,6 +6,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import java.io.Serializable; +import java.util.Date; /** * @ClassName UserEditParam @@ -15,14 +16,17 @@ import java.io.Serializable; @Data public class UserEditParam implements Serializable { - @NotBlank(message = "请上传头像") +// @NotBlank(message = "请上传头像") @ApiModelProperty(value = "用户头像") private String avatar; - @NotBlank(message = "请填写昵称") - @Size(min = 1, max = 60,message = "长度超过了限制") +// @NotBlank(message = "请填写昵称") + @Size(max = 60,message = "长度超过限制") @ApiModelProperty(value = "用户昵称") private String nickname; +// @NotBlank(message = "请上传头像") + @ApiModelProperty(value = "用户头像") + private String birthday; } diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java index c9062bee..2cfa1700 100644 --- a/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java +++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java @@ -9,6 +9,7 @@ package co.yixiang.app.modules.user.rest; +import cn.hutool.core.date.DateTime; import cn.iocoder.yudao.framework.common.pojo.ApiResult; import co.yixiang.app.common.aop.NoRepeatSubmit; import co.yixiang.app.common.bean.LocalUser; @@ -31,6 +32,7 @@ import co.yixiang.modules.user.service.YxUserService; import co.yixiang.modules.user.service.YxUserSignService; import co.yixiang.modules.user.vo.SignVo; import co.yixiang.modules.user.vo.YxUserQueryVo; +import co.yixiang.utils.StringUtils; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Maps; import io.swagger.annotations.Api; @@ -43,10 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import static co.yixiang.constant.SystemConfigConstants.YSHOP_SHOW_RECHARGE; @@ -285,9 +284,15 @@ public class LetterAppUserController { @ApiOperation(value = "用户修改信息",notes = "用修改信息") public ApiResult edit(@Validated @RequestBody UserEditParam param){ YxUser yxUser = LocalUser.getUser(); - yxUser.setAvatar(param.getAvatar()); - yxUser.setNickname(param.getNickname()); - + if (StringUtils.isNotBlank(param.getAvatar())){ + yxUser.setAvatar(param.getAvatar()); + } + if (StringUtils.isNotBlank(param.getNickname())){ + yxUser.setNickname(param.getNickname()); + } + if (StringUtils.isNotBlank(param.getBirthday())){ + yxUser.setBirthday(param.getBirthday()); + } yxUserService.updateById(yxUser); return ApiResult.ok("修改成功"); diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java index edf240c1..2f754b90 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java @@ -50,4 +50,7 @@ public class YxStoreExpertDto implements Serializable { /** 是否删除 */ private Integer isShow; + + /** 排序 */ + private Integer sort; } diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/domain/YxUser.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/domain/YxUser.java index 5bfa1cd9..c2a63d34 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/domain/YxUser.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/domain/YxUser.java @@ -63,7 +63,7 @@ public class YxUser extends BaseDomain { /** 生日 */ - private Integer birthday; + private String birthday; /** 身份证号码 */ diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java index a7c17fa7..fdb8d6b2 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java @@ -33,7 +33,7 @@ public class YxUserDto implements Serializable { private String realName; /** 生日 */ - private Integer birthday; + private String birthday; /** 身份证号码 */ private String cardId; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java index 6b139638..291094a9 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java @@ -59,7 +59,7 @@ public class YxUserQueryVo implements Serializable { private String realName; @ApiModelProperty(value = "生日") - private Integer birthday; + private String birthday; @ApiModelProperty(value = "身份证号码") @JsonIgnore