package com.malk.jiuan.controller;

import com.malk.jiuan.service.JiuanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class JiuanController {

    @Autowired
    private JiuanService jiuanService;

    /*@Scheduled(cron = "0 0 * * * ?")
    public void test(){
        log.info("定时任务执行");
    }*/

    //每日定时转换门店流水数据
    @Scheduled(cron = "0 50 23 * * ?")
    @GetMapping("/convertFile")
    public void convertFile(){
        jiuanService.convertFile();
    }
}
