/*    */ package com.picc.grab.task;
/*    */ 
/*    */ import com.baomidou.mybatisplus.mapper.EntityWrapper;
/*    */ import com.baomidou.mybatisplus.mapper.Wrapper;
/*    */ import com.picc.grab.domain.Piccgrabaccount;
/*    */ import com.picc.grab.service.IBidWinningRaintenanceService;
/*    */ import com.picc.grab.service.IPiccgrabaccountService;
/*    */ import java.util.List;
/*    */ import org.slf4j.Logger;
/*    */ import org.slf4j.LoggerFactory;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.scheduling.annotation.EnableScheduling;
/*    */ import org.springframework.scheduling.annotation.Scheduled;
/*    */ import org.springframework.stereotype.Component;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Component
/*    */ @EnableScheduling
/*    */ public class PICCGuabTask
/*    */ {
/*    */   @Autowired
/*    */   private IPiccgrabaccountService iPiccgrabaccountService;
/*    */   @Autowired
/*    */   private IBidWinningRaintenanceService bidWinningRaintenanceService;
/*    */   private static boolean wc = true;
/* 28 */   private static final Logger logger = LoggerFactory.getLogger(PICCGuabTask.class);
/*    */   
/*    */   @Scheduled(cron = "0 0/30 * * * ?")
/*    */   public void getVehicleDetile() {
/* 32 */     EntityWrapper<Piccgrabaccount> wtfEw = new EntityWrapper();
/* 33 */     wtfEw.eq("logIn", Integer.valueOf(1));
/* 34 */     wtfEw.eq("Isdel", Integer.valueOf(0));
/* 35 */     List<Piccgrabaccount> grabAccountfos = this.iPiccgrabaccountService.selectList((Wrapper)wtfEw);
/* 36 */     if (grabAccountfos != null && grabAccountfos.size() > 0 && wc) {
/* 37 */       wc = false;
/* 38 */       for (Piccgrabaccount model : grabAccountfos) {
/* 39 */         this.iPiccgrabaccountService.getData(model);
/*    */       }
/* 41 */       logger.info("抓取程序结束");
/* 42 */       wc = true;
/*    */     } 
/*    */   }
/*    */   
/*    */   @Scheduled(cron = "0 0/10 * * * ?")
/*    */   public void sendBidPrice() {
/* 48 */     EntityWrapper<Piccgrabaccount> wtfEw = new EntityWrapper();
/* 49 */     wtfEw.eq("logIn", Integer.valueOf(1));
/* 50 */     wtfEw.eq("Isdel", Integer.valueOf(0));
/* 51 */     List<Piccgrabaccount> grabAccountfos = this.iPiccgrabaccountService.selectList((Wrapper)wtfEw);
/* 52 */     if (grabAccountfos != null && grabAccountfos.size() > 0) {
/* 53 */       for (Piccgrabaccount model : grabAccountfos) {
/* 54 */         this.iPiccgrabaccountService.sendBidPrice(model.getId().intValue());
/*    */       }
/*    */     }
/*    */   }
/*    */   
/*    */   @Scheduled(cron = "0 0 0/12 * * ?")
/*    */   public void bidWinning() {
/* 61 */     EntityWrapper<Piccgrabaccount> wtfEw = new EntityWrapper();
/* 62 */     wtfEw.eq("logIn", Integer.valueOf(1));
/* 63 */     wtfEw.eq("Isdel", Integer.valueOf(0));
/* 64 */     List<Piccgrabaccount> grabAccountfos = this.iPiccgrabaccountService.selectList((Wrapper)wtfEw);
/* 65 */     if (grabAccountfos != null && grabAccountfos.size() > 0) {
/* 66 */       for (Piccgrabaccount model : grabAccountfos) {
/* 67 */         this.bidWinningRaintenanceService.bidWinning(model);
/*    */       }
/*    */     }
/*    */   }
/*    */   
/*    */   @Scheduled(cron = "0 0 0/12 * * ?")
/*    */   public void entrustWinning() {
/* 74 */     EntityWrapper<Piccgrabaccount> wtfEw = new EntityWrapper();
/* 75 */     wtfEw.eq("logIn", Integer.valueOf(1));
/* 76 */     wtfEw.eq("Isdel", Integer.valueOf(0));
/* 77 */     List<Piccgrabaccount> grabAccountfos = this.iPiccgrabaccountService.selectList((Wrapper)wtfEw);
/* 78 */     if (grabAccountfos != null && grabAccountfos.size() > 0)
/* 79 */       for (Piccgrabaccount model : grabAccountfos)
/* 80 */         this.bidWinningRaintenanceService.entrustWinning(model);  
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\task\PICCGuabTask.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */