更新用户信息 头像/昵称

视频号/小程序/公众号mapper  暂未投入使用
This commit is contained in:
2024-04-15 10:07:53 +08:00
parent 7d3fe9deb7
commit d7dfeee159
7 changed files with 337 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.dao.TbMerchantAccountMapper;
import com.chaozhanggui.system.cashierservice.entity.TbMerchantAccount;
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
import com.chaozhanggui.system.cashierservice.entity.dto.AuthUserDto;
import com.chaozhanggui.system.cashierservice.entity.dto.OnlineUserDto;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
@@ -221,6 +222,14 @@ public class LoginContoller {
return loginService.userInfo(userId, shopId);
}
@PostMapping("/upUserInfo")
public Result userInfo(@RequestHeader String token, @RequestBody TbUserInfo userInfo) {
String userId = TokenUtil.parseParamFromToken(token).getString("userId");
userInfo.setId(Integer.valueOf(userId));
userInfo.setUpdatedAt(System.currentTimeMillis());
return loginService.upUserInfo(userInfo);
}
/**
* 用户注册