Просмотр исходного кода

捐款记录详情路径修改

shicr 8 лет назад
Родитель
Сommit
a8b68e767e

+ 3 - 1
donate-service/src/main/java/com/uas/service/donate/controller/ProjectRecodeController.java

@@ -8,6 +8,7 @@ import com.uas.service.donate.service.ProjectRecodeService;
 import com.uas.service.donate.service.ProjectService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -91,7 +92,8 @@ public class ProjectRecodeController {
      *  根据捐款单号找到该条捐款单据
      */
     @ResponseBody
-    public ProjectRecode findOne(Long id){
+    @RequestMapping(value = "/detail/{id}",method = RequestMethod.GET)
+    public ProjectRecode findOne(@PathVariable("id") Long id){
         return projectRecodeService.findOne(id);
     }
 }