|
|
@@ -7,12 +7,14 @@ import com.uas.console.donate.service.ProjectEvolveService;
|
|
|
import com.uas.dfs.service.FileClient;
|
|
|
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;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.lang.reflect.Method;
|
|
|
import java.util.Date;
|
|
|
|
|
|
@Controller
|
|
|
@@ -31,7 +33,7 @@ public class ProjectEvolveController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @RequestMapping("/save")
|
|
|
+ @RequestMapping(value = "/save",method = RequestMethod.POST)
|
|
|
public ProjectEvolve save(String jsonStr){
|
|
|
|
|
|
ProjectEvolve projectEvolve= JSONObject.parseObject(jsonStr,ProjectEvolve.class);
|
|
|
@@ -49,7 +51,16 @@ public class ProjectEvolveController {
|
|
|
String path=fileClient.upload(file.getBytes(),file.getSize(),"jpg",null);
|
|
|
|
|
|
return path;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除某一条项目进展
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "/delete/{id}",method = RequestMethod.POST)
|
|
|
+ public ProjectEvolve deleteById(@PathVariable("id") Long id){
|
|
|
+ return projectEvolveService.deleteById(id);
|
|
|
+ }
|
|
|
}
|