فهرست منبع

日志清理时间

qzy 3 هفته پیش
والد
کامیت
4eeea8b0e0

+ 3 - 2
sp-server/src/main/java/com/pj/project/tb_account/AutomaticPay.java

@@ -133,7 +133,7 @@ public class AutomaticPay {
      */
     public boolean payBusinessAndPartMoney(List<TbBusiness> businessList,
                                            TbBusinessCar tbBusinessCar,
-                                           IOrderPriceRes partMoneyRes, BigDecimal totalMoney, List<TbCarWeight> carWeights,TbAccount tbAccount ) {
+                                           IOrderPriceRes partMoneyRes, BigDecimal totalMoney, List<TbCarWeight> carWeights, TbAccount tbAccount) {
 
         Date now = new Date();
         String customerId = tbBusinessCar.getCustomerId();
@@ -156,7 +156,8 @@ public class AutomaticPay {
             log.info("Balance: " + balance);
             tbAccount.setTotalMoney(balance);
             //更新账户余额
-            tbAccountService.updateById(tbAccount);
+            boolean flag = tbAccountService.updateById(tbAccount);
+            log.info("update result:{},{},{},{}",finalOriginalMoney2,flag,totalMoney,balance);
         }).start();
         TbCostomer tbCostomer = tbCostomerService.getById(customerId);
         String customerName = tbCostomer.getName();

+ 2 - 2
sp-server/src/main/java/com/pj/project4sp/apilog/Task.java

@@ -14,10 +14,10 @@ public class Task {
     @Resource
     SpApilogMapper spApilogMapper;
 
-    @Scheduled(cron = "0 0 4 * * ?")
+    @Scheduled(cron = "0 0 0 * * ?")
     public void cleanLog() {
         log.info("start clean api log");
         LocalDate today = LocalDate.now();
-        spApilogMapper.cleanHistoryLog(today.minusDays(90).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+        spApilogMapper.cleanHistoryLog(today.minusDays(30).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
     }
 }