退款模式
This commit is contained in:
@@ -21,7 +21,6 @@ import com.czg.config.RedisCst;
|
||||
import com.czg.constant.MarketConstants;
|
||||
import com.czg.constant.TableValueConstant;
|
||||
import com.czg.constants.PayTypeConstants;
|
||||
import com.czg.constants.SystemConstants;
|
||||
import com.czg.entity.notify.CzgRefundNotifyDTO;
|
||||
import com.czg.enums.ShopTableStatusEnum;
|
||||
import com.czg.enums.ShopUserFlowBizEnum;
|
||||
@@ -1841,7 +1840,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
*/
|
||||
@Override
|
||||
public void refundStock(ShopInfo shopInfo, Long orderId, Map<Long, BigDecimal> products, boolean refundStock) {
|
||||
List<Product> list = productService.list(new QueryWrapper().select(Product::getId, Product::getCategoryId, Product::getRefundMode, Product::getIsRefundStock)
|
||||
List<Product> list = productService.list(new QueryWrapper().select(Product::getId, Product::getCategoryId, Product::getRefundMode)
|
||||
.eq(Product::getShopId, shopInfo.getId())
|
||||
.in(Product::getId, products.keySet()));
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
@@ -1855,7 +1854,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
//分类
|
||||
if (!categoryMap.containsKey(product.getCategoryId())) {
|
||||
refundMode = shopProdCategoryService.getOneAs(new QueryWrapper().select(ShopProdCategory::getRefundMode)
|
||||
.eq(ShopProdCategory::getShopId, shopInfo.getId()).eq(ShopProdCategory::getIsRefundStock, SystemConstants.OneZero.ONE)
|
||||
.eq(ShopProdCategory::getShopId, shopInfo.getId())
|
||||
.eq(ShopProdCategory::getId, product.getCategoryId()), Integer.class);
|
||||
if (refundMode == null) {
|
||||
refundMode = 2;
|
||||
@@ -1866,11 +1865,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
}
|
||||
} else if (shopInfo.getRefundMode().equals(2)) {
|
||||
//单商品
|
||||
if (product.getIsRefundStock().equals(SystemConstants.OneZero.ONE)) {
|
||||
refundMode = product.getRefundMode();
|
||||
} else {
|
||||
refundMode = 2;
|
||||
}
|
||||
refundMode = 2;
|
||||
} else {
|
||||
log.error("退菜模式错误 店铺{},退款模式{},商品Id{}分类Id{}", shopInfo.getShopName(), shopInfo.getRefundMode(), product.getId(), product.getCategoryId());
|
||||
throw new CzgException("退菜模式错误");
|
||||
|
||||
Reference in New Issue
Block a user