package cn.iocoder.yudao.module.member.job;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.member.service.dishstatistics.DishStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author zt
 * @description <description class purpose>
 * @since 2024/4/22
 */

@Slf4j
@Component
public class StatisticsJob implements JobHandler {


    @Resource
    private DishStatisticsService service;

    @Override
    @TenantIgnore
    public String execute(String param) {
        Integer i = service.addData();
        log.info("[execute][菜品统计任务生成数据 ({}) 个]",i );
        return String.format("菜品统计定时任务生成数 %s 个", i);
    }
}
