fix 68471 消息中心-模板管理-导入失败

This commit is contained in:
liao
2023-05-05 15:15:27 +08:00
parent b328892447
commit eec15a3b5e
3 changed files with 6 additions and 5 deletions
@@ -172,8 +172,8 @@ public class JeroController<T, S extends IService<T>> {
// 获取上传文件对象 // 获取上传文件对象
MultipartFile file = entity.getValue(); MultipartFile file = entity.getValue();
ImportParams params = new ImportParams(); ImportParams params = new ImportParams();
params.setTitleRows(2); /*params.setTitleRows(2);
params.setHeadRows(1); params.setHeadRows(1);*/
params.setNeedSave(true); params.setNeedSave(true);
try { try {
List<T> list = ExcelImportUtil.importExcel(file.getInputStream(), clazz, params); List<T> list = ExcelImportUtil.importExcel(file.getInputStream(), clazz, params);
@@ -79,7 +79,8 @@ public class JwtUtil {
* @return 加密的token * @return 加密的token
*/ */
public static String sign(String username, String secret) { public static String sign(String username, String secret) {
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME); // 24小时后过期
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME * 48);
Algorithm algorithm = Algorithm.HMAC256(secret); Algorithm algorithm = Algorithm.HMAC256(secret);
// 附带username信息 // 附带username信息
return JWT.create().withClaim(USERNAME_FIELD, username).withExpiresAt(date).sign(algorithm); return JWT.create().withClaim(USERNAME_FIELD, username).withExpiresAt(date).sign(algorithm);
@@ -30,8 +30,8 @@ public class SysMessageTemplate extends JeroEntity {
@Excel(name = "模板内容", width = 50) @Excel(name = "模板内容", width = 50)
private java.lang.String templateContent; private java.lang.String templateContent;
/**模板测试json*/ /**模板测试json*/
@Excel(name = "模板测试json", width = 15) /*@Excel(name = "模板测试json", width = 15)
private java.lang.String templateTestJson; private java.lang.String templateTestJson;*/
/**模板类型*/ /**模板类型*/
@Excel(name = "模板类型", width = 15) @Excel(name = "模板类型", width = 15)
private java.lang.String templateType; private java.lang.String templateType;