|
|
@@ -83,7 +83,7 @@ public class ProjectController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/findAll")
|
|
|
+ @RequestMapping(value = "/findAll",method = RequestMethod.GET)
|
|
|
public List<Project> getProjects(){
|
|
|
return projectService.findProjects();
|
|
|
}
|
|
|
@@ -94,7 +94,7 @@ public class ProjectController {
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping("/getProjects")
|
|
|
+ @RequestMapping(value = "/getProjects",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public Page<Project> findAll(@RequestParam(value = "page",defaultValue = "0")int page,
|
|
|
@RequestParam(value = "size",defaultValue = "7")int size){
|
|
|
@@ -106,7 +106,7 @@ public class ProjectController {
|
|
|
* 对领域和执行状态同时进行查询
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/searchAreaAndStatus")
|
|
|
+ @RequestMapping(value = "/searchAreaAndStatus",method = RequestMethod.GET)
|
|
|
public Page<Project> searchAreaAndStatus(String area,String status,int page,int size){
|
|
|
Pageable pageable=new PageRequest(page,size);
|
|
|
if("进行中".equals(status)){
|
|
|
@@ -121,7 +121,7 @@ public class ProjectController {
|
|
|
* 根据项目状态获取列表
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/status")
|
|
|
+ @RequestMapping(value = "/status",method = RequestMethod.GET)
|
|
|
public Page<Project> findStatus(String status,int page ,int size){
|
|
|
Pageable pageable=new PageRequest(page,size);
|
|
|
if("进行中".equals(status)){
|
|
|
@@ -137,7 +137,7 @@ public class ProjectController {
|
|
|
* 查询出所有执行中项目
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/inprocess")
|
|
|
+ @RequestMapping(value = "/inprocess",method = RequestMethod.GET)
|
|
|
public Page<Project> findInProcess(@RequestParam(value = "page",defaultValue = "0")int page,
|
|
|
@RequestParam(value = "size",defaultValue = "7")int size){
|
|
|
Pageable pageable=new PageRequest(page,size);
|
|
|
@@ -151,7 +151,7 @@ public class ProjectController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/endproject")
|
|
|
+ @RequestMapping(value = "/endproject",method = RequestMethod.GET)
|
|
|
public Page<Project> findEndProject(@RequestParam(value = "page",defaultValue = "0")int page,
|
|
|
@RequestParam(value = "size",defaultValue = "7")int size){
|
|
|
Pageable pageable=new PageRequest(page,size);
|
|
|
@@ -164,7 +164,7 @@ public class ProjectController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/area")
|
|
|
+ @RequestMapping(value = "/area",method = RequestMethod.GET)
|
|
|
public List<Project> findArea(String area){
|
|
|
return projectService.findArea(area);
|
|
|
}
|
|
|
@@ -173,7 +173,7 @@ public class ProjectController {
|
|
|
*获取特定领域的项目分页
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/pageArea")
|
|
|
+ @RequestMapping(value = "/pageArea",method = RequestMethod.GET)
|
|
|
public Page<Project> findPageArea(@RequestParam(value = "page",defaultValue = "0")int page,
|
|
|
@RequestParam(value = "size",defaultValue = "7")int size,
|
|
|
String area){
|
|
|
@@ -188,7 +188,7 @@ public class ProjectController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/detail/{id}")
|
|
|
+ @RequestMapping(value = "/detail/{id}",method = RequestMethod.GET)
|
|
|
public Project showDetail(@PathVariable("id") Long id) {
|
|
|
return projectService.findOne(id);
|
|
|
}
|
|
|
@@ -197,7 +197,7 @@ public class ProjectController {
|
|
|
* 根据搜索框查找相应项目
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/search")
|
|
|
+ @RequestMapping(value = "/search",method = RequestMethod.GET)
|
|
|
public List<Project> search(String search){
|
|
|
return projectService.search(search);
|
|
|
}
|
|
|
@@ -207,7 +207,7 @@ public class ProjectController {
|
|
|
* 根据搜索框查找相应项目
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/searchPage")
|
|
|
+ @RequestMapping(value = "/searchPage",method = RequestMethod.GET)
|
|
|
public Page<Project> searchPage(@RequestParam("search")String search,int page,int size){
|
|
|
Pageable pageable=new PageRequest(page,size);
|
|
|
return projectService.searchPage(pageable,search);
|