|
|
|
@@ -163,7 +163,11 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { |
|
|
|
//计算出需要新增或减少的积分 |
|
|
|
int creditChangeNum = creditIncrement(record); |
|
|
|
if (creditChangeNum != 0) { |
|
|
|
if (currentCreditAmount + creditChangeNum < 0) { |
|
|
|
Long total = Long.valueOf(currentCreditAmount) + Long.valueOf(creditChangeNum); |
|
|
|
if (total > Integer.MAX_VALUE) { |
|
|
|
throw new MallinkException(ErrorCode.CREDIT_TOO_MUCH); |
|
|
|
} |
|
|
|
if (total < 0) { |
|
|
|
throw new MallinkException(ErrorCode.CREDIT_NOT_ENOUGH); |
|
|
|
} |
|
|
|
//如果为导入的会员 则直接覆盖总积分和操作积分明细 |
|
|
|
|