This commit is contained in:
ls
2024-11-05 11:00:34 +08:00
parent 83fa274068
commit 639d0ee799
541 changed files with 29300 additions and 26585 deletions

View File

@@ -44,7 +44,7 @@ public class DictTableWhiteListHandlerImpl implements IDictTableWhiteListHandler
@Autowired
private JeecgBaseConfig jeecgBaseConfig;
/**
* 初始化 whiteTablesRuleMap 方法
*/
@@ -172,7 +172,7 @@ public class DictTableWhiteListHandlerImpl implements IDictTableWhiteListHandler
// 需要合并的字段
Set<String> waitMergerFields = new HashSet<>();
for (String field : queryFields) {
if(oConvertUtils.isEmpty(field)){
if (oConvertUtils.isEmpty(field)) {
continue;
}
// 统一转成小写
@@ -235,7 +235,7 @@ public class DictTableWhiteListHandlerImpl implements IDictTableWhiteListHandler
return true;
}
/**
* 取where前面的为table name
*

View File

@@ -9,16 +9,16 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Description: 代码生成器,自定义DB配置
* @Description: 代码生成器, 自定义DB配置
* 【加了此类则online模式DB连接使用平台的配置jeecg_database.properties配置无效;
* 但是使用GUI模式代码生成还是走jeecg_database.properties配置】
* 提醒: 达梦数据库需要修改下面的参数${spring.datasource.dynamic.datasource.master.url:}配置
* 但是使用GUI模式代码生成还是走jeecg_database.properties配置】
* 提醒: 达梦数据库需要修改下面的参数${spring.datasource.dynamic.datasource.master.url:}配置
* @author: scott
* @date: 2021年02月18日 16:30
*
* <p>
* 重要说明:此类改路径或者名称,需要同步修改
* org/jeecg/interceptor/OnlineRepairCodeGenerateDbConfig.java里面的注解
* @ConditionalOnMissingClass("org.jeecg.config.init.CodeGenerateDbConfig")
* org/jeecg/interceptor/OnlineRepairCodeGenerateDbConfig.java里面的注解
* @ConditionalOnMissingClass("org.jeecg.config.init.CodeGenerateDbConfig")
*/
@Slf4j
@Configuration
@@ -37,8 +37,8 @@ public class CodeGenerateDbConfig {
@Bean
public CodeGenerateDbConfig initCodeGenerateDbConfig() {
if(StringUtils.isNotBlank(url)){
if(StringUtils.isNotBlank(publicKey)){
if (StringUtils.isNotBlank(url)) {
if (StringUtils.isNotBlank(publicKey)) {
try {
password = ConfigTools.decrypt(publicKey, password);
} catch (Exception e) {
@@ -46,7 +46,7 @@ public class CodeGenerateDbConfig {
log.error(" 代码生成器数据库连接,数据库密码解密失败!");
}
}
CodegenDatasourceConfig.initDbConfig(driverClassName,url, username, password);
CodegenDatasourceConfig.initDbConfig(driverClassName, url, username, password);
log.info(" Init CodeGenerate Config [ Get Db Config From application.yml ] ");
}
return null;

View File

@@ -17,6 +17,7 @@ import java.nio.charset.StandardCharsets;
* 自动初始化代码生成器模板
* <p>
* 解决JAR发布需要手工配置代码生成器模板问题
*
* @author zhang
*/
@Slf4j

View File

@@ -6,7 +6,7 @@
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
/// **
// * @Description: TomcatFactoryConfig
// * @author: scott
// * @date: 2021年01月25日 11:40

View File

@@ -36,40 +36,41 @@ public class JimuDragExternalServiceImpl implements IOnlDragExternalService {
@Autowired
@Lazy
private ISysBaseAPI sysBaseApi;
/**
* 根据多个字典code查询多个字典项
* 根据多个字典code查询多个字典项
*
* @param codeList
* @return key = dictCode value=对应的字典项
*/
@Override
public Map<String, List<DragDictModel>> getManyDictItems(List<String> codeList) {
Map<String, List<DragDictModel>> manyDragDictItems = new HashMap<>();
Map<String, List<DragDictModel>> manyDragDictItems = new HashMap<>();
Map<String, List<DictModel>> dictItemsMap = sysBaseApi.getManyDictItems(codeList);
dictItemsMap.forEach((k,v)->{
List<DragDictModel> dictItems = new ArrayList<>();
v.forEach(dictItem->{
dictItemsMap.forEach((k, v) -> {
List<DragDictModel> dictItems = new ArrayList<>();
v.forEach(dictItem -> {
DragDictModel dictModel = new DragDictModel();
BeanUtils.copyProperties(dictItem,dictModel);
BeanUtils.copyProperties(dictItem, dictModel);
dictItems.add(dictModel);
});
manyDragDictItems.put(k,dictItems);
manyDragDictItems.put(k, dictItems);
});
return manyDragDictItems;
}
/**
*
* @param dictCode
* @return
*/
@Override
public List<DragDictModel> getDictItems(String dictCode) {
List<DragDictModel> dictItems = new ArrayList<>();
if(oConvertUtils.isNotEmpty(dictCode)){
List<DragDictModel> dictItems = new ArrayList<>();
if (oConvertUtils.isNotEmpty(dictCode)) {
List<DictModel> dictItemsList = sysBaseApi.getDictItems(dictCode);
dictItemsList.forEach(dictItem->{
dictItemsList.forEach(dictItem -> {
DragDictModel dictModel = new DragDictModel();
BeanUtils.copyProperties(dictItem,dictModel);
BeanUtils.copyProperties(dictItem, dictModel);
dictItems.add(dictModel);
});
}
@@ -78,25 +79,27 @@ public class JimuDragExternalServiceImpl implements IOnlDragExternalService {
/**
* 添加日志
*
* @param dragLogDTO
*/
@Override
public void addLog(DragLogDTO dragLogDTO) {
if(oConvertUtils.isNotEmpty(dragLogDTO)){
if (oConvertUtils.isNotEmpty(dragLogDTO)) {
LogDTO dto = new LogDTO();
BeanUtils.copyProperties(dragLogDTO,dto);
BeanUtils.copyProperties(dragLogDTO, dto);
baseCommonService.addLog(dto);
}
}
/**
* 保存日志
*
* @param logMsg
* @param logType
* @param operateType
*/
@Override
public void addLog(String logMsg, int logType, int operateType) {
baseCommonService.addLog(logMsg,logType,operateType);
baseCommonService.addLog(logMsg, logType, operateType);
}
}

View File

@@ -1,5 +1,6 @@
package org.jeecg.config.jimureport;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.SysUserCacheInfo;
@@ -12,15 +13,15 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import jakarta.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* 自定义积木报表鉴权(如果不进行自定义,则所有请求不做权限控制)
* * 1.自定义获取登录token
* * 2.自定义获取登录用户
* * 1.自定义获取登录token
* * 2.自定义获取登录用户
*
* @author: jeecg-boot
*/
@@ -48,7 +49,7 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
public String[] getRoles(String token) {
String username = JwtUtil.getUsername(token);
Set roles = sysBaseApi.getUserRoleSet(username);
if(CollectionUtils.isEmpty(roles)){
if (CollectionUtils.isEmpty(roles)) {
return null;
}
return (String[]) roles.toArray(new String[roles.size()]);
@@ -68,7 +69,7 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
try {
userInfo = sysBaseApi.getCacheUser(username);
} catch (Exception e) {
log.error("获取用户信息异常:"+ e.getMessage());
log.error("获取用户信息异常:" + e.getMessage());
return map;
}
//设置账号名