Authored by wujiexiang

求购商品,买家在卖家发货取消,不需要自动上架

... ... @@ -49,7 +49,7 @@ public class SellerBidPublishRequest {
//卖家和买家不能使同一个
if (bidUid == uid) {
log.warn("bidUid and uid must not be eq,bidUid:{},uid:{}", bidUid, uid);
throw new UfoServiceException(500, "买卖双方不能是同一个人");
throw new UfoServiceException(500, "不能变现自己的求购商品");
}
if (check) {
... ...
... ... @@ -177,8 +177,8 @@ public class BuyerOrderCancelService {
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
int targetGoodsStatus = SkupStatus.BUYER_CANCEL_BEFORE_SELLER_DELIVER.getCode();
int targetSellerOrderStatus = SellerOrderStatus.BUYER_CANCEL_BEFORE_SELLER_DELIVER.getCode();
//重新上架标志
boolean reSellAfterCancel=(OrderAssist.skupIsCommonInStock(psog.getAttributes())||OrderAssist.skupIsAdvance(psog.getAttributes()));
//重新上架标志 求购不需要自动上架
boolean reSellAfterCancel = !psog.isBidSkup() && (OrderAssist.skupIsCommonInStock(psog.getAttributes()) || OrderAssist.skupIsAdvance(psog.getAttributes()));
if(reSellAfterCancel){
targetGoodsStatus = SkupStatus.CAN_SELL.getCode();
targetSellerOrderStatus = SellerOrderStatus.HAS_PAYED.getCode();
... ... @@ -191,7 +191,7 @@ public class BuyerOrderCancelService {
sellerOrderGoodsMapper.updateStatusBySkpu(targetGoods);
logger.info("in buyer cancel BeforeSellerDeliver reSellAfterCancel {}, buyerUid {}, orderCode {}, skup {} buyerOrder {}",
reSellAfterCancel, buyerUid, orderCode, buyerOrder );
reSellAfterCancel, buyerUid, orderCode, skup, buyerOrder);
if(reSellAfterCancel){
// 恢复product skup的库存
boolean isReturnSuccess = productProxyService.returnStorage(skup);
... ...