Authored by chenchao

remove useless code

... ... @@ -217,9 +217,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
* @throws GatewayException
*/
public OrderSubmitResp publishPrd(SellerOrderSubmitReq req) throws GatewayException {
//限制:价格必须以9结尾
priceComputePrepareProcessor.checkAndAcquireSalePrice(req.getPrice());
SellerOrderContext context = sellerOrderPrepareProcessor.buildPublishPrdCtx(req);
boolean isEntryShop = context.isEntryShop();
OrderSubmitResp resp ;
... ... @@ -556,9 +553,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
* @return
*/
public BatchChangePriceResp batchChangePrice(BatchChangePriceReq req) throws GatewayException {
//价格必须以9结尾
priceComputePrepareProcessor.checkAndAcquireSalePrice(req.getPrice());
ChangePricePrepareDTO cppDto = changePricePrepareProcessor.checkAndAcquire(req);
BigDecimal preSalePrice = cppDto.getPreSalePrice(),
salePrice = cppDto.getSalePrice();
... ...
... ... @@ -43,12 +43,8 @@ public class PriceComputePrepareProcessor {
log.warn("in checkAndAcquireSalePrice price illegal , price {}", price);
throw new UfoServiceException(400, "没有价格");
}
if(!price.endsWith("9")){
log.warn("in checkAndAcquireSalePrice price illegal , price {}", price);
throw new UfoServiceException(400, "出售价格必须以9结尾");
}
BigDecimal prdPrice = null;
BigDecimal prdPrice;
try{
prdPrice = new BigDecimal(price);
}catch (Exception e){
... ... @@ -62,6 +58,11 @@ public class PriceComputePrepareProcessor {
if(BigDecimalHelper.isDigitalNumber(price)){
throw new UfoServiceException(401, "价格只能为正整数");
}
if(!price.endsWith("9")){
log.warn("in checkAndAcquireSalePrice price illegal , price {}", price);
throw new UfoServiceException(400, "出售价格必须以9结尾");
}
return prdPrice;
}
... ...