| | |
| | | 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) {
|
| | |
| | | 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();
|