admin
2019-11-23 51a4ff5d777028d52a19c314a99f796334cb7b51
fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java
@@ -1,10 +1,13 @@
package com.yeshi.fanli.job;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.yeshi.utils.DateUtil;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.brand.BrandInfoService;
import com.yeshi.fanli.util.Constant;
@@ -23,7 +26,7 @@
   /**
    * 每两个小时进行更新品牌商品信息
    */
   @Scheduled(cron = "0 0 1/2 * * ? ")
//   @Scheduled(cron = "0 0 1/2 * * ? ")
   public void updateGoods() {
      if (!Constant.IS_TASK)
         return;
@@ -32,9 +35,9 @@
      if (count == 0)
         return;
      for (int page = 1; page < (count / 100) + 1; page++) {
         brandInfoService.addShopAndGoods((page - 1) * 100, 100);
      for (int page = 0; page < (count / 80) + 1; page++) {
         brandInfoService.addShopAndGoods(page * 80, 80);
      }
   }
}