fuxubing 3 éve
szülő
commit
bfa9b354ae

+ 6 - 4
src/main/java/com/reptileclient/jlifeapp/service/impl/HmBookOrderServiceImpl.java

@@ -297,14 +297,16 @@ public class HmBookOrderServiceImpl implements HmBookOrderService {
     public int updateByBookOrderNo(String bookOrderNo, String stationCode) {
         HmToken hmToken = hmTokenMapper.selectAll();
         String token = hmToken.getToken();
-        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode)) {
+        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode) || "null".equals(stationCode)) {
             token = hmToken.getSubToken();
         }
 
         HmBookOrderDTO hmBookOrderDTO = new HmBookOrderDTO();
+        hmBookOrderDTO.setPageSize(1);
+        hmBookOrderDTO.setPageIndex(50);
         hmBookOrderDTO.setBookOrderNo(bookOrderNo);
+
         String jsonString = JSONObject.toJSONString(hmBookOrderDTO);
-        //JSONObject jsonObject = HttpUtil.requestPost(token, jsonString, JlifeConstant.BOOK_ORDER_URL);
 
         Map<String, Object> request = retryService.requestPost(token, jsonString, JlifeConstant.BOOK_ORDER_URL);
 
@@ -331,7 +333,7 @@ public class HmBookOrderServiceImpl implements HmBookOrderService {
             });
             //成功
             hmDownHistoryService.insertDownLog("服务单",
-                    JlifeConstant.BOOK_ORDER_URL, jsonString, hmBookOrderDTO.getStartTime(), null, 0);
+                    JlifeConstant.BOOK_ORDER_URL, bookOrderNo, null, null, 0);
             //同步插入客户到customer_client
             //customerClientMapper.insertClientByBatch(hmBookOrders);
 
@@ -339,7 +341,7 @@ public class HmBookOrderServiceImpl implements HmBookOrderService {
         } else {
             //失败
             hmDownHistoryService.insertDownLog("服务单",
-                    JlifeConstant.BOOK_ORDER_URL, jsonString, hmBookOrderDTO.getStartTime(), null, 1);
+                    JlifeConstant.BOOK_ORDER_URL, bookOrderNo, null, null, 1);
             return 0;
         }
     }

+ 5 - 4
src/main/java/com/reptileclient/jlifeapp/service/impl/HmPaymentOrderServiceImpl.java

@@ -318,14 +318,15 @@ public class HmPaymentOrderServiceImpl implements HmPaymentOrderService {
 
         HmToken hmToken = hmTokenMapper.selectAll();
         String token = hmToken.getToken();
-        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode)) {
+        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode) || "null".equals(stationCode)) {
             token = hmToken.getSubToken();
         }
 
         HmPaymentOrderDTO hmPaymentOrderDTO = new HmPaymentOrderDTO();
+        hmPaymentOrderDTO.setPageSize(1);
+        hmPaymentOrderDTO.setPageIndex(50);
         hmPaymentOrderDTO.setPaymentNo(paymentNo);
         String jsonString = JSONObject.toJSONString(hmPaymentOrderDTO);
-        //JSONObject jsonObject = HttpUtil.requestPost(token, jsonString, JlifeConstant.BOOK_ORDER_URL);
 
         Map<String, Object> request = retryService.requestPost(token, jsonString, JlifeConstant.PAYMENT_ORDER_URL);
 
@@ -359,12 +360,12 @@ public class HmPaymentOrderServiceImpl implements HmPaymentOrderService {
             }
             //成功
             hmDownHistoryService.insertDownLog("服务付款单",
-                    JlifeConstant.PAYMENT_ORDER_URL, jsonString, hmPaymentOrderDTO.getCreateTimeBegin(), null, 0);
+                    JlifeConstant.PAYMENT_ORDER_URL, paymentNo, null, null, 0);
             return 1;
         } else {
             //失败
             hmDownHistoryService.insertDownLog("服务付款单",
-                    JlifeConstant.PAYMENT_ORDER_URL, jsonString, hmPaymentOrderDTO.getCreateTimeBegin(), null, 1);
+                    JlifeConstant.PAYMENT_ORDER_URL, paymentNo, null, null, 1);
             return 0;
         }
 

+ 2 - 2
src/main/resources/mybatis/mapper/hm/HmBookOrderMapper.xml

@@ -113,7 +113,7 @@
                a.`payment_no`
         FROM hm_book_trade_order a
                  LEFT JOIN hm_book_order b
-                           ON b.book_trade_no = a.book_trade_no
+                           ON b.book_order_no = a.book_order_no
         WHERE a.status != 4
         AND (
         LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)
@@ -127,7 +127,7 @@
                a.`payment_no`
         FROM hm_book_trade_order a
                  LEFT JOIN hm_book_order b
-                           ON b.book_trade_no = a.book_trade_no
+                           ON b.book_order_no = a.book_order_no
         WHERE a.status != 4
         AND (
         LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)