Authored by chenchao

lc

@@ -15,6 +15,7 @@ import java.math.BigDecimal; @@ -15,6 +15,7 @@ import java.math.BigDecimal;
15 @Data 15 @Data
16 public class SellerOrderContext { 16 public class SellerOrderContext {
17 17
  18 +
18 private int uid; 19 private int uid;
19 20
20 private boolean isEntryShop; 21 private boolean isEntryShop;
@@ -29,6 +29,7 @@ public class SellerOrderComputeHandler extends AbsSellerOrderComputeHandler impl @@ -29,6 +29,7 @@ public class SellerOrderComputeHandler extends AbsSellerOrderComputeHandler impl
29 * @return 29 * @return
30 */ 30 */
31 protected EarnestMoney calEarnestMoney(BigDecimal prdPrice){ 31 protected EarnestMoney calEarnestMoney(BigDecimal prdPrice){
  32 +
32 BigDecimal[] EARNEST_MONEY_RANGE = orderDynamicConfig.getEMR(); 33 BigDecimal[] EARNEST_MONEY_RANGE = orderDynamicConfig.getEMR();
33 EarnestMoney earnestMoney = new EarnestMoney(); 34 EarnestMoney earnestMoney = new EarnestMoney();
34 // earnestMoney.rate 动态可配 35 // earnestMoney.rate 动态可配
@@ -308,6 +308,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I @@ -308,6 +308,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
308 private String buildOverPriceTips(int storageId, BigDecimal prdPrice){ 308 private String buildOverPriceTips(int storageId, BigDecimal prdPrice){
309 final String defaultResult = ""; 309 final String defaultResult = "";
310 try{ 310 try{
  311 +
311 PrdPrice prdPriceRange = productProxyService.getPrdPriceRange(null, storageId); 312 PrdPrice prdPriceRange = productProxyService.getPrdPriceRange(null, storageId);
312 logger.info("in buildOverPriceTips, prdPrice {}, storageId {} prdPriceRange {}", prdPrice, storageId, prdPriceRange); 313 logger.info("in buildOverPriceTips, prdPrice {}, storageId {} prdPriceRange {}", prdPrice, storageId, prdPriceRange);
313 boolean isOverflow = sellerOrderPrepareProcessor.isOverSuggestMaxPrice(prdPriceRange.getSuggestMaxPrice(), prdPrice); 314 boolean isOverflow = sellerOrderPrepareProcessor.isOverSuggestMaxPrice(prdPriceRange.getSuggestMaxPrice(), prdPrice);
@@ -76,6 +76,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi @@ -76,6 +76,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
76 76
77 private final Logger log = LoggerUtils.getSellerOrderLogger(); 77 private final Logger log = LoggerUtils.getSellerOrderLogger();
78 78
  79 +
  80 +
79 @Autowired 81 @Autowired
80 private SellerOrderMapper sellerOrderMapper; 82 private SellerOrderMapper sellerOrderMapper;
81 83
@@ -40,6 +40,8 @@ public abstract class AbstractChangePricePrepareProcessor<T extends SellerBaseCh @@ -40,6 +40,8 @@ public abstract class AbstractChangePricePrepareProcessor<T extends SellerBaseCh
40 40
41 protected final Logger logger = LoggerUtils.getSellerOrderLogger(); 41 protected final Logger logger = LoggerUtils.getSellerOrderLogger();
42 42
  43 +
  44 +
43 @Autowired 45 @Autowired
44 private BuyerOrderGoodsMapper buyerOrderGoodsMapper; 46 private BuyerOrderGoodsMapper buyerOrderGoodsMapper;
45 47
@@ -42,6 +42,7 @@ public class SellerOrderPrepareProcessor { @@ -42,6 +42,7 @@ public class SellerOrderPrepareProcessor {
42 42
43 private final Logger log = LoggerUtils.getSellerOrderLogger(); 43 private final Logger log = LoggerUtils.getSellerOrderLogger();
44 44
  45 +
45 @Autowired 46 @Autowired
46 private UserProxyService userProxyService; 47 private UserProxyService userProxyService;
47 48
@@ -27,6 +27,7 @@ import java.util.Objects; @@ -27,6 +27,7 @@ import java.util.Objects;
27 */ 27 */
28 @Service 28 @Service
29 public class ImportPublishExcutor implements PublishExcutor<BatchImportPrdReq, SellerOrderSubmitHandler.ForkJoinResult>{ 29 public class ImportPublishExcutor implements PublishExcutor<BatchImportPrdReq, SellerOrderSubmitHandler.ForkJoinResult>{
  30 +
30 @Builder 31 @Builder
31 @Data 32 @Data
32 private static class ImPrdNode{ 33 private static class ImPrdNode{
@@ -11,4 +11,5 @@ public interface OrderComputeHandler { @@ -11,4 +11,5 @@ public interface OrderComputeHandler {
11 11
12 12
13 SellerOrderComputeResult compute(BigDecimal prdPrice, SellerOrderComputeResult personalComputeConfig); 13 SellerOrderComputeResult compute(BigDecimal prdPrice, SellerOrderComputeResult personalComputeConfig);
  14 +
14 } 15 }
@@ -19,6 +19,7 @@ import java.util.Optional; @@ -19,6 +19,7 @@ import java.util.Optional;
19 */ 19 */
20 @Component 20 @Component
21 public class SellerAdvanceOrderComputeHandler extends AbsSellerOrderComputeHandler implements OrderComputeHandler { 21 public class SellerAdvanceOrderComputeHandler extends AbsSellerOrderComputeHandler implements OrderComputeHandler {
  22 +
22 @Autowired 23 @Autowired
23 private MetaConfigService metaConfigService; 24 private MetaConfigService metaConfigService;
24 25
@@ -14,6 +14,7 @@ import java.util.Objects; @@ -14,6 +14,7 @@ import java.util.Objects;
14 * Created by chao.chen on 2018/12/20. 14 * Created by chao.chen on 2018/12/20.
15 */ 15 */
16 public class OrderAssist { 16 public class OrderAssist {
  17 +
17 public static final String Y = "Y", N = "N"; 18 public static final String Y = "Y", N = "N";
18 19
19 public static String overFlowPriceKey(Integer storageId, BigDecimal salePrice){ 20 public static String overFlowPriceKey(Integer storageId, BigDecimal salePrice){
@@ -20,6 +20,7 @@ public class SellerOrderServiceTest { @@ -20,6 +20,7 @@ public class SellerOrderServiceTest {
20 SellerOrderComputeHandler sos = new SellerOrderComputeHandler(); 20 SellerOrderComputeHandler sos = new SellerOrderComputeHandler();
21 BigDecimal prdPrice = new BigDecimal(100D); 21 BigDecimal prdPrice = new BigDecimal(100D);
22 SellerOrderComputeResult bo = sos.compute(prdPrice, null); 22 SellerOrderComputeResult bo = sos.compute(prdPrice, null);
  23 +
23 System.out.println("in testBuildSoldPrdComputeBo :"+ JSONObject.toJSONString(bo)); 24 System.out.println("in testBuildSoldPrdComputeBo :"+ JSONObject.toJSONString(bo));
24 } 25 }
25 } 26 }