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 {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<result column="counts" property="counts" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, username, user_chn_name, password, phone, email, mark_enable,dept_id,"level",
|
||||
id, username, user_chn_name, password, phone, email, mark_enable,dept_id,level,
|
||||
create_time,counts
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
@@ -29,11 +29,11 @@
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.point.strategy.user.bean.User" >
|
||||
insert into t_user (id, username, user_chn_name,
|
||||
password, phone, email,
|
||||
insert into t_user (id, username, user_chn_name,
|
||||
password, phone, email,
|
||||
mark_enable,create_time,counts)
|
||||
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userChnName,jdbcType=VARCHAR},
|
||||
#{password,jdbcType=VARCHAR}, #{phone,jdbcType=CHAR}, #{email,jdbcType=VARCHAR},
|
||||
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userChnName,jdbcType=VARCHAR},
|
||||
#{password,jdbcType=VARCHAR}, #{phone,jdbcType=CHAR}, #{email,jdbcType=VARCHAR},
|
||||
#{markEnable,jdbcType=INTEGER},#{createTime,jdbcType=VARCHAR},#{counts,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.point.strategy.user.bean.User" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
@@ -225,4 +225,4 @@
|
||||
where userid = #{userId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user