|
|
@@ -130,8 +130,8 @@ public class UserGalaxyCoinServiceImpl implements UserGalaxyCoinService {
|
|
|
BigDecimal remainGalaxyCoin = userGalaxyCoinRecord.getRemainGalaxyCoin();
|
|
|
if (remainGalaxyCoin.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
//扣除记录 对应的银河币不可用
|
|
|
+ log.info("订单退款,扣除该笔订单oid:{}返现的银河币", orderId);
|
|
|
sendGalaxyCoinHandle(userGalaxyCoinRecord.getUserId(), orderId, remainGalaxyCoin.negate().intValue(), PointsRecordConst.ORDER_REFUND_SUB, true, false, source);
|
|
|
- userGalaxyCoinRecord.setRemainGalaxyCoin(BigDecimal.ZERO);
|
|
|
userGalaxyCoinRecord.setIsUsed(Boolean.TRUE);
|
|
|
userGalaxyCoinRecordMapper.updateById(userGalaxyCoinRecord);
|
|
|
}
|
|
|
@@ -150,7 +150,7 @@ public class UserGalaxyCoinServiceImpl implements UserGalaxyCoinService {
|
|
|
.last("limit 1"));
|
|
|
if (orderDonGalaxyCoinRecord != null) {
|
|
|
//使用记录
|
|
|
- recordUseRecord(orderId, userId, orderDonGalaxyCoinRecord.getGalaxyCoin(), PointsRecordConst.ORDER, false, source);
|
|
|
+ recordUseRecord(orderId, userId, orderDonGalaxyCoinRecord.getGalaxyCoin().negate(), PointsRecordConst.ORDER, false, source);
|
|
|
orderDonGalaxyCoinRecord.setRefundGalaxyCoin(orderDonGalaxyCoinRecord.getGalaxyCoin());
|
|
|
orderDonGalaxyCoinRecord.setOrderId(orderId);
|
|
|
orderDonGalaxyCoinRecordMapper.updateById(orderDonGalaxyCoinRecord);
|