Authored by chenchao

Merge branch 'dev_6.8.7_order_出售权限' into test6.8.8

# Conflicts:
#	order/src/main/java/com/yohoufo/order/service/impl/SellerOrderDetailService.java
#	order/src/main/java/com/yohoufo/order/service/seller/OrderComputeHandler.java
#	order/src/test/java/com/yohoufo/order/service/SellerOrderServiceTest.java
... ... @@ -14,6 +14,7 @@ import java.math.BigDecimal;
*/
@Data
public class SellerOrderContext {
private int uid;
... ...
... ... @@ -28,6 +28,7 @@ public class SellerOrderComputeHandler extends AbsSellerOrderComputeHandler impl
* @return
*/
protected EarnestMoney calEarnestMoney(BigDecimal prdPrice){
BigDecimal[] EARNEST_MONEY_RANGE = orderDynamicConfig.getEMR();
EarnestMoney earnestMoney = new EarnestMoney();
// earnestMoney.rate 动态可配
... ...
... ... @@ -308,7 +308,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
private String buildOverPriceTips(int storageId, BigDecimal prdPrice){
final String defaultResult = "";
try{
PrdPrice prdPriceRange = productProxyService.getPrdPriceRange(storageId);
PrdPrice prdPriceRange = productProxyService.getPrdPriceRange(null, storageId);
logger.info("in buildOverPriceTips, prdPrice {}, storageId {} prdPriceRange {}", prdPrice, storageId, prdPriceRange);
boolean isOverflow = sellerOrderPrepareProcessor.isOverSuggestMaxPrice(prdPriceRange.getSuggestMaxPrice(), prdPrice);
return isOverflow ? OrderConstant.Tips.SUGGEST_MAX_PRICE_OVERFLOW : defaultResult;
... ...
... ... @@ -76,6 +76,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
private final Logger log = LoggerUtils.getSellerOrderLogger();
@Autowired
private SellerOrderMapper sellerOrderMapper;
... ...
... ... @@ -37,6 +37,8 @@ import java.util.stream.Collectors;
public abstract class AbstractChangePricePrepareProcessor<T extends SellerBaseChangeReq> {
protected final Logger logger = LoggerUtils.getSellerOrderLogger();
@Autowired
private BuyerOrderGoodsMapper buyerOrderGoodsMapper;
... ...
... ... @@ -41,6 +41,7 @@ import java.util.Objects;
public class SellerOrderPrepareProcessor {
private final Logger log = LoggerUtils.getSellerOrderLogger();
@Autowired
private UserProxyService userProxyService;
... ...
... ... @@ -27,6 +27,7 @@ import java.util.Objects;
*/
@Service
public class ImportPublishExcutor implements PublishExcutor<BatchImportPrdReq, SellerOrderSubmitHandler.ForkJoinResult>{
@Builder
@Data
private static class ImPrdNode{
... ...
... ... @@ -10,5 +10,6 @@ import java.math.BigDecimal;
public interface OrderComputeHandler {
SellerOrderComputeResult compute(BigDecimal prdPrice);
SellerOrderComputeResult compute(BigDecimal prdPrice, SellerOrderComputeResult personalComputeConfig);
}
... ...
... ... @@ -19,6 +19,7 @@ import java.util.Optional;
*/
@Component
public class SellerAdvanceOrderComputeHandler extends AbsSellerOrderComputeHandler implements OrderComputeHandler {
@Autowired
private MetaConfigService metaConfigService;
... ...
... ... @@ -10,6 +10,7 @@ import java.util.Objects;
* Created by chao.chen on 2018/12/20.
*/
public class OrderAssist {
public static final String Y = "Y", N = "N";
public static String overFlowPriceKey(Integer storageId, BigDecimal salePrice){
... ...
... ... @@ -5,6 +5,7 @@ import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
import com.yohoufo.order.service.handler.SellerOrderComputeHandler;
import com.yohoufo.order.service.impl.SellerOrderService;
import com.yohoufo.order.utils.OrderAssist;
import org.junit.Test;
import java.math.BigDecimal;
... ... @@ -18,7 +19,8 @@ public class SellerOrderServiceTest {
public void testBuildSoldPrdComputeBo(){
SellerOrderComputeHandler sos = new SellerOrderComputeHandler();
BigDecimal prdPrice = new BigDecimal(100D);
SellerOrderComputeResult bo = sos.compute(prdPrice);
SellerOrderComputeResult bo = sos.compute(prdPrice, null);
System.out.println("in testBuildSoldPrdComputeBo :"+ JSONObject.toJSONString(bo));
}
}
... ...