Authored by chenchao

Merge branch 'hotfix_出售接口入参控制'

... ... @@ -267,6 +267,18 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
.productId(goodsInfo.getProductId()).build();
return resp;
}
private static final List<Integer> SUPPORT_SKUPTYPES ;
static {
SUPPORT_SKUPTYPES = new ArrayList<>(8);
SUPPORT_SKUPTYPES.add(SkupType.IN_STOCK.getCode());
SUPPORT_SKUPTYPES.add(SkupType.ADVANCE.getCode());
}
private void protectPublish(SellerOrderSubmitReq req){
Integer skupType = req.getSkupType();
if (!SUPPORT_SKUPTYPES.contains(skupType)){
throw new UfoServiceException(400, "请升级至最新版本后操作");
}
}
/**
* 发布商品 + 生成订单
* @param req
... ... @@ -274,6 +286,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
* @throws GatewayException
*/
public OrderSubmitResp publishPrd(SellerOrderSubmitReq req) throws GatewayException {
protectPublish(req);
SellerOrderContext context = sellerOrderPrepareProcessor.buildPublishCtx(req);
boolean isEntryShop = context.isEntryShop();
OrderSubmitResp resp ;
... ...