Commit 054396ee by ping.wu

Merge branch 'feature/20230726_支付宝数据上报_wuping' of…

Merge branch 'feature/20230726_支付宝数据上报_wuping' of https://gitlab.freemud.com/order-group-application/order-group
parents 48e7569d 3d6ba3d3
......@@ -201,13 +201,17 @@ public class OrderCallBackMQService {
}
private OrderInfoReqs getWechatReportOrderInfoReqs(OrderCallBackRequestVo body) {
// 订单所有状态正常变化通知通知开放平台
if (!ObjectUtils.equals("1", body.getMsgType()) || body.getOperateType() == null || body.getOperateType() == 2) {
return null;
}
try {
OrderInfoReqs orderInfoReqs = JSONObject.parseObject(body.getContent(), OrderInfoReqs.class);
List<Integer> allowOrderClientList = Lists.newArrayList(OrderClientType.SAAS.getIndex(), OrderClientType.ALIPAY.getIndex());
//支付宝渠道订单订单状态变更都上报
if (orderInfoReqs != null && Objects.equals(OrderClientType.ALIPAY.getIndex(),orderInfoReqs.getOrderClient())
&& Objects.equals(PayType.ONLINE_PAY.getCode(),orderInfoReqs.getPayType()) && body.getOperateType() != 3 ) {
return orderInfoReqs;
}
if (orderInfoReqs != null && allowOrderClientList.contains(orderInfoReqs.getOrderClient()) && Objects.equals(PayType.ONLINE_PAY.getCode(),orderInfoReqs.getPayType())&&
((body.getOperateType() == 0 && NewOrderStatus.PENDING_PAYMENT.getIndex().equals(orderInfoReqs.getOrderState())) ||
(body.getOperateType() == 1 && NewOrderStatus.PLACE_AN_ORDER.getIndex().equals(orderInfoReqs.getOrderState())))) {
......@@ -244,6 +248,10 @@ public class OrderCallBackMQService {
wechatReportOrderDto.setShopId(orderInfoReqs.getStoreId());
wechatReportOrderDto.setSubMchId(orderExtInfoDto.getPlatformMchId());
wechatReportOrderDto.setGmtCreate(Long.parseLong(orderInfoReqs.getCreateTime()));
wechatReportOrderDto.setDeliveryNo(orderInfoReqs.getExpressNo());
wechatReportOrderDto.setOrderType(orderInfoReqs.getOrderType());
wechatReportOrderDto.setOrderStatus(orderInfoReqs.getOrderState());
wechatReportOrderDto.setOrderClient(orderInfoReqs.getOrderClient());
if (StringUtils.isBlank(orderExtInfoDto.getPlatformMchId())) {
// 获取当前商户微信支付mchId
AssortmentOpenPlatformWxapp wxApp = openPlatformWxappManager.findByPartnerIdAndWxappId(userLoginInfoDto.getPartnerId(), userLoginInfoDto.getWxAppid());
......
......@@ -95,6 +95,24 @@ public class WechatReportOrderDto {
*/
private Long gmtCreate;
//配送单号
private String deliveryNo;
//承诺时间范围
private String commitmentTimeRange;
//预计送达开始时间
private String expectDeliverStartDate;
//预计送达结束时间
private String expectDeliverEndDate;
//订单类型
private Integer orderType;
//订单状态
private Integer orderStatus;
/**
* 下单渠道必填,根据此字段的值判断是自营或第三方,来走不同的状态机 详细见 orderClientType枚举
*/
private Integer orderClient;
private List<AccountBean> accountList;
@Data
......
......@@ -74,7 +74,9 @@ public class OrderCenterSdkAdapter {
}
if (orderInfoReqs.getAfterSalesOrderList() != null && orderInfoReqs.getAfterSalesOrderList().size() >= 1) {
data.setAfterSalesOrderResp(orderInfoReqs.getAfterSalesOrderList().get(0));
//取最新售后单
List<AfterSalesOrderResp> afterSalesOrderList = orderInfoReqs.getAfterSalesOrderList().stream().sorted(Comparator.comparing(AfterSalesOrderResp::getCreateTime).reversed()).collect(Collectors.toList());
data.setAfterSalesOrderResp(afterSalesOrderList.get(0));
}
if (orderInfoReqs.getDeliveryContactInfoList() != null && orderInfoReqs.getDeliveryContactInfoList().size() != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment