Authored by chenchao

change check order

... ... @@ -695,7 +695,7 @@ public class SellerOrderCancelService {
/**
* 目前来看 只有支付过保证金的skup才有下架处理
* TODO 如何控制好并发,必须控制不能重复转账 退款
* 如何控制好并发,必须控制不能重复转账 退款
* 使用乐观锁,带着查询到的状态且符合条件时再去更新
* @param offShelveCancelCase
*/
... ...
... ... @@ -73,23 +73,20 @@ public class NESChangePricePublishPrepareProcessor extends AbsPublishPrepareProc
throw new UfoServiceException(400, "请移步库存管理中变价");
}
//检查是否有买家下单
nesChangePricePrepareProcessor.checkGoodsStatus(psog);
Integer puid = psog.getUid();
if (!puid.equals(uid)){
logger.warn("in ChangePrice can not find one hacker , req {} sys-uid {}", req, puid);
throw new UfoServiceException(400, "你是猴子么");
}
//check whether exists waiting pay order of skup
SkupDto skupOfUnChange = nesChangePricePrepareProcessor.checkExistWaitingBuyerPay(psog);
//检查是否有买家下单
nesChangePricePrepareProcessor.checkGoodsStatus(psog);
BigDecimal salePrice = priceComputePrepareProcessor.checkAndAcquireSalePrice(req.getPrice());
BigDecimal preSalePrice = psog.getGoodsPrice();
//check old price vs new price
checkChangeNecessary(skup, preSalePrice, salePrice);
String tips = null;
PrdPrice prdPrice;
int storageId = psog.getStorageId();
... ...