package com.pusong.business.batch;

import cn.dev33.satoken.annotation.SaIgnore;
import com.pusong.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@SaIgnore
@RestController
@RequestMapping("/business/approverRecord")
public class BatchController {

    @Autowired
    private CalSalaryBatch calSalaryBatch;

    @GetMapping("/batch")
    public R<Void> batch(){
            calSalaryBatch.setNow(LocalDate.of(2024,9,1));
            calSalaryBatch.execute();
        return R.ok();
    }
}
