admin
2020-07-01 c54fb6a88876be994906d57d2d18e844686964d0
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/PullNewGoodsServiceImpl.java
@@ -11,13 +11,17 @@
import com.yeshi.fanli.entity.goods.PullNewGoods;
import com.yeshi.fanli.entity.taobao.haodanku.HDKGoodsDetail;
import com.yeshi.fanli.service.inter.goods.PullNewGoodsService;
import com.yeshi.fanli.util.taobao.HaoDanKuApiUtil;
import com.yeshi.fanli.service.inter.redpack.RedPackConfigService;
@Service
public class PullNewGoodsServiceImpl implements PullNewGoodsService {
   
   @Resource
   private PullNewGoodsDao pullNewGoodsDao;
   @Resource
   private RedPackConfigService redPackConfigService;
   
   @Override
   public void saveGoods(PullNewGoods pullNewGoods) {
@@ -47,14 +51,17 @@
      if (list == null || list.size() == 0)
         return;
      
       double limitRate =  Double.valueOf(redPackConfigService.getValueByKey("goods_reate_limit"));
       double limitPrice =  Double.valueOf(redPackConfigService.getValueByKey("goods_pay_ment_limit"));
      // 佣金比例大于50%
      if (goods.getTkrates() == null || goods.getTkrates() < 50)
      if (goods.getTkrates() == null || goods.getTkrates() < limitRate)
         return;
      // 是否存在券
      if (goods.getCouponmoney() == null || goods.getCouponmoney() <= 0)
         return;
      // 商品券后价大于9.9元
      if (goods.getItemendprice() == null || goods.getItemendprice() <= 9.9)
      if (goods.getItemendprice() == null || goods.getItemendprice() < limitPrice)
         return;
      
      PullNewGoods pullNewGoods = new PullNewGoods();