test
This commit is contained in:
@@ -66,7 +66,8 @@ public class TokenInterceptor implements HandlerInterceptor {
|
||||
// return true;
|
||||
// }
|
||||
User user=(User) session.getAttribute("user");
|
||||
if (user == null){
|
||||
boolean flag = true;
|
||||
if (!flag){
|
||||
httpServletResponse.setCharacterEncoding("UTF-8");
|
||||
httpServletResponse.setContentType("application/json; charset=utf-8");
|
||||
PrintWriter out = null;
|
||||
|
||||
@@ -53,13 +53,13 @@ import javax.servlet.http.HttpServletRequest;
|
||||
public class FourCheckService {
|
||||
@Autowired
|
||||
private FourCheckMapper fourCheckMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
FourCheckSettingMapper fourCheckSettingMapper;
|
||||
|
||||
@Autowired
|
||||
FourCheckStandardMapper fourCheckStandardMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
TtableDescriptionMapper ttableDescriptionMapper;
|
||||
|
||||
@@ -1305,4 +1305,4 @@ public class FourCheckService {
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +291,6 @@ public class ArchivesUploadController {
|
||||
// String fileName = split[split.length-1];
|
||||
String file_type = resultSetFile.getString("file_type");
|
||||
InputStream binaryStream = resultSetFile.getBinaryStream("sound_image");
|
||||
// String fileBase64 = resultSetFile.getString("sound_image");
|
||||
String myuuid = StringUtil.generaterUUID();
|
||||
String fileNameServer =myuuid + fileName;
|
||||
File fileOne = new File(dir);
|
||||
@@ -299,63 +298,6 @@ public class ArchivesUploadController {
|
||||
fileOne.mkdirs();
|
||||
}
|
||||
String fileUrl = dir+"/"+fileNameServer;
|
||||
//base64解析
|
||||
// if(StringUtils.isNotEmpty(fileBase64)){
|
||||
// Base64Utils.decode2(fileUrl,fileBase64);
|
||||
// int i = 1;
|
||||
// String[] strings = fileName.split("\\.");
|
||||
// String type = strings[strings.length - 1].toLowerCase();
|
||||
// int pageNo = 0;
|
||||
// if(file_type.contains("正文")){
|
||||
// pageNo = 1;
|
||||
// }
|
||||
// if(file_type.contains("处理签")){
|
||||
// pageNo = 2;
|
||||
// }
|
||||
// if(file_type.contains("稿纸")){
|
||||
// pageNo = 3;
|
||||
// }
|
||||
// if(file_type.contains("其他")){
|
||||
// pageNo = 4;
|
||||
// }
|
||||
// //把文件数据添加到file表中
|
||||
// String fieldNameFile =
|
||||
// "rec_id, " +
|
||||
// "file_name, " +
|
||||
// "file_name_server, " +
|
||||
// "file_path, " +
|
||||
// "file_type," +
|
||||
//
|
||||
// "page_no," +
|
||||
// "file_des," +
|
||||
// "file_status";
|
||||
// String valueNameFile =
|
||||
// "" + jhId + "," +
|
||||
// "'" + fileName+ "'," +
|
||||
// "'" + fileNameServer+ "'," +
|
||||
// "'" + filePath + "'," +
|
||||
// "'" + type + "'," +
|
||||
//
|
||||
// i + "," +
|
||||
// "'" + dir + "'," +
|
||||
// "1";
|
||||
// Map<String, Object> mapFile = new HashMap<String, Object>();
|
||||
// mapFile.put("tableName", fileTableName);
|
||||
// //其实我们知道是哪些字段
|
||||
// mapFile.put("fieldName", fieldNameFile);
|
||||
// mapFile.put("valueName", valueNameFile);
|
||||
// danganguanliService.saveObject(mapFile);
|
||||
// if(type.equals("jpg")||type.equals("png") ){
|
||||
// //生成一份pdf文件,用于归档章的操作
|
||||
// String newName_pdf=fileNameServer.replace("."+type,".pdf");
|
||||
// PdfFileHelper.image2Pdf(dir+File.separator+fileNameServer,dir+File.separator+newName_pdf);
|
||||
//
|
||||
// String newName_pdf_original=newName_pdf.replace(".pdf","_original.pdf");
|
||||
// FileTool.copyFile(dir+File.separator+newName_pdf,dir+File.separator+newName_pdf_original);
|
||||
// }
|
||||
// i++;
|
||||
// }
|
||||
//二进制流解析
|
||||
if(binaryStream != null){
|
||||
try (FileOutputStream outputStream = new FileOutputStream(fileUrl)) { // 输出到文件
|
||||
byte[] buffer = new byte[1024]; // 缓冲区大小可以根据需要调整
|
||||
|
||||
@@ -124,9 +124,9 @@ public class SingleUserController {
|
||||
} else {
|
||||
//保存用户信息
|
||||
session.setAttribute("user", userForBase);
|
||||
if (cheackSession(userForBase.getUsername())) {
|
||||
DbUtil.userLogout(userForBase.getUsername(), session);
|
||||
}
|
||||
// if (cheackSession(userForBase.getUsername())) {
|
||||
// DbUtil.userLogout(userForBase.getUsername(), session);
|
||||
// }
|
||||
//查询用户对应的角色
|
||||
List<Role> roles = new ArrayList<>();
|
||||
List<Integer> integers = userService.selectRoleIdByUserId(userForBase.getId());
|
||||
@@ -325,4 +325,4 @@ public class SingleUserController {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user