Authored by chenchao

fix

... ... @@ -415,6 +415,9 @@
and sog.storage_id = #{condition.storageId,jdbcType=INTEGER}
and so.payment = #{payment,jdbcType=INTEGER}
and sog.goods_price = #{condition.goodsPrice,jdbcType=DECIMAL}
<if test="condition.attributes != null">
and sog.attributes = #{condition.attributes,jdbcType=INTEGER}
</if>
and sog.status in
<foreach collection="statusList" item="status" open="(" close=")" separator=",">
#{status,jdbcType=TINYINT}
... ...
... ... @@ -33,6 +33,7 @@ public class AdjustPricePrepareProcessor extends AbstractChangePricePrepareProce
condition.setProductId(req.getProductId());
condition.setStorageId(req.getStorageId());
condition.setGoodsPrice(req.getOldPrice());
condition.setAttributes(req.getSkupType());
return sellerOrderGoodsMapper.selectByPayment(Payment.WALLET.getCode(), condition, Arrays.asList(SkupStatus.CAN_SELL.getCode()), req.getNum());
}
... ...
... ... @@ -68,10 +68,11 @@ public class SellerDownShelfPrepareProcessor {
condition.setProductId(req.getProductId());
condition.setStorageId(req.getStorageId());
condition.setGoodsPrice(req.getOldPrice());
condition.setAttributes(req.getSkupType());
List<SellerOrderGoods> sellerOrderGoodList = sellerOrderGoodsMapper.selectByPayment(Payment.WALLET.getCode(), condition, CAN_OFF_STATUS, req.getNum());
if (CollectionUtils.isEmpty(sellerOrderGoodList)) {
logger.warn("batch off shelve checkAndAcquire not find skups by batchNo, req {}", req);
throw new UfoServiceException(501, "商品不存在");
throw new UfoServiceException(501, "商品已被下单购买");
}
List<Integer> skups = sellerOrderGoodList.parallelStream().map(SellerOrderGoods::getId).collect(Collectors.toList());
logger.info("batch off shelve price checkExistWaitingBuyerPay req {} skups in db {}", req, skups);
... ...