| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package com.goafanti.techproject.controller;
- import com.goafanti.common.bo.Result;
- import com.goafanti.common.controller.BaseController;
- import com.goafanti.common.model.TaskAnnualReport;
- import com.goafanti.techproject.service.TaskAnnualReportService;
- 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 javax.annotation.Resource;
- /**
- * 项目年报(TaskAnnualReport)表控制层
- *
- * @author makejava
- * @since 2024-12-26 10:55:04
- */
- @RestController
- @RequestMapping("/api/admin/taskAnnualReport")
- public class TaskAnnualReportController extends BaseController {
- /**
- * 服务对象
- */
- @Resource
- private TaskAnnualReportService taskAnnualReportService;
- /**
- * 新增数据
- *
- * @param taskAnnualReport 实体
- * @return 新增结果
- */
- @PostMapping("/add")
- public Result add(TaskAnnualReport taskAnnualReport) {
- return new Result<>().data(this.taskAnnualReportService.insert(taskAnnualReport));
- }
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("/get")
- public Result<TaskAnnualReport> queryById(Integer id) {
- return new Result<>().data(this.taskAnnualReportService.queryById(id));
- }
- /**
- * 编辑数据
- *
- * @param taskAnnualReport 实体
- * @return 编辑结果
- */
- @PostMapping("/update")
- public Result edit(TaskAnnualReport taskAnnualReport) {
- return new Result<>().data(this.taskAnnualReportService.update(taskAnnualReport));
- }
- /**
- * 删除数据
- *
- * @param id 主键
- * @return 删除是否成功
- */
- @GetMapping("/delete")
- public Result deleteById(Integer id) {
- return new Result<>().data(this.taskAnnualReportService.deleteById(id));
- }
- /**
- * 列表查询
- *
- * @param in 参数
- * @return
- */
- @GetMapping("/list")
- public Result<TaskAnnualReport> list(TaskAnnualReport in, Integer pageNo, Integer pageSize) {
- return new Result<>().data(this.taskAnnualReportService.list(in, pageNo, pageSize));
- }
- }
|