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.carteenmoney.CarteenMoneyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author:qjq 计算门店流水
 * @Date:2024/4/24 下午3:22
 */
@Component
@Slf4j
public class CarteenMoneyJob implements JobHandler {
    @Resource
    private   CarteenMoneyService carteenMoneyService;
    /**
     * 执行任务
     *
     * @param param 参数
     * @return 结果
     * @throws Exception 异常
     */
    @Override
    @TenantIgnore
    public String execute(String param) throws Exception {
        try {
            carteenMoneyService.insertCarteenMoney();
        } catch (Exception e) {
            return "门店流水计算失败";
        }
        return "门店流水计算成功";
    }
}
