liding
8 天以前 5e99b5312dd1560214719252d07fa4cc2b48082a
src/main/java/com/ruoyi/device/controller/MaintenanceTaskController.java
@@ -7,8 +7,9 @@
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -18,39 +19,39 @@
 * @author :yys
 * @date : 2025/12/22 14:58
 */
@Api(tags = "设备保养定时任务管理")
@Tag(name = "设备保养定时任务管理")
@RestController
@RequestMapping("/deviceMaintenanceTask")
@AllArgsConstructor
public class MaintenanceTaskController extends BaseController {
    @Autowired
    private MaintenanceTaskService maintenanceTaskService;
    @GetMapping("/listPage")
    @ApiOperation(value = "设备保养定时任务列表")
    @Operation(summary = "设备保养定时任务列表")
    public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) {
        return maintenanceTaskService.listPage(page,maintenanceTask);
    }
    @PostMapping("/add")
    @ApiOperation(value = "添加设备保养定时任务")
    @Operation(summary = "添加设备保养定时任务")
    @Log(title = "设备保养定时任务", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody MaintenanceTask maintenanceTask) {
        return maintenanceTaskService.add(maintenanceTask);
    }
    @PostMapping("/update")
    @ApiOperation(value = "修改设备保养定时任务")
    @Operation(summary = "修改设备保养定时任务")
    @Log(title = "设备保养定时任务", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody MaintenanceTask maintenanceTask) {
        return maintenanceTaskService.updateByMaintenanceTaskId(maintenanceTask);
    }
    @DeleteMapping("/delete")
    @ApiOperation(value = "删除设备保养定时任务")
    @Operation(summary = "删除设备保养定时任务")
    @Log(title = "设备保养定时任务", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        return maintenanceTaskService.delete(ids);