fix: 优化逻辑
This commit is contained in:
parent
42df8c9498
commit
9c52bb1c73
@ -204,7 +204,7 @@ public class SmsVerifyCodeController {
|
|||||||
selectedBasinCodes.addAll(Arrays.asList(hbrvcdCode.split(",")));
|
selectedBasinCodes.addAll(Arrays.asList(hbrvcdCode.split(",")));
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> addedStationCodes = new HashSet<>();
|
// Set<String> addedStationCodes = new HashSet<>();
|
||||||
|
|
||||||
for (String basinCode : selectedBasinCodes) {
|
for (String basinCode : selectedBasinCodes) {
|
||||||
if (StringUtils.isEmpty(basinCode)) {
|
if (StringUtils.isEmpty(basinCode)) {
|
||||||
@ -241,7 +241,7 @@ public class SmsVerifyCodeController {
|
|||||||
scope.setStatus(1);
|
scope.setStatus(1);
|
||||||
scope.setPermissionType("READ");
|
scope.setPermissionType("READ");
|
||||||
sysUserDataScopeService.addDataScope(scope);
|
sysUserDataScopeService.addDataScope(scope);
|
||||||
addedStationCodes.add(basinCode);
|
// addedStationCodes.add(basinCode);
|
||||||
} else {
|
} else {
|
||||||
Set<String> stationsInBasinAndSelected = allStationCodesInBasin.stream()
|
Set<String> stationsInBasinAndSelected = allStationCodesInBasin.stream()
|
||||||
.filter(selectedStationCodes::contains)
|
.filter(selectedStationCodes::contains)
|
||||||
@ -255,27 +255,27 @@ public class SmsVerifyCodeController {
|
|||||||
scope.setStatus(1);
|
scope.setStatus(1);
|
||||||
scope.setPermissionType("READ");
|
scope.setPermissionType("READ");
|
||||||
sysUserDataScopeService.addDataScope(scope);
|
sysUserDataScopeService.addDataScope(scope);
|
||||||
addedStationCodes.add(stationCd);
|
// addedStationCodes.add(stationCd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> standaloneStations = selectedStationCodes.stream()
|
// Set<String> standaloneStations = selectedStationCodes.stream()
|
||||||
.filter(code -> !addedStationCodes.contains(code))
|
// .filter(code -> !addedStationCodes.contains(code))
|
||||||
.collect(Collectors.toSet());
|
// .collect(Collectors.toSet());
|
||||||
|
//
|
||||||
for (String stationCd : standaloneStations) {
|
// for (String stationCd : standaloneStations) {
|
||||||
if (StringUtils.isEmpty(stationCd)) {
|
// if (StringUtils.isEmpty(stationCd)) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
SysUserDataScope scope = new SysUserDataScope();
|
// SysUserDataScope scope = new SysUserDataScope();
|
||||||
scope.setUserId(userId);
|
// scope.setUserId(userId);
|
||||||
scope.setOrgType("STATION");
|
// scope.setOrgType("STATION");
|
||||||
scope.setOrgId(stationCd);
|
// scope.setOrgId(stationCd);
|
||||||
scope.setStatus(1);
|
// scope.setStatus(1);
|
||||||
scope.setPermissionType("READ");
|
// scope.setPermissionType("READ");
|
||||||
sysUserDataScopeService.addDataScope(scope);
|
// sysUserDataScopeService.addDataScope(scope);
|
||||||
}
|
// }
|
||||||
SysUser user = new SysUser();
|
SysUser user = new SysUser();
|
||||||
user.setId(userId);
|
user.setId(userId);
|
||||||
userService.updateUserRoles( user,"c13481a486c9ee559cf305284df4d207");
|
userService.updateUserRoles( user,"c13481a486c9ee559cf305284df4d207");
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
server:
|
server:
|
||||||
port: 8090
|
port: 8093
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
#应用名称
|
#应用名称
|
||||||
@ -9,44 +9,117 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
druid:
|
druid:
|
||||||
master:
|
master:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: oracle.jdbc.OracleDriver
|
||||||
url: "${DB_MASTER_URL:jdbc:mysql://43.138.168.68:3306/frameworkdb2025?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true}"
|
url: "${DB_MASTER_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
|
||||||
username: "${DB_MASTER_USERNAME:root}"
|
username: "${DB_MASTER_USERNAME:QGC_REFA}"
|
||||||
password: "${DB_MASTER_PASSWORD:}"
|
password: "${DB_MASTER_PASSWORD:Y4M4K1oCkL8U}"
|
||||||
|
slave:
|
||||||
|
driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
url: "${DB_SLAVE_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
|
||||||
|
username: "${DB_SLAVE_USERNAME:QGC_REFA}"
|
||||||
|
password: "${DB_SLAVE_PASSWORD:Y4M4K1oCkL8U}"
|
||||||
|
|
||||||
|
jackson:
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
mvc:
|
mvc:
|
||||||
pathmatch:
|
pathmatch:
|
||||||
matching-strategy: ant_path_matcher
|
matching-strategy: ant_path_matcher
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 30MB
|
max-file-size: 300MB
|
||||||
max-request-size: 100MB
|
max-request-size: 500MB
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
name: logs/projectname.log
|
name: logs/platform-dev.log
|
||||||
|
|
||||||
level:
|
level:
|
||||||
com.genersoft.iot: debug
|
root: info
|
||||||
com.genersoft.iot.vmp.storager.dao: info
|
com.yfd.platform: info
|
||||||
com.genersoft.iot.vmp.gb28181: info
|
# com.yfd.platform.*.mapper: trace
|
||||||
|
|
||||||
# 在线文档: swagger-ui(生产环境建议关闭)
|
# 在线文档: swagger-ui(生产环境建议关闭)
|
||||||
swagger-ui:
|
swagger-ui:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
file-space: #项目文档空间
|
mybatis-plus:
|
||||||
files: D:\demoproject\files\ #单独上传的文件附件
|
# mapper-locations: classpath*:**/mapper/*Mapper.xml,classpath*:**/mapping/*Mapper.xml
|
||||||
useravatar: D:\demoproject\useravatar\ #用户头像
|
global-config:
|
||||||
system: D:\demoproject\system\ #系统文档根目录,用于头像等静态资源
|
banner: false
|
||||||
|
db-config:
|
||||||
|
id-type: ASSIGN_ID
|
||||||
|
insert-strategy: not_null
|
||||||
|
update-strategy: not_null
|
||||||
|
select-strategy: not_empty
|
||||||
|
table-underline: true
|
||||||
|
logic-delete-value: 1
|
||||||
|
logic-not-delete-value: 0
|
||||||
|
logic-delete-field: isDeleted
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
cache-enabled: false
|
||||||
|
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||||
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
|
|
||||||
|
# 登录相关配置
|
||||||
|
login:
|
||||||
|
# 登录缓存
|
||||||
|
cache-enable: true
|
||||||
|
# 是否限制单用户登录
|
||||||
|
single-login: false
|
||||||
|
# 验证码
|
||||||
|
login-code:
|
||||||
|
# 验证码类型配置 查看 LoginProperties 类
|
||||||
|
code-type: arithmetic
|
||||||
|
|
||||||
# 启动自动数据库初始化(仅 dev/server):
|
# 启动自动数据库初始化(仅 dev/server):
|
||||||
app:
|
app:
|
||||||
|
# ZIP导入临时目录配置
|
||||||
|
zip-import:
|
||||||
|
temp-dir: ${ZIP_IMPORT_TEMP_DIR:/qgc-platform/tmp/zip_import_temp}
|
||||||
init:
|
init:
|
||||||
enabled: true
|
enabled: false
|
||||||
schema: classpath:db-init/sql/min-schema.sql
|
schema: classpath:db-init/sql/min-schema.sql
|
||||||
# data 文件可选;为避免复杂 dump 解析问题,先不导入
|
# data 文件可选;为避免复杂 dump 解析问题,先不导入
|
||||||
# data:
|
# data:
|
||||||
marker-table: sys_user
|
marker-table: sys_user
|
||||||
marker-version: v1.0.0
|
marker-version: v1.0.0
|
||||||
|
# 登录图形验证码有效时间/分钟
|
||||||
|
expiration: 2
|
||||||
|
# 验证码高度
|
||||||
|
width: 111
|
||||||
|
# 验证码宽度
|
||||||
|
heigth: 36
|
||||||
|
# 内容长度
|
||||||
|
length: 2
|
||||||
|
# 字体名称,为空则使用默认字体
|
||||||
|
font-name:
|
||||||
|
# 字体大小
|
||||||
|
font-size: 25
|
||||||
|
|
||||||
|
# IP 本地解析
|
||||||
|
ip:
|
||||||
|
local-parsing: true
|
||||||
|
|
||||||
|
|
||||||
|
file-space: #项目文档空间
|
||||||
|
files: /qgc-platform/files/ #单独上传的文件附件
|
||||||
|
system: /qgc-platform/system/ #单独上传的文件
|
||||||
|
|
||||||
|
task:
|
||||||
|
pool:
|
||||||
|
# 核心线程池大小
|
||||||
|
core-pool-size: 10
|
||||||
|
# 最大线程数
|
||||||
|
max-pool-size: 30
|
||||||
|
# 活跃时间
|
||||||
|
keep-alive-seconds: 60
|
||||||
|
# 队列容量
|
||||||
|
queue-capacity: 50
|
||||||
|
|
||||||
|
attachment:
|
||||||
|
token: ${ATTACHMENT_TOKEN:qgcBkod25ngBa4wu8BtfCPYsJ7lQGVDoexH}
|
||||||
|
upload-url: ${ATTACHMENT_UPLOAD_URL:http://172.16.31.185:18200/upload}
|
||||||
|
video-url: ${ATTACHMENT_VIDEO_URL:http://172.16.31.185:18200/upload}
|
||||||
|
delete-url: ${ATTACHMENT_DELETE_URL:http://172.16.31.185:18200/delete}
|
||||||
Loading…
Reference in New Issue
Block a user