Merge branch 'hotfix_1023_test渠道' into test6.9.14
Showing
3 changed files
with
11 additions
and
20 deletions
@@ -17,6 +17,7 @@ import com.yohoufo.order.model.bo.CouponBo; | @@ -17,6 +17,7 @@ import com.yohoufo.order.model.bo.CouponBo; | ||
17 | import com.yohoufo.order.model.bo.CouponBoList; | 17 | import com.yohoufo.order.model.bo.CouponBoList; |
18 | import com.yohoufo.order.model.dto.OrderBuilder; | 18 | import com.yohoufo.order.model.dto.OrderBuilder; |
19 | import com.yohoufo.order.service.impl.ShoppingServiceImpl; | 19 | import com.yohoufo.order.service.impl.ShoppingServiceImpl; |
20 | +import com.yohoufo.order.utils.OrderAssist; | ||
20 | import org.apache.commons.lang3.StringUtils; | 21 | import org.apache.commons.lang3.StringUtils; |
21 | import org.apache.commons.lang3.tuple.Pair; | 22 | import org.apache.commons.lang3.tuple.Pair; |
22 | 23 | ||
@@ -38,13 +39,7 @@ public class OrderBuilderFactory { | @@ -38,13 +39,7 @@ public class OrderBuilderFactory { | ||
38 | ChargeResult chargeResult = chargeContext.getChargeResult(); | 39 | ChargeResult chargeResult = chargeContext.getChargeResult(); |
39 | ChargeGoods chargeGoods = chargeContext.getChargeGoods(); | 40 | ChargeGoods chargeGoods = chargeContext.getChargeGoods(); |
40 | SkupType skupType = chargeGoods.getSkupType(); | 41 | SkupType skupType = chargeGoods.getSkupType(); |
41 | - Integer businessClientCode = null; | ||
42 | - if (StringUtils.isNotBlank(businessClient)){ | ||
43 | - if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) { | ||
44 | - businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode(); | ||
45 | - } | ||
46 | - } | ||
47 | - | 42 | + Integer businessClientCode = OrderAssist.findBusinessClientCode(businessClient); |
48 | return OrderBuilder.builder() | 43 | return OrderBuilder.builder() |
49 | .uid(uid) | 44 | .uid(uid) |
50 | .skup(psog.getId()) | 45 | .skup(psog.getId()) |
@@ -38,6 +38,7 @@ import com.yohoufo.order.service.seller.processor.PriceComputePrepareProcessor; | @@ -38,6 +38,7 @@ import com.yohoufo.order.service.seller.processor.PriceComputePrepareProcessor; | ||
38 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; | 38 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; |
39 | import com.yohoufo.order.utils.AddressHelper; | 39 | import com.yohoufo.order.utils.AddressHelper; |
40 | import com.yohoufo.order.utils.LoggerUtils; | 40 | import com.yohoufo.order.utils.LoggerUtils; |
41 | +import com.yohoufo.order.utils.OrderAssist; | ||
41 | import com.yohoufo.order.utils.SellerHelper; | 42 | import com.yohoufo.order.utils.SellerHelper; |
42 | import org.apache.commons.lang3.StringUtils; | 43 | import org.apache.commons.lang3.StringUtils; |
43 | import org.apache.commons.lang3.tuple.Pair; | 44 | import org.apache.commons.lang3.tuple.Pair; |
@@ -176,13 +177,7 @@ public class SellerBidPublishService { | @@ -176,13 +177,7 @@ public class SellerBidPublishService { | ||
176 | .skup(skup) | 177 | .skup(skup) |
177 | .sellerOrderComputeResult(computeResult) | 178 | .sellerOrderComputeResult(computeResult) |
178 | .addressInfoPair(addressInfoPair) | 179 | .addressInfoPair(addressInfoPair) |
179 | - .businessClient(Optional.ofNullable(request.getBusinessClient()).map(businessClient -> { | ||
180 | - if (OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) { | ||
181 | - return BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode(); | ||
182 | - } else { | ||
183 | - return null; | ||
184 | - } | ||
185 | - }).orElse(null)) | 180 | + .businessClient(OrderAssist.findBusinessClientCode(request.getBusinessClient())) |
186 | .build(); | 181 | .build(); |
187 | //提交订单 | 182 | //提交订单 |
188 | sellerBidOrderBindService.bind(submitSellerOrder); | 183 | sellerBidOrderBindService.bind(submitSellerOrder); |
@@ -109,13 +109,12 @@ public class OrderAssist { | @@ -109,13 +109,12 @@ public class OrderAssist { | ||
109 | } | 109 | } |
110 | 110 | ||
111 | public static Integer findBusinessClientCode(String businessClient){ | 111 | public static Integer findBusinessClientCode(String businessClient){ |
112 | - Integer businessClientCode = null; | ||
113 | - if (StringUtils.isNotBlank(businessClient)){ | ||
114 | - if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) { | ||
115 | - businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT.getCode(); | ||
116 | - } | 112 | + BusinessClientEnum businessClientEnum = findBusinessClient(businessClient); |
113 | + if (businessClientEnum != null){ | ||
114 | + return businessClientEnum.getCode(); | ||
117 | } | 115 | } |
118 | - return businessClientCode; | 116 | + |
117 | + return null; | ||
119 | } | 118 | } |
120 | 119 | ||
121 | 120 | ||
@@ -124,6 +123,8 @@ public class OrderAssist { | @@ -124,6 +123,8 @@ public class OrderAssist { | ||
124 | if (StringUtils.isNotBlank(businessClient)){ | 123 | if (StringUtils.isNotBlank(businessClient)){ |
125 | if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) { | 124 | if(OrderConstant.BusinessClient.TAOBAO_FLEAMARKET.equalsIgnoreCase(businessClient)) { |
126 | businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT; | 125 | businessClientCode = BusinessClientEnum.TAOBAO_FLEAMARKET_CLIENT; |
126 | + }else if(OrderConstant.BusinessClient.TEST.equalsIgnoreCase(businessClient)){ | ||
127 | + businessClientCode = BusinessClientEnum.TEST; | ||
127 | } | 128 | } |
128 | } | 129 | } |
129 | return businessClientCode; | 130 | return businessClientCode; |
-
Please register or login to post a comment