| package com.matrix.system.job; | 
|   | 
| import com.matrix.core.tools.LogUtil; | 
| import com.matrix.system.hive.dao.MoneyCardUseDao; | 
| import com.matrix.system.hive.dao.ShoppingGoodsDao; | 
| import com.matrix.system.hive.dao.SysProjUseDao; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.scheduling.annotation.Scheduled; | 
| import org.springframework.stereotype.Component; | 
|   | 
| /** | 
|  * @author wzy19 | 
|  */ | 
| @Component | 
| public class InvalidTimeJob { | 
|   | 
|     @Autowired | 
|     private SysProjUseDao sysProjUseDao; | 
|   | 
|     @Autowired | 
|     private MoneyCardUseDao moneyCardUseDao; | 
|   | 
|     @Autowired | 
|     private ShoppingGoodsDao shoppingGoodsDao; | 
|   | 
|     @Scheduled(cron = "0 0 0 * * ?") | 
|     public void setProjUseToInvalid() { | 
|         LogUtil.info("#项目,套餐失效任务处理#"); | 
|         sysProjUseDao.updateInvalidProjUse(); | 
|         moneyCardUseDao.updateInvalidMoneyCardUse(); | 
|     } | 
|   | 
|   | 
|     @Scheduled(cron = "0 0 0 * * ?") | 
|     public void setProductAutoSoldOut() { | 
|         LogUtil.info("#商品自动下架任务处理#"); | 
|         shoppingGoodsDao.updateInvalidProduct(); | 
|     } | 
|   | 
|   | 
| } |