Browse Source

1

sunjiabei/feature-20251202094523-银行接口同步
sunjiabei 3 weeks ago
parent
commit
f9ce775ebe
  1. 9
      src/main/java/com/example/demo/serviceImpl/cash/BankServiceImpl.java

9
src/main/java/com/example/demo/serviceImpl/cash/BankServiceImpl.java

@ -694,15 +694,14 @@ public class BankServiceImpl implements BankService {
// 将double先转为int再转为string
double amountDouble = cashCollection.getPermanentGold() * 3.18;
int amountInt = (int) amountDouble;
int amountInt = (int) Math.round(amountDouble);
ipay88DTO.setAmount(String.valueOf(amountInt));
double feeDouble = cashCollection.getPermanentGold() * 3.18 * 0.0085;
int feeInt = (int) feeDouble;
int feeInt = (int) Math.round(feeDouble);
ipay88DTO.setFee(String.valueOf(feeInt));
double netDouble = cashCollection.getPermanentGold() * 3.18 - cashCollection.getPermanentGold() * 3.18 * 0.0085;
int netInt = (int) netDouble;
int netInt = amountInt-feeInt;
ipay88DTO.setNet(String.valueOf(netInt));
cashCollectionMapper.updateByGoldCoinOrderCodeByIpay88(ipay88DTO);
// 构建成功消息
@ -723,7 +722,7 @@ public class BankServiceImpl implements BankService {
}
// 银行自动处理接口(每天早上6点执行)
@Scheduled(cron = "0 0 6 * * ?")
@Scheduled(cron = "0 54 15 * * ?")
@Override
public Result bankAuto() {
try {

Loading…
Cancel
Save