|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.quartz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.core.tools.LogUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.WebUtil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.system.hive.plugin.util.CollectionUtils; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopActivities; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupInfo; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoin; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.context.annotation.Configuration; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.EnableScheduling; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @author wzy | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Configuration | 
|---|
|  |  |  | @EnableScheduling | 
|---|
|  |  |  | public class ShopActivityGroupJoinTimeOutQuartz { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ShopActivitiesDao shopActivitiesDao ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${scheduling.enabled}") | 
|---|
|  |  |  | private boolean taskSwitch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0 */1 * * * ?") | 
|---|
|  |  |  | public boolean executeExt() { | 
|---|
|  |  |  | if (taskSwitch) { | 
|---|
|  |  |  | LogUtil.info("#开团时间超时任务处理#"); | 
|---|
|  |  |  | List<ShopActivitiesGroupJoin> groupJoins = shopActivitiesGroupJoinDao.selectGroupJoinWithEnd(); | 
|---|
|  |  |  | ShopActivityTimeOutQuartz timeOutQuartz = new ShopActivityTimeOutQuartz(); | 
|---|
|  |  |  | 
|---|
|  |  |  | timeOutQuartz.doUnVirtualGroup(groupJoin); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|