对接文件删除

0927cmt
zhaoyu 2024-03-14 14:47:58 +08:00
parent c9ac2204df
commit e2d229241d
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.util.*;
import org.apache.commons.lang.StringUtils;
@ -247,6 +248,7 @@ public class ImgFilesController extends BaseController {
*/
@RequestMapping(value="/delete")
@ResponseBody
@DockAnnotation
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
@ -256,6 +258,7 @@ public class ImgFilesController extends BaseController {
File file = new File(PathUtil.getProjectpath()+pd.getString("FILEPATH"));
file.delete();
imgfilesService.delete(pd);
map.put("dockData", JSON.toJSONString(pd));
map.put("result", errInfo); //返回结果
return map;
}