fuxubing 3 vuotta sitten
vanhempi
commit
a3a4749b6b

+ 2 - 1
src/main/java/com/reptileclient/jlifeapp/service/impl/HmBookOrderServiceImpl.java

@@ -19,6 +19,7 @@ import com.reptileclient.jlifeapp.service.HmDownHistoryService;
 import com.reptileclient.jlifeapp.service.RetryService;
 import com.reptileclient.jlifeapp.util.JsonUtil;
 
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
@@ -296,7 +297,7 @@ public class HmBookOrderServiceImpl implements HmBookOrderService {
     public int updateByBookOrderNo(String bookOrderNo, String stationCode) {
         HmToken hmToken = hmTokenMapper.selectAll();
         String token = hmToken.getToken();
-        if ("147001".equals(stationCode)) {
+        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode)) {
             token = hmToken.getSubToken();
         }
 

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

@@ -318,7 +318,7 @@ public class HmPaymentOrderServiceImpl implements HmPaymentOrderService {
 
         HmToken hmToken = hmTokenMapper.selectAll();
         String token = hmToken.getToken();
-        if ("147001".equals(stationCode)) {
+        if ("147001".equals(stationCode) || StringUtils.isBlank(stationCode)) {
             token = hmToken.getSubToken();
         }
 

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

@@ -106,33 +106,35 @@
         where payment_no is null
     </select>
     <select id="selectMatchList" resultType="java.util.Map">
+        <![CDATA[
         SELECT a.book_trade_no,
-        a.book_order_no,
-        a.`station_code`,
-        a.`payment_no`
+               a.book_order_no,
+               a.`station_code`,
+               a.`payment_no`
         FROM hm_book_trade_order a
-        LEFT JOIN hm_book_order b
-        ON b.book_trade_no = a.book_trade_no
+                 LEFT JOIN hm_book_order b
+                           ON b.book_trade_no = a.book_trade_no
         WHERE a.status != 4
         AND (
-        a.`start_time` BETWEEN (CURRENT_DATE - INTERVAL 31 DAY)
-        AND (CURRENT_DATE + INTERVAL 31 DAY)
+        LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)
+        AND LEFT(a.begin_time, 10) >= (CURRENT_DATE - INTERVAL 31 DAY)
         )
         AND b.book_order_no IS NULL
         UNION
         SELECT a.book_trade_no,
-        a.book_order_no,
-        a.`station_code`,
-        a.`payment_no`
+               a.book_order_no,
+               a.`station_code`,
+               a.`payment_no`
         FROM hm_book_trade_order a
-        LEFT JOIN hm_book_order b
-        ON b.book_trade_no = a.book_trade_no
+                 LEFT JOIN hm_book_order b
+                           ON b.book_trade_no = a.book_trade_no
         WHERE a.status != 4
         AND (
-        a.`start_time` BETWEEN (CURRENT_DATE - INTERVAL 31 DAY)
-        AND (CURRENT_DATE + INTERVAL 31 DAY)
+        LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)
+        AND LEFT(a.begin_time, 10) >= (CURRENT_DATE - INTERVAL 31 DAY)
         )
         AND b.shop_name IS NULL
+        ]]>
     </select>
     <select id="selectByBookOrderNo" resultMap="BaseResultMap">
         select