package com.wms_main.controller.wms;

import com.wms_main.model.dto.query.JobQuery;
import com.wms_main.model.dto.response.wms.WmsApiResponse;
import com.wms_main.model.vo.wms.JobVo;
import com.wms_main.model.vo.wms.PageVo;
import com.wms_main.service.controller.IJobControllerService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 定时类控制类
 */
@RestController
@ResponseBody
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/wms/job")
public class JobController {
    private final IJobControllerService jobControllerService;

    /**
     * 查询定时任务信息
     * @param jobQuery 查询参数
     * @return 查询结果
     */
    @PostMapping("/queryJobInfoByPage")
    public WmsApiResponse<PageVo<JobVo>> queryJobInfoByPage(@RequestBody JobQuery jobQuery) {
        return jobControllerService.queryJobInfoByPage(jobQuery);
    }
}
