package com.base.biz.controller;

import com.base.biz.model.dto.FzTaskDTO;
import com.base.biz.model.dto.InstanceInfoDTO;
import com.base.biz.model.dto.request.FzTaskInfoReqDTO;
import com.base.biz.model.dto.request.FzTaskInfoUpdateDTO;
import com.base.biz.service.FzTaskService;
import com.base.orbit.web.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController

@RequestMapping("/api/fz")
public class FzTaskController {

    @Resource
    FzTaskService fzTaskService;

    @ApiOperation(value = "查询任务列表",response = FzTaskDTO.class)
    @GetMapping("/list")
    public Object getFzTaskDTOList(FzTaskInfoReqDTO req){
        return Result.success(fzTaskService.getFzTaskDTOList(req));
    }

    @ApiOperation(value = "更新任务")
    @PostMapping("/update")
    public Object updateTaskDTO(@RequestBody FzTaskInfoUpdateDTO req){
        fzTaskService.updateFzTask(req);
        return Result.success();
    }

}
