项目管理接口
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -23,4 +23,5 @@
|
||||
<select id="selectProjectList" resultMap="BaseResultMap">
|
||||
select * from project
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user