| | |
| | | import com.yeshi.fanli.exception.ActivityException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.activity.ActivityService;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandClassShopGoodsService;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandClassShopService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelService;
|
| | |
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.util.CMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.cache.HttpGoodsCacheManager;
|
| | |
|
| | | /**
|
| | | * 淘宝商品更细
|
| | |
| | |
|
| | | @Resource
|
| | | private TLJBuyGoodsService tljBuyGoodsService;
|
| | |
|
| | | @Resource
|
| | | private BrandClassShopGoodsService brandClassShopGoodsService;
|
| | |
|
| | | @Resource
|
| | | private HttpGoodsCacheManager httpGoodsCacheManager;
|
| | |
|
| | | // 动态商品更新 ,1个小时更新
|
| | | @Scheduled(cron = "0 0 */1 * * ?")
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // 更新品牌商品,每天早上6点执行一次
|
| | | // 更新增加品牌商品,每天早上6点执行一次
|
| | | @Scheduled(cron = "0 0 6 * * ? ")
|
| | | public void updateBrandGoods() {
|
| | | public void updateAddBrandGoods() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | brandClassShopService.updateShopGoods();
|
| | | }
|
| | |
|
| | | // 更新原有精品库的品牌商品,每天凌晨3点执行一次
|
| | | @Scheduled(cron = "0 0 3 * * ? ")
|
| | | public void updateBrandGoods() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | brandClassShopGoodsService.startUpdateGoods();
|
| | | }
|
| | |
|
| | | // 每天凌晨4点模拟请求
|
| | | @Scheduled(cron = "0 0 4 * * ? ")
|
| | | public void simulateRequest() {
|
| | | httpGoodsCacheManager.requestHomeRecommend();
|
| | | httpGoodsCacheManager.requestClassGoods();
|
| | | httpGoodsCacheManager.requestBrandGoods();
|
| | | httpGoodsCacheManager.requestDynamic();
|
| | | httpGoodsCacheManager.requestCommonTemplate();
|
| | | }
|
| | | }
|