fix: 【member】清理 socialUser 对象以确保 updateTime 正确更新

This commit is contained in:
YunaiV 2025-11-22 10:10:28 +08:00
parent 90a4f56544
commit d886f8196a
2 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> {
.lt(BrokerageRecordDO::getUnfreezeTime, unfreezeTime));
}
default int updateByIdAndStatus(Integer id, Integer status, BrokerageRecordDO updateObj) {
default int updateByIdAndStatus(Long id, Integer status, BrokerageRecordDO updateObj) {
return update(updateObj, new LambdaQueryWrapper<BrokerageRecordDO>()
.eq(BrokerageRecordDO::getId, id)
.eq(BrokerageRecordDO::getStatus, status));

View File

@ -153,6 +153,7 @@ public class SocialUserServiceImpl implements SocialUserService {
if (socialUser.getId() == null) {
socialUserMapper.insert(socialUser);
} else {
socialUser.clean(); // 避免 updateTime 不更新https://gitee.com/yudaocode/yudao-boot-mini/issues/ID7FUL
socialUserMapper.updateById(socialUser);
}
return socialUser;