|
@@ -3068,12 +3068,16 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
// 剩余回收
|
|
|
// 可分配积分值
|
|
|
int recoveryScore = scorePackage.getKfpjf();
|
|
|
+ if (recoveryScore <= 0) {
|
|
|
+ throw new RuntimeException("没有可回收的积分");
|
|
|
+ }
|
|
|
|
|
|
- // 剩余收回: 更新积分包分值为已分配的积分
|
|
|
+ // 剩余收回: 更新积分包分值为已分配的积分, 更新可分配积分值为0
|
|
|
WmScorePackage updateEntity = new WmScorePackage();
|
|
|
updateEntity.setId(packageId);
|
|
|
updateEntity.setEnableType(terminatePackageType.getEnableType());
|
|
|
updateEntity.setScore(assignedScore);
|
|
|
+ updateEntity.setKfpjf(0);
|
|
|
updateEntity.setUpdateTime(now);
|
|
|
updateEntity.setUpdateUser(userId);
|
|
|
log.info("更新积分包参数:{}", updateEntity);
|