Authored by tanling

Merge branch 'hotfix_1023_test渠道' into test6.9.14

... ... @@ -17,6 +17,7 @@ import com.yohoufo.order.model.bo.CouponBo;
import com.yohoufo.order.model.bo.CouponBoList;
import com.yohoufo.order.model.dto.OrderBuilder;
import com.yohoufo.order.service.impl.ShoppingServiceImpl;
import com.yohoufo.order.utils.OrderAssist;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
... ... @@ -38,13 +39,7 @@ public class OrderBuilderFactory {
ChargeResult chargeResult = chargeContext.getChargeResult();
ChargeGoods chargeGoods = chargeContext.getChargeGoods();
SkupType skupType = chargeGoods.getSkupType();
Integer businessClientCode = null;
if (StringUtils.isNotBlank(businessClient)){
if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) {
businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode();
}
}
Integer businessClientCode = OrderAssist.findBusinessClientCode(businessClient);
return OrderBuilder.builder()
.uid(uid)
.skup(psog.getId())
... ...
... ... @@ -38,6 +38,7 @@ import com.yohoufo.order.service.seller.processor.PriceComputePrepareProcessor;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import com.yohoufo.order.utils.AddressHelper;
import com.yohoufo.order.utils.LoggerUtils;
import com.yohoufo.order.utils.OrderAssist;
import com.yohoufo.order.utils.SellerHelper;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
... ... @@ -176,13 +177,7 @@ public class SellerBidPublishService {
.skup(skup)
.sellerOrderComputeResult(computeResult)
.addressInfoPair(addressInfoPair)
.businessClient(Optional.ofNullable(request.getBusinessClient()).map(businessClient -> {
if (OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) {
return BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode();
} else {
return null;
}
}).orElse(null))
.businessClient(OrderAssist.findBusinessClientCode(request.getBusinessClient()))
.build();
//提交订单
sellerBidOrderBindService.bind(submitSellerOrder);
... ...
... ... @@ -109,13 +109,12 @@ public class OrderAssist {
}
public static Integer findBusinessClientCode(String businessClient){
Integer businessClientCode = null;
if (StringUtils.isNotBlank(businessClient)){
if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) {
businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode();
}
BusinessClientEnum businessClientEnum = findBusinessClient(businessClient);
if (businessClientEnum != null){
return businessClientEnum.getCode();
}
return businessClientCode;
return null;
}
... ... @@ -124,6 +123,8 @@ public class OrderAssist {
if (StringUtils.isNotBlank(businessClient)){
if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) {
businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT;
}else if(OrderConstant.BusinessClient.TEST.equalsIgnoreCase(businessClient)){
businessClientCode = BusinessClientEnum.TEST;
}
}
return businessClientCode;
... ...