项目管理接口

This commit is contained in:
zhumeixiao
2024-09-26 09:01:39 +08:00
parent 9218c1a510
commit 6498c926ab
3 changed files with 20 additions and 3 deletions

View File

@ -2,12 +2,12 @@ package com.fastbee.data.controller.project;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.core.page.TableDataInfo;
import com.fastbee.project.domain.Project;
import com.fastbee.project.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* <p>
@ -28,5 +28,20 @@ public class ProjectController extends BaseController {
super.startPage();
return super.getDataTable(projectService.list());
}
@GetMapping("/info/{id}")
public AjaxResult getInfo(@PathVariable Long id){
return AjaxResult.success(projectService.getBaseMapper().selectById(id));
}
@PutMapping("/update")
public AjaxResult update(@RequestBody Project project){
projectService.updateById(project);
return AjaxResult.success();
}
@DeleteMapping("/delete/{id}")
public AjaxResult delete(@PathVariable Long id){
projectService.removeById(id);
return AjaxResult.success();
}
}

View File

@ -3,6 +3,7 @@ package com.fastbee.project.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fastbee.project.domain.Project;
import org.apache.ibatis.annotations.Update;
import java.util.List;

View File

@ -23,4 +23,5 @@
<select id="selectProjectList" resultMap="BaseResultMap">
select * from project
</select>
</mapper>