报表基础模块:1、新增支持api数据源;2、新增超管模板操作权限;3、新增导入excel模板接口;4、移除数据源dsType,直接使用type类型;

This commit is contained in:
gaoqr
2024-08-22 18:19:30 +08:00
parent 96ac241c56
commit 9f6bae48a5
14 changed files with 158 additions and 118 deletions
@@ -20,10 +20,11 @@ public class CompressStringTypeHandler extends StringTypeHandler {
@Override
public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType)
throws SQLException {
String compressString = null;
if (StringUtils.isNotEmpty(parameter)) {
String compressString = JsonUtils.zipString(parameter);
ps.setString(i, compressString);
compressString = JsonUtils.zipString(parameter);
}
ps.setString(i, compressString);
}
@Override
@@ -63,7 +63,7 @@ public class SecurityFrameworkUtils {
public static Authentication getAuthentication() {
SecurityContext context = SecurityContextHolder.getContext();
if (context == null) {
return null;
throw new ServiceException(GlobalErrorCodeConstants.UNAUTHORIZED);
}
return context.getAuthentication();
}
@@ -90,10 +90,7 @@ public class SecurityFrameworkUtils {
@Nullable
public static Long getLoginUserId() {
LoginUser loginUser = getLoginUser();
if (loginUser == null) {
throw new ServiceException(GlobalErrorCodeConstants.UNAUTHORIZED);
}
return loginUser.getId();
return loginUser != null ? loginUser.getId() : null;
}
/**