This commit is contained in:
777
2025-12-09 11:27:23 +08:00
parent c5bd376851
commit e36a5a9ddd
9 changed files with 141 additions and 67 deletions

View File

@@ -49,13 +49,13 @@ public class PointRecordLogServiceImpl extends ServiceImpl<PointRecordLogMapper,
throw new ServiceException("用户不存在");
}
if(dto.isDistribution()){
if(dto.getPoint() <= 0){
if(dto.getChangePoints() <= 0){
throw new ServiceException("开启分销情况下,无法调整积分为负数");
}
}
accountMapper.incrPoint(user.getId(), dto.getPoint());
accountMapper.incrPoint(user.getId(), dto.getChangePoints());
PointRecordLog pointLog = new PointRecordLog();
pointLog.setPoints(dto.getPoint());
pointLog.setPoints(dto.getChangePoints());
pointLog.setSourceUserId(user.getId());
pointLog.setSourceUsercode(user.getUsercode());
pointLog.setSourcePhone(user.getMobile());
@@ -134,4 +134,6 @@ public class PointRecordLogServiceImpl extends ServiceImpl<PointRecordLogMapper,
}
accountMapper.incrPoint(pointRecordLog.getOneUserId(), pointRecordLog.getOnePoints());
}
}