package com.ruoyi.quartz.task;

import com.ruoyi.mall.service.ProductShowService;
import com.ruoyi.school.member.service.IScMemberCardService;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.SysTenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("yogaTask")
public class YogaTask {

    @Autowired
    private ProductShowService productShowService;
    @Autowired
    private SysTenantService sysTenantService;
    @Autowired
    private ISysDeptService deptService;
    @Autowired
    private IScMemberCardService memberCardService;

    /**
     * 定时上架商品展示（每天00:01执行）
     */
    public void onSaleProductShow() {
        productShowService.onSaleProductShow();
    }

    /**
     * 定时过期商品展示（每天00:02执行）
     */
    public void expireProductShow() {
        productShowService.expireProductShow();
    }

    /**
     * 过期租户修改状态（每天00:03执行）
     */
    public void expireTenant() {
        sysTenantService.expireTenant();
    }

    /**
     * 过期场馆（每天00:04执行）
     */
    public void expireDept() {
        deptService.expireDept();
    }
    /**
     * 过期会员卡（每天00:05执行）
     */
    public void expireMemberCard() {
        memberCardService.expiredMemberCard();
    }

}
