更新用户信息

This commit is contained in:
gong
2025-12-19 14:32:24 +08:00
parent 1e322c5c8d
commit 04dd00f756

View File

@@ -61,7 +61,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
public Boolean updateInfo(long shopId, long userId, UserInfoEditDTO userInfoEditDTO) {
UserInfo userInfo = getById(userId);
BeanUtil.copyProperties(userInfoEditDTO, userInfo);
if (save(userInfo)) {
if (updateById(userInfo)) {
if (shopId != -1L) {
ShopUser shopUser = BeanUtil.copyProperties(userInfo, ShopUser.class);
return shopUserMapper.updateByQuery(shopUser, new QueryWrapper().eq(ShopUser::getSourceShopId, shopId).eq(ShopUser::getUserId, userId)) > 0;