退款模式
This commit is contained in:
@@ -714,17 +714,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
update(update, query().eq(Product::getId, param.getId()).eq(Product::getShopId, shopId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refundToStock(ProdRefundToStockParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
Product entity = super.getOne(query().eq(Product::getId, param.getId()).eq(Product::getShopId, shopId));
|
||||
if (entity == null) {
|
||||
throw new CzgException("商品不存在");
|
||||
}
|
||||
entity.setIsRefundStock(param.getIsReturn());
|
||||
super.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
@@ -148,15 +148,4 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
update(prodCategory, query().eq(ShopProdCategory::getId, id).eq(ShopProdCategory::getShopId, shopId));
|
||||
productService.clearProductCache(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void upRefundStock(Long id, Integer isRefundStock) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
ShopProdCategory prodCategory = new ShopProdCategory();
|
||||
prodCategory.setIsRefundStock(isRefundStock);
|
||||
update(prodCategory, query().eq(ShopProdCategory::getId, id).eq(ShopProdCategory::getShopId, shopId));
|
||||
productService.clearProductCache(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.enums.BranchDataSyncMethodEnum;
|
||||
import com.czg.account.service.ShopConfigService;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import com.czg.account.service.SyncNoticeService;
|
||||
import com.czg.constant.CacheConstant;
|
||||
import com.czg.exception.CzgException;
|
||||
@@ -73,8 +72,6 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
||||
@Resource
|
||||
private ProductRpcService productRpcService;
|
||||
@Resource
|
||||
private ShopUserService shopUserService;
|
||||
@Resource
|
||||
private ShopVendorService vendorService;
|
||||
@DubboReference
|
||||
private ShopCouponService couponService;
|
||||
@@ -658,7 +655,6 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
||||
newEntity.setIsHot(null);
|
||||
newEntity.setIsSoldStock(null);
|
||||
newEntity.setIsSale(null);
|
||||
newEntity.setIsRefundStock(null);
|
||||
productService.updateById(newEntity);
|
||||
} else {
|
||||
newEntity.setId(null);
|
||||
|
||||
Reference in New Issue
Block a user