修改店铺手机号同时修改sysuser账号

This commit is contained in:
张松 2025-03-14 17:34:24 +08:00
parent 073153f2f9
commit 1879d3f6d4
1 changed files with 10 additions and 0 deletions

View File

@ -163,8 +163,18 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
}
if (updateById(shopInfo)) {
SysUser sysUser = sysUserService.getById(shopInfo.getId());
boolean flag = false;
if (!sysUser.getNickName().equals(shopInfo.getShopName())) {
sysUser.setNickName(shopInfo.getShopName());
flag = true;
}
if (!sysUser.getPhone().equals(shopInfo.getPhone())) {
sysUser.setPhone(shopInfo.getPhone());
flag = true;
}
if (flag) {
sysUserService.updateById(sysUser);
}
return true;