Browse Source

修复专家排序及用户消息修改

zyj
sj 2 years ago
parent
commit
b26c158c84
  1. 10
      zsw-bxg/src/main/java/co/yixiang/app/modules/user/param/UserEditParam.java
  2. 19
      zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java
  3. 3
      zsw-bxg/src/main/java/co/yixiang/modules/expert/service/dto/YxStoreExpertDto.java
  4. 2
      zsw-bxg/src/main/java/co/yixiang/modules/user/domain/YxUser.java
  5. 2
      zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java
  6. 2
      zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java

10
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;
}

19
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<Object> 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("修改成功");

3
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;
}

2
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;
/** 身份证号码 */

2
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;

2
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

Loading…
Cancel
Save