Revert "新增编辑在帮助文档功能"

This reverts commit ea13a037e8
This commit is contained in:
王鑫
2019-01-28 20:17:08 +08:00
parent a4c566089f
commit 281ea2f2a9
522 changed files with 3 additions and 118497 deletions

View File

@@ -1,22 +1,14 @@
package com.nis.web.controller;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.nis.domain.SysMenu;
import com.nis.util.StringUtil;
@@ -108,30 +100,6 @@ public class SystemController extends BaseController{
model.addAttribute("menuList",newList);
return "/help";
}
@RequestMapping("saveHelp")
@ResponseBody
public boolean saveHelp(HttpServletRequest request, HttpServletResponse response,ModelMap model,@RequestParam(required=true,value="editedHelpInfo")String editedHelpInfo,@RequestParam(required=true,value="helpHrefVal")String helpHrefVal){
try {
StringBuffer helpInfo=new StringBuffer("<!DOCTYPE html>");
helpInfo.append(URLDecoder.decode(editedHelpInfo,"utf-8"));
helpInfo.append("</html>");
String htmlName=URLDecoder.decode(helpHrefVal,"utf-8");
String htmlPath=request.getServletContext().getRealPath("/")+htmlName;
File file=new File(htmlPath);
OutputStream out=new FileOutputStream(file);
out.write(helpInfo.toString().getBytes());
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
}