|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.quartz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.core.tools.LogUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.WebUtil; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.ShopOrder; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.ShopOrderDao; | 
|---|
|  |  |  | import org.apache.commons.collections.CollectionUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.HashMap; | 
|---|
|  |  |  | 
|---|
|  |  |  | * 15天自动确认收货定时任务 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Configuration | 
|---|
|  |  |  | @EnableScheduling | 
|---|
|  |  |  | public class ShopAutomaticReceiveQuartz { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${scheduling.enabled}") | 
|---|
|  |  |  | private boolean taskSwitch; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ShopDeliveryInfoDao shopDeliveryInfoDao; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0/30 * * * * ?") | 
|---|
|  |  |  | public void executeExt() { | 
|---|
|  |  |  | if(taskSwitch) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | LogUtil.info("#15天自动收货任务处理#"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<ShopDeliveryInfo> shopDeliveryInfos = shopDeliveryInfoDao.selectAutomaticReceive(); | 
|---|
|  |  |  | int flag = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | LogUtil.info("自动确认收货更新条数:" + flag); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|