1. update user-point
This commit is contained in:
2026-02-13 21:08:56 +08:00
parent c3e3139100
commit 54a61ec5d5
2 changed files with 2 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
set amount = amount + #{amount} , version = version + 1 set amount = amount + #{amount} , version = version + 1
where id = #{userId} and version = #{version} where id = #{userId} and version = #{version}
</update> </update>
<update id="deductUserPoint"> <update id="deductUserPoint">
update update
user_point user_point

View File

@@ -38,8 +38,8 @@ public class CommonUserPointServiceImpl extends BaseServiceImpl<CommonUserPointM
return page.setRecords(baseMapper.selectCommonUserPointPage(page, commonUserPoint)); return page.setRecords(baseMapper.selectCommonUserPointPage(page, commonUserPoint));
} }
@Transactional(rollbackFor = RuntimeException.class)
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean addUserPoint(CommonUserPointApiDTO dto) { public Boolean addUserPoint(CommonUserPointApiDTO dto) {
CommonUserPointLogEntity userPointLog = saveBenefitPointLog(dto, 1); CommonUserPointLogEntity userPointLog = saveBenefitPointLog(dto, 1);
CommonUserPointEntity userPoint = getById(dto.getUserId()); CommonUserPointEntity userPoint = getById(dto.getUserId());
@@ -103,7 +103,6 @@ public class CommonUserPointServiceImpl extends BaseServiceImpl<CommonUserPointM
if (!userPointLogService.save(userPointLog)) { if (!userPointLogService.save(userPointLog)) {
throw new RuntimeException("商城积分流水记录失败"); throw new RuntimeException("商城积分流水记录失败");
} }
return userPointLog; return userPointLog;
} }