Files
FT576WCS/ruoyi-admin/src/main/java/com/ruoyi/job/controller/MydoJobDetailController.java
1009473166@qq.com ca32a48223 first commit
2026-07-31 13:57:52 +08:00

66 lines
2.6 KiB
Java

package com.ruoyi.job.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.job.domain.MydoJobDetail;
import com.ruoyi.job.service.IMydoJobDetailService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/job/detail")
public class MydoJobDetailController extends BaseController {
private final IMydoJobDetailService mydoJobDetailService;
public MydoJobDetailController(IMydoJobDetailService mydoJobDetailService) {
this.mydoJobDetailService = mydoJobDetailService;
}
@PreAuthorize("@ss.hasPermi('job:detail:list')")
@GetMapping("/list")
public TableDataInfo list(MydoJobDetail detail) {
startPage();
List<MydoJobDetail> list = mydoJobDetailService.selectMydoJobDetailList(detail);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('job:detail:query')")
@GetMapping("/{jobDetailId}")
public AjaxResult getInfo(@PathVariable String jobDetailId) {
return success(mydoJobDetailService.selectMydoJobDetailById(jobDetailId));
}
@PreAuthorize("@ss.hasPermi('job:detail:add')")
@Log(title = "????", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MydoJobDetail detail) {
return toAjax(mydoJobDetailService.insertMydoJobDetail(detail));
}
@PreAuthorize("@ss.hasPermi('job:detail:edit')")
@Log(title = "????", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MydoJobDetail detail) {
return toAjax(mydoJobDetailService.updateMydoJobDetail(detail));
}
@PreAuthorize("@ss.hasPermi('job:detail:remove')")
@Log(title = "????", businessType = BusinessType.DELETE)
@DeleteMapping("/{jobDetailIds}")
public AjaxResult remove(@PathVariable String[] jobDetailIds) {
return toAjax(mydoJobDetailService.deleteMydoJobDetailByIds(jobDetailIds));
}
}