Commit 2133e9e1 by huvchao@126.com

顾客更改收货地址不取消配送单

parent 5c99a044
......@@ -30,12 +30,15 @@ import com.freemud.sdk.api.assortment.order.request.order.AssortmentUpdateDelive
import com.freemud.sdk.api.assortment.order.request.order.UpdateDeliveryInfoByIdRequest;
import com.freemud.sdk.api.assortment.order.response.order.OrderBaseResponse;
import com.freemud.sdk.api.assortment.order.service.OrderCenterSdkService;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* All rights Reserved, Designed By www.freemud.cn
*
......@@ -140,11 +143,15 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService {
* @return
*/
public boolean isDeliveryAbnormalAndCustomerChangedAddress(CallbackUrlRequestDto request) {
String str = "顾客更改配送地址";
if (DeliveryStatus.DELIVERYERROR.getCode() == request.getDeliveryStatus()
&& StringUtils.isNotBlank(request.getRemark()) && request.getRemark().contains(str)) {
log.info("isDeliveryAbnormalAndCustomerChangedAddress.true of {}", JSONObject.toJSONString(request));
return true;
if (DeliveryStatus.DELIVERYERROR.getCode() != request.getDeliveryStatus()) return false;
if (StringUtils.isNotBlank(request.getRemark())) return false;
List<String> abnormalDesc = Lists.newArrayList("顾客更改配送地址", "顾客更改收货地址");
for (String str : abnormalDesc) {
if (request.getRemark().contains(str)) {
log.info("isDeliveryAbnormalAndCustomerChangedAddress.true of {}", JSONObject.toJSONString(request));
return true;
}
}
return false;
}
......
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