...
|
...
|
@@ -152,6 +152,13 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
}
|
|
|
}
|
|
|
|
|
|
void checkIncome(int storageId, BigDecimal income) throws GatewayException {
|
|
|
if (income == null || income.compareTo(BigDecimal.ZERO) <= 0){
|
|
|
log.warn("in checkIncome,storageId {}, income {}", income);
|
|
|
throw new GatewayException(501, "别闹了,这个售价没有收入");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 发布商品 + 生成订单
|
|
|
* @param req
|
...
|
...
|
@@ -175,6 +182,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
checkPrice(storageId, goodsInfo.getPrice());
|
|
|
// compute every fee from price
|
|
|
SellerOrderComputeResult computeResult = computeHandler.compute(goodsInfo.getPrice());
|
|
|
checkIncome(storageId, computeResult.getIncome());
|
|
|
log.info("in publishPrd , uid {}, storageId {}, price {}, computeResult {}", uid, storageId,
|
|
|
goodsInfo.getPrice(), computeResult);
|
|
|
context.setSellerOrderComputeResult(computeResult);
|
...
|
...
|
@@ -417,7 +425,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
*/
|
|
|
public Object queryLogistics(int uid, long buyerOrderCode, String expressNum){
|
|
|
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
|
...
|
...
|
|