update:号码匹配修改
This commit is contained in:
parent
4295baf3bc
commit
324df6b903
|
@ -232,21 +232,13 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
|
||||||
}
|
}
|
||||||
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
||||||
// 获取计划手机号
|
// 获取计划手机号
|
||||||
for (com.doudian.open.api.order_orderDetail.data.LogisticsInfoItem logisticsInfoItem : logisticsInfo) {
|
String productName = skuOrderListItem.getProductName();
|
||||||
for (com.doudian.open.api.order_orderDetail.data.ProductInfoItem productInfoItem : logisticsInfoItem.getProductInfo()) {
|
ordersDO.setSupplierProductName(productName);
|
||||||
String skuOrderId = productInfoItem.getSkuOrderId();
|
for (com.doudian.open.api.order_orderDetail.data.SpecItem specItem : skuOrderListItem.getSpec()) {
|
||||||
if(skuOrderId.equals(orderId)){
|
String value = specItem.getValue();
|
||||||
String productName = productInfoItem.getProductName();
|
String planMobile = getPlanMobile(value);
|
||||||
ordersDO.setSupplierProductName(productName);
|
if(planMobile != null){
|
||||||
List<com.doudian.open.api.order_orderDetail.data.SkuSpecsItem> skuSpecs = productInfoItem.getSkuSpecs();
|
ordersDO.setPlanMobile(planMobile);
|
||||||
for (com.doudian.open.api.order_orderDetail.data.SkuSpecsItem skuSpec : skuSpecs) {
|
|
||||||
String name = skuSpec.getName();
|
|
||||||
String planMobile = getPlanMobile(name);
|
|
||||||
if(planMobile != null){
|
|
||||||
ordersDO.setPlanMobile(planMobile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询订单是否存在 不存在则新增,存在则更新
|
// 查询订单是否存在 不存在则新增,存在则更新
|
||||||
|
@ -305,6 +297,14 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
|
||||||
// 106 doudian_trade_TradeCanceled
|
// 106 doudian_trade_TradeCanceled
|
||||||
// 订单取消消息
|
// 订单取消消息
|
||||||
TradeTradeCanceledParam tradeTradeCanceledParam = gson.fromJson(message.getData()+"", TradeTradeCanceledParam.class);
|
TradeTradeCanceledParam tradeTradeCanceledParam = gson.fromJson(message.getData()+"", TradeTradeCanceledParam.class);
|
||||||
|
Long pId = tradeTradeCanceledParam.getPId();
|
||||||
|
// 更新订单取消
|
||||||
|
List<OrdersDO> ordersDOS = ordersMapper.selectList(new LambdaQueryWrapperX<OrdersDO>().eq(OrdersDO::getRealSourceId, pId).eq(OrdersDO::getDeleted, 0));
|
||||||
|
if(CollectionUtil.isNotEmpty(ordersDOS)){
|
||||||
|
OrdersDO ordersDO = ordersDOS.get(0);
|
||||||
|
ordersDO.setRefundStatus("300");
|
||||||
|
ordersMapper.updateById(ordersDO);
|
||||||
|
}
|
||||||
} else if("110".equals(tag)) {
|
} else if("110".equals(tag)) {
|
||||||
// 110 doudian_trade_TradePending
|
// 110 doudian_trade_TradePending
|
||||||
// 订单已支付待处理
|
// 订单已支付待处理
|
||||||
|
@ -417,21 +417,13 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
|
||||||
}
|
}
|
||||||
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
||||||
// 获取计划手机号
|
// 获取计划手机号
|
||||||
for (com.doudian.open.api.order_orderDetail.data.LogisticsInfoItem logisticsInfoItem : logisticsInfo) {
|
String productName = skuOrderListItem.getProductName();
|
||||||
for (com.doudian.open.api.order_orderDetail.data.ProductInfoItem productInfoItem : logisticsInfoItem.getProductInfo()) {
|
ordersDO.setSupplierProductName(productName);
|
||||||
String skuOrderId = productInfoItem.getSkuOrderId();
|
for (com.doudian.open.api.order_orderDetail.data.SpecItem specItem : skuOrderListItem.getSpec()) {
|
||||||
if(skuOrderId.equals(orderId)){
|
String value = specItem.getValue();
|
||||||
String productName = productInfoItem.getProductName();
|
String planMobile = getPlanMobile(value);
|
||||||
ordersDO.setSupplierProductName(productName);
|
if(planMobile != null){
|
||||||
List<com.doudian.open.api.order_orderDetail.data.SkuSpecsItem> skuSpecs = productInfoItem.getSkuSpecs();
|
ordersDO.setPlanMobile(planMobile);
|
||||||
for (com.doudian.open.api.order_orderDetail.data.SkuSpecsItem skuSpec : skuSpecs) {
|
|
||||||
String name = skuSpec.getName();
|
|
||||||
String planMobile = getPlanMobile(name);
|
|
||||||
if(planMobile != null){
|
|
||||||
ordersDO.setPlanMobile(planMobile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询订单是否存在 不存在则新增,存在则更新
|
// 查询订单是否存在 不存在则新增,存在则更新
|
||||||
|
@ -609,21 +601,13 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
|
||||||
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
ordersDO.setRefundStatus(String.valueOf(HaokaOrderRefundStatus));
|
||||||
ordersDO.setStatusName(skuOrderListItem.getOrderStatusDesc());
|
ordersDO.setStatusName(skuOrderListItem.getOrderStatusDesc());
|
||||||
// 获取计划手机号
|
// 获取计划手机号
|
||||||
for (LogisticsInfoItem logisticsInfoItem : logisticsInfo) {
|
String productName = skuOrderListItem.getProductName();
|
||||||
for (ProductInfoItem productInfoItem : logisticsInfoItem.getProductInfo()) {
|
ordersDO.setSupplierProductName(productName);
|
||||||
String skuOrderId = productInfoItem.getSkuOrderId();
|
for (SpecItem specItem : skuOrderListItem.getSpec()) {
|
||||||
if(skuOrderId.equals(orderId)){
|
String value = specItem.getValue();
|
||||||
String productName = productInfoItem.getProductName();
|
String planMobile = getPlanMobile(value);
|
||||||
ordersDO.setSupplierProductName(productName);
|
if(planMobile != null){
|
||||||
List<SkuSpecsItem> skuSpecs = productInfoItem.getSkuSpecs();
|
ordersDO.setPlanMobile(planMobile);
|
||||||
for (SkuSpecsItem skuSpec : skuSpecs) {
|
|
||||||
String name = skuSpec.getName();
|
|
||||||
String planMobile = getPlanMobile(name);
|
|
||||||
if(planMobile != null){
|
|
||||||
ordersDO.setPlanMobile(planMobile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询订单是否存在 不存在则新增,存在则更新
|
// 查询订单是否存在 不存在则新增,存在则更新
|
||||||
|
@ -735,12 +719,12 @@ public class DouDianOrderCatchServiceImpl implements OrderCatchService {
|
||||||
private String getPlanMobile(String skuName) {
|
private String getPlanMobile(String skuName) {
|
||||||
// 去除空格
|
// 去除空格
|
||||||
String noSpace = StringUtils.deleteWhitespace(skuName);
|
String noSpace = StringUtils.deleteWhitespace(skuName);
|
||||||
String pattern = "(?<=\\/)\\d{11}";
|
String pattern = "1\\d{10}";
|
||||||
Pattern compile = Pattern.compile(pattern);
|
Pattern compile = Pattern.compile(pattern);
|
||||||
Matcher matcher = compile.matcher(noSpace);
|
Matcher matcher = compile.matcher(noSpace);
|
||||||
if(matcher.find()){
|
if(matcher.find()){
|
||||||
// 找到匹配手机号
|
// 找到匹配手机号
|
||||||
return matcher.group(1);
|
return matcher.group(0);
|
||||||
}else {
|
}else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue