Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder

qzy 2 settimane fa
parent
commit
43c1d526e7

+ 4 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrder.java

@@ -58,6 +58,10 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	 * 通道代码
 	 */
 	private String channelNo;
+	/**
+	 * 处理放行时间(过卡三)
+	 */
+	private String checkTime;
 
     /**
      * 订单号

+ 8 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java

@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
+import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import cn.hutool.log.StaticLog;
@@ -73,7 +74,7 @@ import javax.annotation.Resource;
 @Transactional(rollbackFor = Exception.class)
 @Slf4j
 public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implements IService<TbOrder> {
-    static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss sss");
+
     /**
      * 底层 Mapper 对象
      */
@@ -931,7 +932,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
         PaymentDto paymentDto = new PaymentDto();
         paymentDto.setTradeNo(tbOrder.getTradeNo());
 
-        String date = tbOrder.getFinishTime() != null ? sdf.format(tbOrder.getFinishTime()) : sdf.format(new Date());
+        String date = tbOrder.getCheckTime().concat(" ").concat(RandomUtil.randomNumbers(3));
         paymentDto.setDeclTime(date);
         paymentDto.setFieldCode(htTradeSettlement.getFieldCode());
         paymentDto.setChannelNo(tbOrder.getChannelNo());
@@ -977,7 +978,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
                 //todo: 收到航通007报文即收到海关结关信息,转发结关信息给到银行
                 paymentDto.setTradeNo(tbOrder.getTradeNo());
 
-                String date = tbOrder.getFinishTime() != null ? sdf.format(tbOrder.getFinishTime()) : sdf.format(new Date());
+                String date = tbOrder.getCheckTime().concat(" ").concat(RandomUtil.randomNumbers(3));
                 paymentDto.setDeclTime(date);
 
                 paymentDto.setFieldCode(htTradeSettlement.getFieldCode());
@@ -1032,10 +1033,13 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
                 tbOrder.setFinishTime(new Date());
                 tbOrder.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
                 tbOrder.setChannelNo(htPassCardDTO.getChannelNo());
+                tbOrder.setCheckTime(htPassCardDTO.getCheckTime());
 
                 //todo: 收到航通007报文即收到海关结关信息,转发结关信息给到银行
                 paymentDto.setTradeNo(tbOrder.getTradeNo());
-                paymentDto.setDeclTime(sdf.format(new Date()));
+
+                String date = htPassCardDTO.getCheckTime().concat(" ").concat(RandomUtil.randomNumbers(3));
+                paymentDto.setDeclTime(date);
                 paymentDto.setFieldCode(htPassCardDTO.getAreaNo());
                 paymentDto.setChannelNo(htPassCardDTO.getChannelNo());
                 paymentDto.setTrans(tbOrder.getPlatSeqNo());