基础资料调整

main
HUOJIN\92525 2025-10-28 18:13:40 +08:00
parent 6132a73679
commit a55367271f
767 changed files with 3568 additions and 2404 deletions

View File

@ -2,6 +2,7 @@ package org.jeecg.common.api;
import org.jeecg.common.api.dto.AiragFlowDTO; import org.jeecg.common.api.dto.AiragFlowDTO;
import org.jeecg.common.system.vo.*; import org.jeecg.common.system.vo.*;
import org.jeecg.common.system.vo.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -56,14 +57,14 @@ public interface CommonAPI {
* @param username * @param username
* @return * @return
*/ */
public LoginUser getUserByName(String username); LoginUser getUserByName(String username);
/** /**
* 5Id * 5Id
* @param username * @param username
* @return * @return
*/ */
public String getUserIdByName(String username); String getUserIdByName(String username);
/** /**
@ -106,14 +107,14 @@ public interface CommonAPI {
* @param code * @param code
* @return * @return
*/ */
public List<DictModel> queryDictItemsByCode(String code); List<DictModel> queryDictItemsByCode(String code);
/** /**
* *
* @param code * @param code
* @return * @return
*/ */
public List<DictModel> queryEnableDictItemsByCode(String code); List<DictModel> queryEnableDictItemsByCode(String code);
/** /**
* 13 * 13

View File

@ -1,6 +1,5 @@
package org.jeecg.common.api.dto; package org.jeecg.common.api.dto;
import lombok.Data; import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;

View File

@ -158,10 +158,7 @@ public class AutoLogAspect {
if(value!=null && value.toString().length()>length){ if(value!=null && value.toString().length()>length){
return false; return false;
} }
if(value instanceof MultipartFile){ return !(value instanceof MultipartFile);
return false;
}
return true;
} }
}; };
params = JSONObject.toJSONString(arguments, profilter); params = JSONObject.toJSONString(arguments, profilter);
@ -190,7 +187,7 @@ public class AutoLogAspect {
* @return * @return
*/ */
private String getOnlineLogContent(Object obj, String content){ private String getOnlineLogContent(Object obj, String content){
if (Result.class.isInstance(obj)){ if (obj instanceof Result){
Result res = (Result)obj; Result res = (Result)obj;
String msg = res.getMessage(); String msg = res.getMessage();
String tableName = res.getOnlTable(); String tableName = res.getOnlTable();

View File

@ -428,7 +428,7 @@ public class DictAspect {
//update-end--Author:scott -- Date:20210531 ----for !56 优化微服务应用下存在表字段需要字典翻译时加载缓慢问题----- //update-end--Author:scott -- Date:20210531 ----for !56 优化微服务应用下存在表字段需要字典翻译时加载缓慢问题-----
if (tmpValue != null) { if (tmpValue != null) {
if (!"".equals(textValue.toString())) { if (!"".contentEquals(textValue)) {
textValue.append(","); textValue.append(",");
} }
textValue.append(tmpValue); textValue.append(tmpValue);

View File

@ -29,11 +29,11 @@ public enum UrlMatchEnum {
/** /**
* Request URL * Request URL
*/ */
private String url; private final String url;
/** /**
* URL () * URL ()
*/ */
private String matchUrl; private final String matchUrl;
/** /**
* req url URL * req url URL

View File

@ -88,7 +88,7 @@ public interface CommonConstant {
Integer SC_JEECG_NO_AUTHZ=510; Integer SC_JEECG_NO_AUTHZ=510;
/** 登录用户Shiro权限缓存KEY前缀 */ /** 登录用户Shiro权限缓存KEY前缀 */
public static String PREFIX_USER_SHIRO_CACHE = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:"; String PREFIX_USER_SHIRO_CACHE = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
/** 登录用户Token令牌缓存KEY前缀 */ /** 登录用户Token令牌缓存KEY前缀 */
String PREFIX_USER_TOKEN = "prefix_user_token:"; String PREFIX_USER_TOKEN = "prefix_user_token:";
// /** Token缓存时间3600秒即一小时 */ // /** Token缓存时间3600秒即一小时 */
@ -595,17 +595,17 @@ public interface CommonConstant {
/** /**
* *
*/ */
public static String[] allowDevRoles = new String[]{"lowdeveloper", "admin"}; String[] allowDevRoles = new String[]{"lowdeveloper", "admin"};
/** /**
* *
* *
*/ */
public static final String SAAS_MODE_CREATED = "created"; String SAAS_MODE_CREATED = "created";
/** /**
* *
* *
*/ */
public static final String SAAS_MODE_TENANT = "tenant"; String SAAS_MODE_TENANT = "tenant";
//update-end---author:scott ---date::2023-09-10 for积木报表常量---- //update-end---author:scott ---date::2023-09-10 for积木报表常量----
//update-begin---author:wangshuai---date:2024-04-07---for:修改手机号常量--- //update-begin---author:wangshuai---date:2024-04-07---for:修改手机号常量---

View File

@ -10,39 +10,39 @@ public interface CommonSendStatus {
/** /**
* *
*/ */
public static final String UNPUBLISHED_STATUS_0 = "0"; String UNPUBLISHED_STATUS_0 = "0";
/** /**
* *
*/ */
public static final String PUBLISHED_STATUS_1 = "1"; String PUBLISHED_STATUS_1 = "1";
/** /**
* *
*/ */
public static final String REVOKE_STATUS_2 = "2"; String REVOKE_STATUS_2 = "2";
/** /**
* app * app
*/ */
public static final String APP_SESSION_SUFFIX = "_app"; String APP_SESSION_SUFFIX = "_app";
/**-----【流程相关通知模板code】------------------------------------------------------------*/ /**-----【流程相关通知模板code】------------------------------------------------------------*/
/**流程催办——系统通知消息模板*/ /**流程催办——系统通知消息模板*/
public static final String TZMB_BPM_CUIBAN = "bpm_cuiban"; String TZMB_BPM_CUIBAN = "bpm_cuiban";
/**流程抄送——系统通知消息模板*/ /**流程抄送——系统通知消息模板*/
public static final String TZMB_BPM_CC = "bpm_cc"; String TZMB_BPM_CC = "bpm_cc";
/**流程催办——邮件通知消息模板*/ /**流程催办——邮件通知消息模板*/
public static final String TZMB_BPM_CUIBAN_EMAIL = "bpm_cuiban_email"; String TZMB_BPM_CUIBAN_EMAIL = "bpm_cuiban_email";
/**标准模板—系统消息通知*/ /**标准模板—系统消息通知*/
public static final String TZMB_SYS_TS_NOTE = "sys_ts_note"; String TZMB_SYS_TS_NOTE = "sys_ts_note";
/**流程超时提醒——系统通知消息模板*/ /**流程超时提醒——系统通知消息模板*/
public static final String TZMB_BPM_CHAOSHI_TIP = "bpm_chaoshi_tip"; String TZMB_BPM_CHAOSHI_TIP = "bpm_chaoshi_tip";
/**-----【流程相关通知模板code】-----------------------------------------------------------*/ /**-----【流程相关通知模板code】-----------------------------------------------------------*/
/** /**
* *
*/ */
public static final String MSG_ABSTRACT_JSON = "msg_abstract"; String MSG_ABSTRACT_JSON = "msg_abstract";
} }

View File

@ -8,7 +8,7 @@ public interface DataBaseConstant {
/** /**
* *
*/ */
public static final String[] SYSTEM_KEYS = { String[] SYSTEM_KEYS = {
DataBaseConstant.SYS_ORG_CODE, DataBaseConstant.SYS_ORG_CODE_TABLE, DataBaseConstant.SYS_MULTI_ORG_CODE, DataBaseConstant.SYS_ORG_CODE, DataBaseConstant.SYS_ORG_CODE_TABLE, DataBaseConstant.SYS_MULTI_ORG_CODE,
DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE, DataBaseConstant.SYS_ORG_ID, DataBaseConstant.SYS_ORG_ID_TABLE, DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE, DataBaseConstant.SYS_ORG_ID, DataBaseConstant.SYS_ORG_ID_TABLE,
DataBaseConstant.SYS_ROLE_CODE, DataBaseConstant.SYS_ROLE_CODE_TABLE, DataBaseConstant.SYS_USER_CODE, DataBaseConstant.SYS_ROLE_CODE, DataBaseConstant.SYS_ROLE_CODE_TABLE, DataBaseConstant.SYS_USER_CODE,
@ -21,31 +21,31 @@ public interface DataBaseConstant {
//*********数据库类型**************************************** //*********数据库类型****************************************
/**MYSQL数据库*/ /**MYSQL数据库*/
public static final String DB_TYPE_MYSQL = "MYSQL"; String DB_TYPE_MYSQL = "MYSQL";
/** ORACLE*/ /** ORACLE*/
public static final String DB_TYPE_ORACLE = "ORACLE"; String DB_TYPE_ORACLE = "ORACLE";
/**达梦数据库*/ /**达梦数据库*/
public static final String DB_TYPE_DM = "DM"; String DB_TYPE_DM = "DM";
/**postgreSQL达梦数据库*/ /**postgreSQL达梦数据库*/
public static final String DB_TYPE_POSTGRESQL = "POSTGRESQL"; String DB_TYPE_POSTGRESQL = "POSTGRESQL";
/**人大金仓数据库*/ /**人大金仓数据库*/
public static final String DB_TYPE_KINGBASEES = "KINGBASEES"; String DB_TYPE_KINGBASEES = "KINGBASEES";
/**sqlserver数据库*/ /**sqlserver数据库*/
public static final String DB_TYPE_SQLSERVER = "SQLSERVER"; String DB_TYPE_SQLSERVER = "SQLSERVER";
/**mariadb 数据库*/ /**mariadb 数据库*/
public static final String DB_TYPE_MARIADB = "MARIADB"; String DB_TYPE_MARIADB = "MARIADB";
/**DB2 数据库*/ /**DB2 数据库*/
public static final String DB_TYPE_DB2 = "DB2"; String DB_TYPE_DB2 = "DB2";
/**HSQL 数据库*/ /**HSQL 数据库*/
public static final String DB_TYPE_HSQL = "HSQL"; String DB_TYPE_HSQL = "HSQL";
// // 数据库类型,对应 database_type 字典 // // 数据库类型,对应 database_type 字典
// public static final String DB_TYPE_MYSQL_NUM = "1"; // public static final String DB_TYPE_MYSQL_NUM = "1";
@ -59,79 +59,79 @@ public interface DataBaseConstant {
/** /**
* - * -
*/ */
public static final String SYS_ORG_CODE = "sysOrgCode"; String SYS_ORG_CODE = "sysOrgCode";
/** /**
* - * -
*/ */
public static final String SYS_ORG_CODE_TABLE = "sys_org_code"; String SYS_ORG_CODE_TABLE = "sys_org_code";
/** /**
* - * -
*/ */
public static final String SYS_MULTI_ORG_CODE = "sysMultiOrgCode"; String SYS_MULTI_ORG_CODE = "sysMultiOrgCode";
/** /**
* - * -
*/ */
public static final String SYS_MULTI_ORG_CODE_TABLE = "sys_multi_org_code"; String SYS_MULTI_ORG_CODE_TABLE = "sys_multi_org_code";
/** /**
* -ID * -ID
*/ */
public static final String SYS_ORG_ID = "sysOrgId"; String SYS_ORG_ID = "sysOrgId";
/** /**
* -ID * -ID
*/ */
public static final String SYS_ORG_ID_TABLE = "sys_org_id"; String SYS_ORG_ID_TABLE = "sys_org_id";
/** /**
* -code * -code
*/ */
public static final String SYS_ROLE_CODE = "sysRoleCode"; String SYS_ROLE_CODE = "sysRoleCode";
/** /**
* -code * -code
*/ */
public static final String SYS_ROLE_CODE_TABLE = "sys_role_code"; String SYS_ROLE_CODE_TABLE = "sys_role_code";
/** /**
* - * -
*/ */
public static final String SYS_USER_CODE = "sysUserCode"; String SYS_USER_CODE = "sysUserCode";
/** /**
* - * -
*/ */
public static final String SYS_USER_CODE_TABLE = "sys_user_code"; String SYS_USER_CODE_TABLE = "sys_user_code";
/** /**
* ID * ID
*/ */
public static final String SYS_USER_ID = "sysUserId"; String SYS_USER_ID = "sysUserId";
/** /**
* ID * ID
*/ */
public static final String SYS_USER_ID_TABLE = "sys_user_id"; String SYS_USER_ID_TABLE = "sys_user_id";
/** /**
* *
*/ */
public static final String SYS_USER_NAME = "sysUserName"; String SYS_USER_NAME = "sysUserName";
/** /**
* *
*/ */
public static final String SYS_USER_NAME_TABLE = "sys_user_name"; String SYS_USER_NAME_TABLE = "sys_user_name";
/** /**
* "yyyy-MM-dd" * "yyyy-MM-dd"
*/ */
public static final String SYS_DATE = "sysDate"; String SYS_DATE = "sysDate";
/** /**
* "yyyy-MM-dd" * "yyyy-MM-dd"
*/ */
public static final String SYS_DATE_TABLE = "sys_date"; String SYS_DATE_TABLE = "sys_date";
/** /**
* "yyyy-MM-dd HH:mm" * "yyyy-MM-dd HH:mm"
*/ */
public static final String SYS_TIME = "sysTime"; String SYS_TIME = "sysTime";
/** /**
* "yyyy-MM-dd HH:mm" * "yyyy-MM-dd HH:mm"
*/ */
public static final String SYS_TIME_TABLE = "sys_time"; String SYS_TIME_TABLE = "sys_time";
/** /**
* - * -
*/ */
public static final String SYS_BASE_PATH = "sys_base_path"; String SYS_BASE_PATH = "sys_base_path";
//*********系统上下文变量**************************************** //*********系统上下文变量****************************************
@ -139,44 +139,44 @@ public interface DataBaseConstant {
/** /**
* *
*/ */
public static final String CREATE_BY_TABLE = "create_by"; String CREATE_BY_TABLE = "create_by";
/** /**
* *
*/ */
public static final String CREATE_BY = "createBy"; String CREATE_BY = "createBy";
/** /**
* *
*/ */
public static final String CREATE_TIME_TABLE = "create_time"; String CREATE_TIME_TABLE = "create_time";
/** /**
* *
*/ */
public static final String CREATE_TIME = "createTime"; String CREATE_TIME = "createTime";
/** /**
* *
*/ */
public static final String UPDATE_BY_TABLE = "update_by"; String UPDATE_BY_TABLE = "update_by";
/** /**
* *
*/ */
public static final String UPDATE_BY = "updateBy"; String UPDATE_BY = "updateBy";
/** /**
* *
*/ */
public static final String UPDATE_TIME = "updateTime"; String UPDATE_TIME = "updateTime";
/** /**
* *
*/ */
public static final String UPDATE_TIME_TABLE = "update_time"; String UPDATE_TIME_TABLE = "update_time";
/** /**
* *
*/ */
public static final String BPM_STATUS = "bpmStatus"; String BPM_STATUS = "bpmStatus";
/** /**
* *
*/ */
public static final String BPM_STATUS_TABLE = "bpm_status"; String BPM_STATUS_TABLE = "bpm_status";
//*********系统建表标准字段**************************************** //*********系统建表标准字段****************************************
/** /**

View File

@ -3,15 +3,12 @@ package org.jeecg.common.constant;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.io.File; import java.io.File;
import java.io.IOException; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Scanner; import java.util.Scanner;
import java.util.Set;
import java.util.List; import java.util.List;
/** /**
@ -174,7 +171,7 @@ public class ProvinceCityArea {
Scanner scanner = null; Scanner scanner = null;
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
try { try {
scanner = new Scanner(file, "utf-8"); scanner = new Scanner(file, StandardCharsets.UTF_8);
while (scanner.hasNextLine()) { while (scanner.hasNextLine()) {
buffer.append(scanner.nextLine()); buffer.append(scanner.nextLine());
} }

View File

@ -9,8 +9,8 @@ public enum ClientTerminalTypeEnum {
H5("h5", "移动网页端"), H5("h5", "移动网页端"),
APP("app", "手机app端"); APP("app", "手机app端");
private String key; private final String key;
private String text; private final String text;
ClientTerminalTypeEnum(String value, String text) { ClientTerminalTypeEnum(String value, String text) {
this.key = value; this.key = value;

View File

@ -30,7 +30,7 @@ public enum DySmsEnum {
*/ */
private String keys; private String keys;
private DySmsEnum(String templateCode,String signName,String keys) { DySmsEnum(String templateCode, String signName, String keys) {
this.templateCode = templateCode; this.templateCode = templateCode;
this.signName = signName; this.signName = signName;
this.keys = keys; this.keys = keys;

View File

@ -32,7 +32,7 @@ public enum FileTypeEnum {
private String type; private String type;
private String value; private String value;
private String text; private String text;
private FileTypeEnum(String type,String value,String text){ FileTypeEnum(String type, String value, String text){
this.type = type; this.type = type;
this.value = value; this.value = value;
this.text = text; this.text = text;

View File

@ -49,7 +49,7 @@ public enum SensitiveEnum {
/** /**
* *
*/ */
CNAPS_CODE; CNAPS_CODE
} }

View File

@ -40,8 +40,7 @@ public class SensitiveInfoUtil {
break; break;
}else{ }else{
// 对象里面是List<实体> // 对象里面是List<实体>
if(field.getGenericType() instanceof ParameterizedType){ if(field.getGenericType() instanceof ParameterizedType pt){
ParameterizedType pt = (ParameterizedType)field.getGenericType();
if(pt.getRawType().equals(List.class)){ if(pt.getRawType().equals(List.class)){
if(pt.getActualTypeArguments()[0].equals(entity)){ if(pt.getActualTypeArguments()[0].equals(entity)){
field.setAccessible(true); field.setAccessible(true);
@ -67,7 +66,7 @@ public class SensitiveInfoUtil {
return obj; return obj;
} }
long startTime=System.currentTimeMillis(); long startTime=System.currentTimeMillis();
log.debug(" obj --> "+ obj.toString()); log.debug(" obj --> "+ obj);
// 判断是不是一个对象 // 判断是不是一个对象
Field[] fields = obj.getClass().getDeclaredFields(); Field[] fields = obj.getClass().getDeclaredFields();
@ -83,7 +82,7 @@ public class SensitiveInfoUtil {
continue; continue;
} }
SensitiveField sf = field.getAnnotation(SensitiveField.class); SensitiveField sf = field.getAnnotation(SensitiveField.class);
if(isEncode==true){ if(isEncode){
//加密 //加密
String value = SensitiveInfoUtil.getEncodeData(realValue, sf.type()); String value = SensitiveInfoUtil.getEncodeData(realValue, sf.type());
field.set(obj, value); field.set(obj, value);

View File

@ -387,7 +387,7 @@ public class JeecgElasticsearchTemplate {
data.remove("id"); data.remove("id");
bodySb.append(data.toJSONString()).append("\n"); bodySb.append(data.toJSONString()).append("\n");
} }
System.out.println("+-+-+-: bodySb.toString(): " + bodySb.toString()); System.out.println("+-+-+-: bodySb.toString(): " + bodySb);
HttpHeaders headers = RestUtil.getHeaderApplicationJson(); HttpHeaders headers = RestUtil.getHeaderApplicationJson();
RestUtil.request(url, HttpMethod.PUT, headers, null, bodySb, JSONObject.class); RestUtil.request(url, HttpMethod.PUT, headers, null, bodySb, JSONObject.class);
return true; return true;

View File

@ -16,7 +16,7 @@ public interface IFillRuleHandler {
* @param formData * @param formData
* @return * @return
*/ */
public Object execute(JSONObject params, JSONObject formData); Object execute(JSONObject params, JSONObject formData);
} }

View File

@ -14,7 +14,7 @@ public enum MatchTypeEnum {
/**查询链接规则 OR*/ /**查询链接规则 OR*/
OR("OR"); OR("OR");
private String value; private final String value;
MatchTypeEnum(String value) { MatchTypeEnum(String value) {
this.value = value; this.value = value;
@ -36,7 +36,7 @@ public enum MatchTypeEnum {
return null; return null;
} }
for (MatchTypeEnum val : values()) { for (MatchTypeEnum val : values()) {
if (val.getValue().toLowerCase().equals(value.toLowerCase())) { if (val.getValue().equalsIgnoreCase(value)) {
return val; return val;
} }
} }

View File

@ -4,6 +4,7 @@ import java.beans.PropertyDescriptor;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@ -21,6 +22,7 @@ import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.util.SqlConcatUtil; import org.jeecg.common.system.util.SqlConcatUtil;
import org.jeecg.common.system.vo.SysPermissionDataRuleModel; import org.jeecg.common.system.vo.SysPermissionDataRuleModel;
import org.jeecg.common.util.*; import org.jeecg.common.util.*;
import org.jeecg.common.util.*;
import org.springframework.util.NumberUtils; import org.springframework.util.NumberUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
@ -171,7 +173,7 @@ public class QueryGenerator {
//TODO 这种前后带逗号的支持分割后模糊查询(多选字段查询生效) 示例:,1,3, //TODO 这种前后带逗号的支持分割后模糊查询(多选字段查询生效) 示例:,1,3,
if (null != value && value.toString().startsWith(COMMA) && value.toString().endsWith(COMMA)) { if (null != value && value.toString().startsWith(COMMA) && value.toString().endsWith(COMMA)) {
String multiLikeval = value.toString().replace(",,", COMMA); String multiLikeval = value.toString().replace(",,", COMMA);
String[] vals = multiLikeval.substring(1, multiLikeval.length()).split(COMMA); String[] vals = multiLikeval.substring(1).split(COMMA);
final String field = oConvertUtils.camelToUnderline(column); final String field = oConvertUtils.camelToUnderline(column);
if(vals.length>1) { if(vals.length>1) {
queryWrapper.and(j -> { queryWrapper.and(j -> {
@ -407,7 +409,7 @@ public class QueryGenerator {
MatchTypeEnum matchType = MatchTypeEnum.getByValue(superQueryMatchType); MatchTypeEnum matchType = MatchTypeEnum.getByValue(superQueryMatchType);
// update-begin--Author:sunjianlei Date:20200325 for高级查询的条件要用括号括起来防止和用户的其他条件冲突 ------- // update-begin--Author:sunjianlei Date:20200325 for高级查询的条件要用括号括起来防止和用户的其他条件冲突 -------
try { try {
superQueryParams = URLDecoder.decode(superQueryParams, "UTF-8"); superQueryParams = URLDecoder.decode(superQueryParams, StandardCharsets.UTF_8);
List<QueryCondition> conditions = JSON.parseArray(superQueryParams, QueryCondition.class); List<QueryCondition> conditions = JSON.parseArray(superQueryParams, QueryCondition.class);
if (conditions == null || conditions.size() == 0) { if (conditions == null || conditions.size() == 0) {
return; return;
@ -436,7 +438,7 @@ public class QueryGenerator {
|| "empty".equals(rule.getRule()) || "empty".equals(rule.getRule())
) { ) {
log.debug("SuperQuery ==> " + rule.toString()); log.debug("SuperQuery ==> " + rule);
//update-begin-author:taoyan date:20201228 for: 【高级查询】 oracle 日期等于查询报错 //update-begin-author:taoyan date:20201228 for: 【高级查询】 oracle 日期等于查询报错
Object queryValue = rule.getVal(); Object queryValue = rule.getVal();
@ -490,8 +492,6 @@ public class QueryGenerator {
} }
//return andWrapper; //return andWrapper;
}); });
} catch (UnsupportedEncodingException e) {
log.error("--高级查询参数转码失败:" + superQueryParams, e);
} catch (Exception e) { } catch (Exception e) {
log.error("--高级查询拼接失败:" + e.getMessage()); log.error("--高级查询拼接失败:" + e.getMessage());
e.printStackTrace(); e.printStackTrace();
@ -512,7 +512,7 @@ public class QueryGenerator {
if (value == null) { if (value == null) {
return QueryRuleEnum.EQ; return QueryRuleEnum.EQ;
} }
String val = (value + "").toString().trim(); String val = (value + "").trim();
if (val.length() == 0) { if (val.length() == 0) {
return QueryRuleEnum.EQ; return QueryRuleEnum.EQ;
} }
@ -591,7 +591,7 @@ public class QueryGenerator {
if (! (value instanceof String)){ if (! (value instanceof String)){
return value; return value;
} }
String val = (value + "").toString().trim(); String val = (value + "").trim();
//update-begin-author:taoyan date:20220302 for: 查询条件的值为等号(=bug #3443 //update-begin-author:taoyan date:20220302 for: 查询条件的值为等号(=bug #3443
if(QueryRuleEnum.EQ.getValue().equals(val)){ if(QueryRuleEnum.EQ.getValue().equals(val)){
return val; return val;
@ -1004,7 +1004,7 @@ public class QueryGenerator {
sb.append(sqlAnd+filedSql); sb.append(sqlAnd+filedSql);
} }
} }
log.info("query auth sql is:"+sb.toString()); log.info("query auth sql is:"+ sb);
return sb.toString(); return sb.toString();
} }

View File

@ -33,7 +33,7 @@ public class JeecgDataAutorUtils {
public static synchronized void installDataSearchConditon(HttpServletRequest request, List<SysPermissionDataRuleModel> dataRules) { public static synchronized void installDataSearchConditon(HttpServletRequest request, List<SysPermissionDataRuleModel> dataRules) {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// 1.先从request获取MENU_DATA_AUTHOR_RULES如果存则获取到LIST // 1.先从request获取MENU_DATA_AUTHOR_RULES如果存则获取到LIST
List<SysPermissionDataRuleModel> list = (List<SysPermissionDataRuleModel>)loadDataSearchConditon(); List<SysPermissionDataRuleModel> list = loadDataSearchConditon();
if (list==null) { if (list==null) {
// 2.如果不存在则new一个list // 2.如果不存在则new一个list
list = new ArrayList<SysPermissionDataRuleModel>(); list = new ArrayList<SysPermissionDataRuleModel>();
@ -72,7 +72,7 @@ public class JeecgDataAutorUtils {
* @param sql * @param sql
*/ */
public static synchronized void installDataSearchConditon(HttpServletRequest request, String sql) { public static synchronized void installDataSearchConditon(HttpServletRequest request, String sql) {
String ruleSql = (String) loadDataSearchConditonSqlString(); String ruleSql = loadDataSearchConditonSqlString();
if (!StringUtils.hasText(ruleSql)) { if (!StringUtils.hasText(ruleSql)) {
request.setAttribute(MENU_DATA_AUTHOR_RULE_SQL,sql); request.setAttribute(MENU_DATA_AUTHOR_RULE_SQL,sql);
} }

View File

@ -6,15 +6,12 @@ import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTDecodeException; import com.auth0.jwt.exceptions.JWTDecodeException;
import com.auth0.jwt.interfaces.DecodedJWT; import com.auth0.jwt.interfaces.DecodedJWT;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Joiner;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.util.Date; import java.util.Date;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession; import jakarta.servlet.http.HttpSession;
@ -211,15 +208,15 @@ public class JwtUtil {
} }
//update-end---author:chenrui ---date:20250107 for[QQYUN-10785]数据权限,查看自己拥有部门的权限中存在问题 #7288------------ //update-end---author:chenrui ---date:20250107 for[QQYUN-10785]数据权限,查看自己拥有部门的权限中存在问题 #7288------------
//替换为当前系统时间(年月日) //替换为当前系统时间(年月日)
if (key.equals(DataBaseConstant.SYS_DATE)|| key.toLowerCase().equals(DataBaseConstant.SYS_DATE_TABLE)) { if (key.equals(DataBaseConstant.SYS_DATE)|| key.equalsIgnoreCase(DataBaseConstant.SYS_DATE_TABLE)) {
returnValue = DateUtils.formatDate(); returnValue = DateUtils.formatDate();
} }
//替换为当前系统时间(年月日时分秒) //替换为当前系统时间(年月日时分秒)
else if (key.equals(DataBaseConstant.SYS_TIME)|| key.toLowerCase().equals(DataBaseConstant.SYS_TIME_TABLE)) { else if (key.equals(DataBaseConstant.SYS_TIME)|| key.equalsIgnoreCase(DataBaseConstant.SYS_TIME_TABLE)) {
returnValue = DateUtils.now(); returnValue = DateUtils.now();
} }
//流程状态默认值(默认未发起) //流程状态默认值(默认未发起)
else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.toLowerCase().equals(DataBaseConstant.BPM_STATUS_TABLE)) { else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.equalsIgnoreCase(DataBaseConstant.BPM_STATUS_TABLE)) {
returnValue = "1"; returnValue = "1";
} }
@ -229,7 +226,7 @@ public class JwtUtil {
} }
//替换为系统登录用户帐号 //替换为系统登录用户帐号
if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_CODE_TABLE)) { if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.equalsIgnoreCase(DataBaseConstant.SYS_USER_CODE_TABLE)) {
if(user==null) { if(user==null) {
returnValue = sysUser.getUsername(); returnValue = sysUser.getUsername();
}else { }else {
@ -247,7 +244,7 @@ public class JwtUtil {
} }
//替换为系统登录用户真实名字 //替换为系统登录用户真实名字
else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_NAME_TABLE)) { else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.equalsIgnoreCase(DataBaseConstant.SYS_USER_NAME_TABLE)) {
if(user==null) { if(user==null) {
returnValue = sysUser.getRealname(); returnValue = sysUser.getRealname();
}else { }else {
@ -256,7 +253,7 @@ public class JwtUtil {
} }
//替换为系统用户登录所使用的机构编码 //替换为系统用户登录所使用的机构编码
else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) { else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.equalsIgnoreCase(DataBaseConstant.SYS_ORG_CODE_TABLE)) {
if(user==null) { if(user==null) {
returnValue = sysUser.getOrgCode(); returnValue = sysUser.getOrgCode();
}else { }else {
@ -274,7 +271,7 @@ public class JwtUtil {
} }
//替换为系统用户所拥有的所有机构编码 //替换为系统用户所拥有的所有机构编码
else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) { else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.equalsIgnoreCase(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) {
if(user==null){ if(user==null){
//TODO 暂时使用用户登录部门,存在逻辑缺陷,不是用户所拥有的部门 //TODO 暂时使用用户登录部门,存在逻辑缺陷,不是用户所拥有的部门
returnValue = sysUser.getOrgCode(); returnValue = sysUser.getOrgCode();
@ -316,7 +313,7 @@ public class JwtUtil {
} }
//update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量 //update-begin-author:taoyan date:20210330 for:多租户ID作为系统变量
else if (key.equals(TenantConstant.TENANT_ID) || key.toLowerCase().equals(TenantConstant.TENANT_ID_TABLE)){ else if (key.equals(TenantConstant.TENANT_ID) || key.equalsIgnoreCase(TenantConstant.TENANT_ID_TABLE)){
try { try {
returnValue = SpringContextUtils.getHttpServletRequest().getHeader(CommonConstant.TENANT_ID); returnValue = SpringContextUtils.getHttpServletRequest().getHeader(CommonConstant.TENANT_ID);
} catch (Exception e) { } catch (Exception e) {

View File

@ -3,9 +3,7 @@ package org.jeecg.common.system.util;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.annotation.EnumDict; import org.jeecg.common.system.annotation.EnumDict;
import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver;

View File

@ -15,6 +15,7 @@ import org.jeecg.common.util.oConvertUtils;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -166,7 +167,7 @@ public class SqlConcatUtil {
} }
return "("+String.join("," ,res)+")"; return "("+String.join("," ,res)+")";
}else { }else {
return "("+value.toString()+")"; return "("+ value +")";
} }
//update-end-author:taoyan date:20210628 for: 查询条件如果输入,导致sql报错 //update-end-author:taoyan date:20210628 for: 查询条件如果输入,导致sql报错
} }
@ -266,11 +267,7 @@ public class SqlConcatUtil {
// 【TV360X-967】URL解码微服务下需要 // 【TV360X-967】URL解码微服务下需要
if (queryInfoString.contains("%22column%22")) { if (queryInfoString.contains("%22column%22")) {
log.info("queryInfoString 原生 = {}", queryInfoString); log.info("queryInfoString 原生 = {}", queryInfoString);
try { queryInfoString = URLDecoder.decode(queryInfoString, StandardCharsets.UTF_8);
queryInfoString = URLDecoder.decode(queryInfoString, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new JeecgBootException(e);
}
log.info("queryInfoString 解码 = {}", queryInfoString); log.info("queryInfoString 解码 = {}", queryInfoString);
} }
JSONArray array = JSONArray.parseArray(queryInfoString); JSONArray array = JSONArray.parseArray(queryInfoString);

View File

@ -29,12 +29,12 @@ public class ComboModel implements Serializable {
public ComboModel(){ public ComboModel(){
}; }
public ComboModel(String id,String title,boolean checked,String username){ public ComboModel(String id,String title,boolean checked,String username){
this.id = id; this.id = id;
this.title = title; this.title = title;
this.checked = false; this.checked = false;
this.username = username; this.username = username;
}; }
} }

View File

@ -1,6 +1,5 @@
package org.jeecg.common.system.vo; package org.jeecg.common.system.vo;
import org.jeecgframework.poi.excel.annotation.Excel;
/** /**
* @Author qinfeng * @Author qinfeng

View File

@ -1,12 +1,6 @@
package org.jeecg.common.system.vo; package org.jeecg.common.system.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
/** /**

View File

@ -1,13 +1,10 @@
package org.jeecg.common.system.vo; package org.jeecg.common.system.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecg.common.desensitization.annotation.SensitiveField; import org.jeecg.common.desensitization.annotation.SensitiveField;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/** /**
* <p> * <p>

View File

@ -20,9 +20,8 @@ public class BrowserUtils {
* @return * @return
*/ */
public static boolean isIe(HttpServletRequest request) { public static boolean isIe(HttpServletRequest request) {
return (request.getHeader("USER-AGENT").toLowerCase().indexOf("msie") > 0 || request return request.getHeader("USER-AGENT").toLowerCase().indexOf("msie") > 0 || request
.getHeader("USER-AGENT").toLowerCase().indexOf("rv:11.0") > 0) ? true .getHeader("USER-AGENT").toLowerCase().indexOf("rv:11.0") > 0;
: false;
} }
/** /**
@ -96,7 +95,7 @@ public class BrowserUtils {
private static boolean getBrowserType(HttpServletRequest request, private static boolean getBrowserType(HttpServletRequest request,
String brosertype) { String brosertype) {
return request.getHeader("USER-AGENT").toLowerCase() return request.getHeader("USER-AGENT").toLowerCase()
.indexOf(brosertype) > 0 ? true : false; .indexOf(brosertype) > 0;
} }
private final static String IE11 = "rv:11.0"; private final static String IE11 = "rv:11.0";
@ -170,7 +169,7 @@ public class BrowserUtils {
} }
private static Map<String, String> langMap = new HashMap<String, String>(); private static final Map<String, String> langMap = new HashMap<String, String>();
private final static String ZH = "zh"; private final static String ZH = "zh";
private final static String ZH_CN = "zh-cn"; private final static String ZH_CN = "zh-cn";
@ -187,7 +186,7 @@ public class BrowserUtils {
public static String getBrowserLanguage(HttpServletRequest request) { public static String getBrowserLanguage(HttpServletRequest request) {
String browserLang = request.getLocale().getLanguage(); String browserLang = request.getLocale().getLanguage();
String browserLangCode = (String)langMap.get(browserLang); String browserLangCode = langMap.get(browserLang);
if(browserLangCode == null) if(browserLangCode == null)
{ {

View File

@ -45,13 +45,13 @@ public class CommonUtils {
/** /**
* *
*/ */
private static Pattern ZHONGWEN_PATTERN = Pattern.compile("[\u4e00-\u9fa5]"); private static final Pattern ZHONGWEN_PATTERN = Pattern.compile("[\u4e00-\u9fa5]");
/** /**
* *
* .-_() * .-_()
*/ */
private static String FILE_NAME_REGEX = "[^A-Za-z\\.\\(\\)\\-\\_0-9\\u4e00-\\u9fa5]"; private static final String FILE_NAME_REGEX = "[^A-Za-z\\.\\(\\)\\-\\_0-9\\u4e00-\\u9fa5]";
public static String uploadOnlineImage(byte[] data,String basePath,String bizPath,String uploadType){ public static String uploadOnlineImage(byte[] data,String basePath,String bizPath,String uploadType){
String dbPath = null; String dbPath = null;
@ -120,10 +120,7 @@ public class CommonUtils {
return false; return false;
}else{ }else{
Matcher m = ZHONGWEN_PATTERN.matcher(str); Matcher m = ZHONGWEN_PATTERN.matcher(str);
if (m.find()) { return m.find();
return true;
}
return false;
} }
} }
@ -266,7 +263,7 @@ public class CommonUtils {
public static DataSourceProperty getDataSourceProperty(String sourceKey){ public static DataSourceProperty getDataSourceProperty(String sourceKey){
DynamicDataSourceProperties prop = SpringContextUtils.getApplicationContext().getBean(DynamicDataSourceProperties.class); DynamicDataSourceProperties prop = SpringContextUtils.getApplicationContext().getBean(DynamicDataSourceProperties.class);
Map<String, DataSourceProperty> map = prop.getDatasource(); Map<String, DataSourceProperty> map = prop.getDatasource();
DataSourceProperty db = (DataSourceProperty)map.get(sourceKey); DataSourceProperty db = map.get(sourceKey);
return db; return db;
} }
@ -282,7 +279,7 @@ public class CommonUtils {
} }
DynamicDataSourceProperties prop = SpringContextUtils.getApplicationContext().getBean(DynamicDataSourceProperties.class); DynamicDataSourceProperties prop = SpringContextUtils.getApplicationContext().getBean(DynamicDataSourceProperties.class);
Map<String, DataSourceProperty> map = prop.getDatasource(); Map<String, DataSourceProperty> map = prop.getDatasource();
DataSourceProperty db = (DataSourceProperty)map.get(sourceKey); DataSourceProperty db = map.get(sourceKey);
if(db==null){ if(db==null){
return null; return null;
} }

View File

@ -674,8 +674,7 @@ public class DateUtils extends PropertyEditorSupport {
throw new IllegalArgumentException("Could not parse date, date format is error "); throw new IllegalArgumentException("Could not parse date, date format is error ");
} }
} catch (ParseException ex) { } catch (ParseException ex) {
IllegalArgumentException iae = new IllegalArgumentException("Could not parse date: " + ex.getMessage()); IllegalArgumentException iae = new IllegalArgumentException("Could not parse date: " + ex.getMessage(), ex);
iae.initCause(ex);
throw iae; throw iae;
} }
} else { } else {

Some files were not shown because too many files have changed in this diff Show More