|
|
@@ -1,7 +1,6 @@
|
|
|
package com.cyksj.service.mange.goods;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
@@ -16,7 +15,6 @@ import com.cyksj.model.request.YhShopVerifyReq;
|
|
|
import com.cyksj.model.views.GoodsDonSkuView;
|
|
|
import com.cyksj.service.mange.CmsYhShopCommonService;
|
|
|
import com.cyksj.service.mange.business.UserBusinessRateService;
|
|
|
-import com.cyksj.service.shop.YhShopGeneralGoodsRateService;
|
|
|
import com.cyksj.service.shop.YhShopUserPlatDistributeRateService;
|
|
|
import com.cyksj.service.user.UserBenefitsService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
@@ -28,7 +26,6 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
|
|
|
@@ -44,8 +41,6 @@ import java.util.Optional;
|
|
|
public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
|
|
|
private final GoodsDonMapper goodsDonMapper;
|
|
|
|
|
|
- private final YhShopGeneralGoodsRateService yhShopGeneralGoodsRateService;
|
|
|
-
|
|
|
private final YhShopMapper yhShopMapper;
|
|
|
|
|
|
private final YhShopApplyRecordMapper yhShopApplyRecordMapper;
|
|
|
@@ -69,24 +64,6 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
|
|
|
private final UserDistributeMapper userDistributeMapper;
|
|
|
|
|
|
private final YhShopUserPlatDistributeRateMapper yhShopUserPlatDistributeRateMapper;
|
|
|
- @Override
|
|
|
- public void setGeneralGoodsRate(List<YhShopGeneralGoodsRate> rates) {
|
|
|
- List<YhShopGeneralGoodsRate> saveShopGoodsRate = new ArrayList<>(rates.size());
|
|
|
- rates.forEach(data -> {
|
|
|
- Integer rate = data.getRate();
|
|
|
- Long goodsId = data.getGoodsId();
|
|
|
- if (goodsId != null && rate != null && rate >= 0 && rate <= 100) {
|
|
|
- GoodsDon goodsDon = goodsDonMapper.selectById(goodsId);
|
|
|
- if (goodsDon != null) {
|
|
|
- saveShopGoodsRate.add(data);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (CollUtil.isNotEmpty(saveShopGoodsRate)) {
|
|
|
- yhShopGeneralGoodsRateService.saveOrUpdateBatch(saveShopGoodsRate);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Throwable.class)
|