mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、系统登录改造:首页移除机构、新用户用手机号登录(机构新增组织管理员移除账号密码、新增用户移除账号密码)、需要验证码的部分(首页忘记密码、修改密保手机);2、组织权限菜单树增加visiable属性过滤;3、支持钉钉、阿里云短信配置加密、对接系统发送短信;
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
package com.cf.imes.framework.datasource.config;
|
||||
|
||||
import com.baomidou.dynamic.datasource.event.DataSourceInitEvent;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
|
||||
import com.cf.imes.framework.mybatis.core.event.ChenfengDataSourceEncryptInitEvent;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2024/8/26 18:20
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@AutoConfigureBefore(DynamicDataSourceAutoConfiguration.class)
|
||||
public class ChenfengDataSourceEncryptConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnProperty(name = "chenfeng.encrypt.enable", havingValue = "true")
|
||||
public DataSourceInitEvent getDataSourceInitEvent() {
|
||||
return new ChenfengDataSourceEncryptInitEvent();
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.cf.imes.framework.mybatis.core.event;
|
||||
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.event.DataSourceInitEvent;
|
||||
import com.cf.imes.framework.common.util.encrypt.AesUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2024/8/27 9:09
|
||||
*/
|
||||
public class ChenfengDataSourceEncryptInitEvent implements DataSourceInitEvent {
|
||||
@Value("${chenfeng.encrypt.publicKey:}")
|
||||
private String publicKey;
|
||||
|
||||
/**
|
||||
* 数据源创建前
|
||||
*
|
||||
* @param dataSourceProperty 数据源基础信息
|
||||
*/
|
||||
@Override
|
||||
public void beforeCreate(DataSourceProperty dataSourceProperty) {
|
||||
if (StringUtils.isNotEmpty(publicKey)) {
|
||||
dataSourceProperty.setUsername(AesUtils.decrypt(dataSourceProperty.getUsername(), publicKey));
|
||||
dataSourceProperty.setPassword(AesUtils.decrypt(dataSourceProperty.getPassword(), publicKey));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据源创建后
|
||||
*
|
||||
* @param dataSource 连接池
|
||||
*/
|
||||
@Override
|
||||
public void afterCreate(DataSource dataSource) {
|
||||
|
||||
}
|
||||
}
|
||||
+1
@@ -1,2 +1,3 @@
|
||||
com.cf.imes.framework.datasource.config.ChenfengDataSourceEncryptConfiguration
|
||||
com.cf.imes.framework.datasource.config.ChenfengDataSourceAutoConfiguration
|
||||
com.cf.imes.framework.mybatis.config.ChenfengMybatisAutoConfiguration
|
||||
|
||||
Reference in New Issue
Block a user