
package com.lideeyunji.core.framework.config.job;

import com.lideeyunji.core.framework.service.ILideeYunJiService;
import com.lideeyunji.tool.framework.quartz.core.handler.JobHandler;
import com.lideeyunji.tool.framework.tenant.core.aop.TenantIgnore;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 保存模块使用记录
 */
@Slf4j
@Component("saveModelUsageRecordsJob")
public class SaveModelUsageRecordsJob implements JobHandler {

    @Autowired
    private ILideeYunJiService lideeYunJiService;

    @Override
    @TenantIgnore
    public String execute(String param) {
        log.info("*********** 开始保存模块使用记录 ************");
        Integer cou = lideeYunJiService.saveModelUsageRecords();
        String resultStr = "*********** 保存模块使用记录完成，共保存了" + cou + "条 ************";
        log.info(resultStr);
        return resultStr;
    }

}
