|
|
@@ -22,8 +22,10 @@ import com.kxs.common.pay.factory.PaymentFactory;
|
|
|
import com.kxs.common.pay.model.*;
|
|
|
import com.kxs.common.security.util.SecurityUtils;
|
|
|
import com.kxs.lhb.basic.api.amqp.RabbitOrderTimeoutQueueMQ;
|
|
|
+import com.kxs.lhb.basic.api.constant.enums.ChannelCodeEnum;
|
|
|
import com.kxs.lhb.basic.api.constant.enums.NotifyStatusEnum;
|
|
|
import com.kxs.lhb.basic.api.constant.enums.OrderStatusEnum;
|
|
|
+import com.kxs.lhb.basic.api.dto.tongyi.OrderInfoNotify;
|
|
|
import com.kxs.lhb.basic.api.dto.tongyi.QueryOrderReq;
|
|
|
import com.kxs.lhb.basic.api.model.*;
|
|
|
import com.kxs.lhb.basic.api.vo.admin.sysOrder.QueryLogisticsVO;
|
|
|
@@ -416,6 +418,47 @@ public class LhbOrderServiceImpl extends MPJBaseServiceImpl<LhbOrderMapper, LhbO
|
|
|
notifyService.bindPush(bindNotify, order.getIsvNo());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object tongyiNotify(OrderInfoNotify param) {
|
|
|
+
|
|
|
+ LhbOrder order = getOrderSn(param.getOrderInfo().getOrderId());
|
|
|
+ if(order == null){
|
|
|
+ order = new LhbOrder();
|
|
|
+ order.setOrderSn(param.getOrderInfo().getOrderId());
|
|
|
+ order.setAddress(param.getOrderRecvAddr().getReceiveAddress());
|
|
|
+ order.setArea(param.getOrderRecvAddr().getReceiveProvince() + StrUtil.COMMA + param.getOrderRecvAddr().getReceiveCity() + StrUtil.COMMA + param.getOrderRecvAddr().getReceiveCountry());
|
|
|
+ order.setContMobile(param.getOrderRecvAddr().getReceiveMobile());
|
|
|
+ order.setCustName(param.getOrderInfo().getUserName());
|
|
|
+ order.setIfCode(ChannelCodeEnum.TY.getCode());
|
|
|
+ order.setOutOrderSn(param.getOrderInfo().getOrderId());
|
|
|
+ order.setMakeMobile(param.getOrderInfo().getPhone());
|
|
|
+ String[] split = param.getOrderInfo().getAgentPrivateCode().split("KXS");
|
|
|
+ order.setIsvNo(split[0]);
|
|
|
+ order.setEmployNum(split[1]);
|
|
|
+ order.setPackageName(param.getOrderDetail().getGoodsName());
|
|
|
+ order.setExpressNo(param.getOrderLogistics().getLogisticsNum());
|
|
|
+ order.setStatus(Integer.valueOf(param.getOrderInfo().getPayStatus()));
|
|
|
+ order.setOutStatus(Integer.valueOf(param.getOrderInfo().getOrderStatus()));
|
|
|
+ }
|
|
|
+ order.insertOrUpdate();
|
|
|
+ //更新状态
|
|
|
+ if(order.getOutStatus() == 2){
|
|
|
+ sendToOrder(order, NotifyStatusEnum.ACT);
|
|
|
+ }
|
|
|
+ if(order.getOutStatus() == 1 || order.getOutStatus() == 4){
|
|
|
+ sendToOrder(order, NotifyStatusEnum.DISTRIBUTION);
|
|
|
+ }
|
|
|
+ if(order.getOutStatus() == 3 || order.getOutStatus() == 6){
|
|
|
+ sendToOrder(order, NotifyStatusEnum.CANCEL);
|
|
|
+ order.setStatus(OrderStatusEnum.CANCEL.getCode());
|
|
|
+ }
|
|
|
+ order.insertOrUpdate();
|
|
|
+ return "{\n" +
|
|
|
+ " \"respDesc\": \"调用成功\",\n" +
|
|
|
+ " \"respCode\": \"000000\"\n" +
|
|
|
+ "}";
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|