积分变动后数据问题
This commit is contained in:
@@ -119,6 +119,8 @@ public class MkPointsUserServiceImpl extends ServiceImpl<MkPointsUserMapper, MkP
|
||||
if (floatType == null) {
|
||||
throw new CzgException("积分变动类型不能为空");
|
||||
}
|
||||
//points 取绝对值
|
||||
points = Math.abs(points);
|
||||
switch (floatType) {
|
||||
case ADD:
|
||||
pointsUser.setPointBalance(pointsUser.getPointBalance() + points);
|
||||
@@ -140,7 +142,7 @@ public class MkPointsUserServiceImpl extends ServiceImpl<MkPointsUserMapper, MkP
|
||||
.shopUserId(pointsUser.getShopUserId())
|
||||
.floatType(floatType.getValue())
|
||||
.floatPoints(Long.valueOf(points))
|
||||
.balancePoints(pointsUser.getPointBalance() - points)
|
||||
.balancePoints(pointsUser.getPointBalance() + points)
|
||||
.sourceId(sourceId.toString())
|
||||
.content(reason)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user