Sfoglia il codice sorgente

结关报文加密+一级订单表新增通道号

linbl 2 settimane fa
parent
commit
12b4cab29d

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

@@ -54,6 +54,11 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
+	/**
+	 * 通道代码
+	 */
+	private String channelNo;
+
     /**
      * 订单号
      */

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

@@ -925,6 +925,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
         PaymentDto paymentDto = new PaymentDto();
         paymentDto.setTradeNo(tbOrder.getTradeNo());
         paymentDto.setDeclTime(htTradeSettlement.getDeclTime());
+        paymentDto.setFieldCode(htTradeSettlement.getFieldCode());
+        paymentDto.setChannelNo(tbOrder.getChannelNo());
+        paymentDto.setTrans(tbOrder.getPlatSeqNo());
         StaticLog.info("\nsendCXB001——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
         paymentServerInterface.sendCXB001(paymentDto);
 
@@ -966,6 +969,10 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
                 //todo: 收到航通007报文即收到海关结关信息,转发结关信息给到银行
                 paymentDto.setTradeNo(tbOrder.getTradeNo());
                 paymentDto.setDeclTime(htTradeSettlement.getDeclTime());
+
+                paymentDto.setFieldCode(htTradeSettlement.getFieldCode());
+                paymentDto.setChannelNo(tbOrder.getChannelNo());
+                paymentDto.setTrans(tbOrder.getPlatSeqNo());
                 StaticLog.info("\nsendCXB001——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
                 log.info("log sendCXB001——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
                 paymentServerInterface.sendCXB001(paymentDto);
@@ -1014,6 +1021,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
                 //收到007结关信息后边民即可上架订单,不需等收到打款给外籍商户的成功回执SXB017才能完成订单
                 tbOrder.setFinishTime(new Date());
                 tbOrder.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+                tbOrder.setChannelNo(htPassCardDTO.getChannelNo());
 
                 //todo: 收到航通007报文即收到海关结关信息,转发结关信息给到银行
                 paymentDto.setTradeNo(tbOrder.getTradeNo());

+ 4 - 4
sp-service/payment-server/src/main/java/com/pj/xml/MessageXML.java

@@ -57,10 +57,10 @@ public class MessageXML {
                 "              <value>CXB001</value>\n" +
                 "       </item>\n" +
                 "</headers>\n" +
-                payload +
-                //"<plain>" +
-                //CryptoUtil.encrypt(payload)+
-                //"</plain>" +
+                //payload +
+                "<plain>" +
+                CryptoUtil.encrypt(payload)+
+                "</plain>" +
                 "</message>";
         StaticLog.info("\n --------发送报文--------CXB001--------" + "\n payload=" + payload +"\n xml=" + xml);
         return xml;