|
|
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
@ -195,6 +196,16 @@ public class ConsumeServiceImpl implements ConsumeService { |
|
|
|
user.setSumConsumeTask(BigDecimal.valueOf(-consumeUser.getTaskGold().intValue())); |
|
|
|
userMapper.updateGold(user); |
|
|
|
|
|
|
|
//累消 |
|
|
|
try { |
|
|
|
BigDecimal sum = (consumeUser.getSumGold()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP ); |
|
|
|
|
|
|
|
redService.addAmount(consumeUser.getJwcode(),sum, 2); |
|
|
|
}catch (Exception e){ |
|
|
|
log.warn("消耗累加失败,主流程继续 | jwcode={}", consumeUser.getJwcode(), e); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
redService.sendJwcode(consumeUser.getJwcode()); |
|
|
|
// } |
|
|
|
return Result.success(); |
|
|
|
|