| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Scheduled(cron = "0 0/2 * * * ? ")
|
| | | private void addPullNewGoods2() {
|
| | | addPullNewGoods();
|
| | | }
|
| | | |
| | | /**
|
| | | * 拉新商品
|
| | | */
|
| | |
| | | // 商品比例限制
|
| | | double limitRate = Double.valueOf(redPackConfigService.getValueByKey("goods_reate_limit"));
|
| | | double limitPrice = Double.valueOf(redPackConfigService.getValueByKey("goods_pay_ment_limit"));
|
| | | |
| | | |
| | | Integer array[] = {3,4,5,6,7,8,9,10,11,12,15};
|
| | | for (Integer catId: array) {
|
| | | Integer minId = 1;
|
| | |
| | | if (goods.getCouponmoney() == null || goods.getCouponmoney() <= 0)
|
| | | continue;
|
| | | // 商品券后价大于9.9元
|
| | | if (goods.getItemendprice() == null || goods.getItemendprice() <= limitPrice)
|
| | | if (goods.getItemendprice() == null || goods.getItemendprice() < limitPrice)
|
| | | continue;
|
| | |
|
| | | PullNewGoods pullNewGoods = new PullNewGoods();
|