feat:
1. add lottery
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<if test="vo.userId!=null">
|
||||
and user_id = #{vo.userId}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ public class CommonUserPointServiceImpl extends BaseServiceImpl<CommonUserPointM
|
||||
Assert.isTrue(amount.compareTo(BigDecimal.valueOf(100)) == 0 || amount.compareTo(BigDecimal.valueOf(1000)) == 0, "无效积分");
|
||||
Assert.notNull(userId, "无效用户");
|
||||
CommonUserPointEntity userPoint = getById(userId);
|
||||
Assert.isTrue(userPoint.getAmount().compareTo(amount) >= 0, "积分不足");
|
||||
BigDecimal lastAmount = userPoint.getAmount();
|
||||
int i = baseMapper.deductUserPoint(userId, amount, userPoint.getVersion());
|
||||
if (i > 0) {
|
||||
|
||||
Reference in New Issue
Block a user