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