935090232@qq.com
2022-02-22 bbe0a2fd03063316e50cf141986bda984599bbda
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
@@ -1,7 +1,6 @@
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.ShopActivitiesGroupJoin;
import com.matrix.system.shopXcx.bean.ShopActivitiesGroupJoinUser;
@@ -9,11 +8,8 @@
import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinDao;
import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinUserDao;
import com.matrix.system.shopXcx.dao.ShopOrderDao;
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;
@@ -24,7 +20,6 @@
 * @author wzy
 */
@Configuration
@EnableScheduling
public class ShopActivityPayTimeOutQuartz {
    @Autowired
@@ -36,13 +31,11 @@
    @Autowired
    private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao;
    @Value("${scheduling.enabled}")
    private boolean taskSwitch;
    @Scheduled(cron = "0 */1 * * * ?")
    public void executeExt() {
        if (taskSwitch) {
            LogUtil.info("#拼团支付超时处理任务#");
            List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserEnd();
            if (CollectionUtils.isNotEmpty(joinUserList)) {
@@ -63,7 +56,7 @@
                    shopOrder.setOrderStatus(ShopOrder.ORDER_STATUS_CANCEL);
                    shopOrderDao.updateByModel(shopOrder);
                }
            }
        }
    }
}