Forráskód Böngészése

8.29 将信息同步至航通(未完)

Mechrevo 1 éve
szülő
commit
db3773a634

+ 2 - 2
sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterface.java

@@ -22,7 +22,7 @@ public interface AsyncServerInterface {
      * @param t
      * @param <T>
      */
-    @RequestMapping("/async/rpc/send")
-    public <T> void sendMessage(T t,String dataType);
+    @RequestMapping("/async/rpc/sendObject")
+    public <T> void sendObject(T t,String dataType);
 
 }

+ 1 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterfaceFallback.java

@@ -20,7 +20,7 @@ public class AsyncServerInterfaceFallback implements FallbackFactory<AsyncServer
         return new AsyncServerInterface() {
 
             @Override
-            public <T> void sendMessage(T t,String dataType) {
+            public <T> void sendObject(T t,String dataType) {
                 log.error("错误对象:{},类型:{}",t,dataType);
             }
         };

+ 2 - 2
sp-service/async-server/src/main/java/com/pj/feign/AmqpTemplateController.java

@@ -29,8 +29,8 @@ public class AmqpTemplateController {
      * @param t
      * @param <T>
      */
-    @RequestMapping("rpc/send")
-    public <T> void sendMessage(T t,String dataType){
+    @RequestMapping("rpc/sendObject")
+    public <T> void sendObject(T t,String dataType){
         //发送
         amqpTemplateFeign.sendObject(t,dataType);
     }

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

@@ -426,7 +426,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 		// TODO: 2023/8/29 同步交易信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行订单确认后,调用航通接口发送信息
-		asyncServerInterface.sendMessage(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_ONE.getCode()); // 发送至航通
+		asyncServerInterface.sendObject(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_ONE.getCode()); // 发送至航通
 
 		return result;
 	}
@@ -452,7 +452,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 		// TODO: 2023/8/29 发送信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行进口申报确认后,调用航通接口发送信息
-		asyncServerInterface.sendMessage(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_TWO.getCode());
+		asyncServerInterface.sendObject(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_TWO.getCode());
 
 		return result;
 	}
@@ -490,7 +490,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		}
 
 		//3、todo: 调用航通接口,发送划扣成功回执信息给航通(只发送)
-		asyncServerInterface.sendMessage(order,DataType.DATA_TYPE_THREE.getCode());
+		asyncServerInterface.sendObject(order,DataType.DATA_TYPE_THREE.getCode());
 	}
 
 	/** 远程调用  查订单 */

+ 1 - 1
sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersService.java

@@ -117,7 +117,7 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
         //todo 接收国内采购商的货款支付申请,划扣至边民账户并给出回执 并且同步至航通
         orders.setIsPay(1);//支付成功
         orders.setPayTime(new Date());
-        asyncServerInterface.sendMessage(orders, DataType.DATA_TYPE_FOUR.getCode()); // 发送航通
+        asyncServerInterface.sendObject(orders, DataType.DATA_TYPE_FOUR.getCode()); // 发送航通
 
         for (Long id : idArr) {