修改店铺名称同步修改系统账号名称

This commit is contained in:
张松 2025-03-13 14:13:42 +08:00
parent 0d18eb7223
commit 69f3ae3e89
1 changed files with 9 additions and 1 deletions

View File

@ -161,7 +161,15 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
shopInfo.setOperationPwd(SecureUtil.md5(shopInfoEditDTO.getOperationPwd()));
redisService.del(key);
}
return updateById(shopInfo);
if (updateById(shopInfo)) {
SysUser sysUser = sysUserService.getById(shopInfo.getId());
if (!sysUser.getNickName().equals(shopInfo.getShopName())) {
sysUser.setNickName(shopInfo.getShopName());
sysUserService.updateById(sysUser);
}
return true;
}
return false;
}
@Override