Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
an-plus-hr
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
anjia-hr
an-plus-hr
Commits
ef3bb2d0
Commit
ef3bb2d0
authored
Nov 12, 2025
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 完善项目配置
parent
12c9524a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
329 additions
and
23 deletions
+329
-23
CorsConfig.java
admin/src/main/java/com/anplus/hr/config/CorsConfig.java
+2
-2
RefreshDeptCacheAspect.java
...ain/java/com/anplus/hr/config/RefreshDeptCacheAspect.java
+5
-4
EmployeeScheduleService.java
...a/com/anplus/hr/service/impl/EmployeeScheduleService.java
+1
-1
EmployeeSysDeptServImpl.java
...a/com/anplus/hr/service/impl/EmployeeSysDeptServImpl.java
+0
-8
application-dev.yml
admin/src/main/resources/application-dev.yml
+2
-5
application-prod.yml
admin/src/main/resources/application-prod.yml
+187
-0
application.yml
admin/src/main/resources/application.yml
+3
-3
logback-spring-prod.xml
admin/src/main/resources/logback-spring-prod.xml
+129
-0
No files found.
admin/src/main/java/com/anplus/hr/config/CorsConfig.java
View file @
ef3bb2d0
...
...
@@ -5,8 +5,8 @@ import org.springframework.context.annotation.Profile;
import
org.springframework.web.servlet.config.annotation.CorsRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@Profile
(
"dev"
)
@Configuration
(
proxyBeanMethods
=
false
)
//
@Profile("dev")
//
@Configuration(proxyBeanMethods = false)
public
class
CorsConfig
implements
WebMvcConfigurer
{
@Override
public
void
addCorsMappings
(
CorsRegistry
registry
)
{
...
...
admin/src/main/java/com/anplus/hr/config/RefreshDeptCacheAspect.java
View file @
ef3bb2d0
...
...
@@ -44,12 +44,13 @@ public class RefreshDeptCacheAspect {
}
else
if
(
args
[
0
]
instanceof
Long
)
{
deptId
=
(
Long
)
args
[
0
];
}
// 清除部门缓存
CacheUtils
.
evict
(
HrCacheConstants
.
DEPT_AND_PARENT_NAME
,
deptId
+
""
);
if
(
deptId
!=
null
)
{
// 清除部门缓存
CacheUtils
.
evict
(
HrCacheConstants
.
DEPT_AND_PARENT_NAME
,
deptId
+
""
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"清
楚
部门缓存异常"
,
e
);
log
.
error
(
"清
除
部门缓存异常"
,
e
);
}
}
}
admin/src/main/java/com/anplus/hr/service/impl/EmployeeScheduleService.java
View file @
ef3bb2d0
...
...
@@ -30,7 +30,7 @@ public class EmployeeScheduleService {
* 方式1:使用cron表达式
* 每天凌晨1点执行
*/
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
//
@Scheduled(cron = "0 0 1 * * ?")
public
void
midnightTask
()
{
executeSafely
(
"刷新员工工龄以及年龄"
,
this
::
processRefreshInfo
);
}
...
...
admin/src/main/java/com/anplus/hr/service/impl/EmployeeSysDeptServImpl.java
View file @
ef3bb2d0
...
...
@@ -47,17 +47,10 @@ public class EmployeeSysDeptServImpl implements EmployeeSysDeptServ {
@Override
public
Map
<
String
,
Long
>
selectJoinDeptNames
()
{
// if (CollUtil.isEmpty(joinNameSet)) {
// return new HashMap<>();
// }
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
List
<
SysDeptDTO
>
sysDeptDTOS
=
sysDeptServ
.
deptTreeForOptions
();
traverseDeptTree
(
sysDeptDTOS
,
""
,
result
);
// for (String joinName : joinNameSet) {
// List<String> deptNameList = StrUtil.split(joinName, StrUtil.SLASH);
//
// }
return
result
;
}
...
...
@@ -66,7 +59,6 @@ public class EmployeeSysDeptServImpl implements EmployeeSysDeptServ {
if
(
CollUtil
.
isEmpty
(
deptList
))
{
return
;
}
for
(
TreeDTO
dept
:
deptList
)
{
String
currentPath
=
StrUtil
.
isEmpty
(
parentPath
)
?
dept
.
getLabel
()
:
parentPath
+
StrUtil
.
SLASH
+
dept
.
getLabel
();
...
...
admin/src/main/resources/application-dev.yml
View file @
ef3bb2d0
...
...
@@ -37,7 +37,7 @@ springdoc:
# persistAuthorization: true
info
:
# 标题
title
:
'
标题:
binfast
管理系统_接口文档'
title
:
'
标题:
人事
管理系统_接口文档'
# 描述
description
:
'
描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
# 版本
...
...
@@ -55,7 +55,7 @@ springdoc:
#这里定义了两个分组,可定义多个,也可以不定义
group-configs
:
-
group
:
1.管理端
packages-to-scan
:
top.binfast.app.admin,top.binfast.app.biz.sysbiz
packages-to-scan
:
com.anplus.hr,
top.binfast.app.admin,top.binfast.app.biz.sysbiz
-
group
:
2.微信端
packages-to-scan
:
top.binfast.app.weixin
...
...
@@ -185,6 +185,3 @@ justauth:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=gitea
current
:
domain
:
http://www.test.cn:8001
\ No newline at end of file
admin/src/main/resources/application-prod.yml
0 → 100644
View file @
ef3bb2d0
spring
:
datasource
:
dynamic
:
# 性能分析插件(有性能损耗 不建议生产环境使用)
p6spy
:
false
primary
:
master
strict
:
false
datasource
:
master
:
url
:
jdbc:mysql://119.184.127.215:13306/binfast?allowMultiQueries=true&characterEncoding=utf8&useSSL=true&useUnicode=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
username
:
root
password
:
antaikeji2019
type
:
com.zaxxer.hikari.HikariDataSource
logSource
:
url
:
jdbc:mysql://119.184.127.215:13306/binfast_log?allowMultiQueries=true&characterEncoding=utf8&useSSL=true&useUnicode=true&serverTimezone=GMT%2B8
username
:
root
password
:
antaikeji2019
type
:
com.zaxxer.hikari.HikariDataSource
redis
:
redisson
:
keyPrefix
:
file
:
classpath:redisson-dev.yml
logging
:
level
:
top.binfast
:
info
org.springframework
:
warn
org.mybatis.spring.mapper
:
error
org.apache.fury
:
warn
config
:
classpath:logback-spring-prod.xml
springdoc
:
api-docs
:
# 是否开启接口文档
enabled
:
true
# swagger-ui:
# # 持久化认证数据
# persistAuthorization: true
info
:
# 标题
title
:
'
标题:人事管理系统_接口文档'
# 描述
description
:
'
描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
# 版本
version
:
'
版本号:
1.0'
# 作者信息
contact
:
name
:
binfast
components
:
# 鉴权方式配置
security-schemes
:
apiKey
:
type
:
APIKEY
in
:
HEADER
name
:
Authorization
#这里定义了两个分组,可定义多个,也可以不定义
group-configs
:
-
group
:
1.管理端
packages-to-scan
:
com.anplus.hr,top.binfast.app.admin,top.binfast.app.biz.sysbiz
-
group
:
2.微信端
packages-to-scan
:
top.binfast.app.weixin
oss
:
enable
:
true
endpoint
:
https://oss-cn-hangzhou.aliyuncs.com
# 也可以采用自定义域名
# endpoint: https://rjyefa9l9.hn-bkt.clouddn.com
access-key
:
AASFFFKKK
access-secret
:
PPSFSFAFJH8783JJK
bucket
:
binfast
region
:
cn-hangzhou
---
# sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
# https://sms4j.com/doc3/ 差异配置文档地址 支持单厂商多配置,可以配置多个同时使用
sms
:
isPrint
:
false
# 配置源类型用于标定配置来源(interface,yaml)
config-type
:
yaml
# 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
restricted
:
true
# 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
minute-max
:
1
# 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
account-max
:
30
# 以下配置来自于 org.dromara.sms4j.provider.config.BaseConfig类中
blends
:
# 唯一ID 用于发送短信寻找具体配置 随便定义别用中文即可
# 可以同时存在两个相同厂商 例如: ali1 ali2 两个不同的阿里短信账号 也可用于区分租户
config1
:
# 框架定义的厂商名称标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
supplier
:
alibaba
# 有些称为accessKey有些称之为apiKey,也有称为sdkKey或者appId。
access-key-id
:
您的accessKey
# 称为accessSecret有些称之为apiSecret
access-key-secret
:
您的accessKeySecret
signature
:
您的短信签名
sdk-app-id
:
您的sdkAppId
config2
:
# 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
supplier
:
tencent
access-key-id
:
您的accessKey
access-key-secret
:
您的accessKeySecret
signature
:
您的短信签名
sdk-app-id
:
您的sdkAppId
---
# 三方授权
justauth
:
enable
:
true
# 前端外网访问地址
address
:
http://localhost:80
type
:
maxkey
:
# maxkey 服务器地址
# 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
server-url
:
http://sso.maxkey.top
client-id
:
876892492581044224
client-secret
:
x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
redirect-uri
:
${justauth.address}/social-callback?source=maxkey
topiam
:
# topiam 服务器地址
server-url
:
http://127.0.0.1:1898/api/v1/authorize/y0q************spq***********8ol
client-id
:
449c4*********937************759
client-secret
:
ac7***********1e0************28d
redirect-uri
:
${justauth.address}/social-callback?source=topiam
scopes
:
[
openid
,
email
,
phone
,
profile
]
qq
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=qq
union-id
:
false
weibo
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=weibo
gitee
:
client-id
:
91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
client-secret
:
02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
redirect-uri
:
${justauth.address}/social-callback?source=gitee
dingtalk
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=dingtalk
baidu
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=baidu
csdn
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=csdn
coding
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=coding
coding-group-name
:
xx
oschina
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=oschina
alipay_wallet
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=alipay_wallet
alipay-public-key
:
MIIB**************DAQAB
wechat_open
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=wechat_open
wechat_mp
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=wechat_mp
wechat_enterprise
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=wechat_enterprise
agent-id
:
1000002
gitlab
:
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=gitlab
gitea
:
# 前端改动 https://gitee.com/JavaLionLi/plus-ui/pulls/204
# gitea 服务器地址
server-url
:
https://demo.gitea.com
client-id
:
10**********6
client-secret
:
1f7d08**********5b7**********29e
redirect-uri
:
${justauth.address}/social-callback?source=gitea
admin/src/main/resources/application.yml
View file @
ef3bb2d0
...
...
@@ -23,7 +23,7 @@ spring:
profiles
:
active
:
dev
application
:
name
:
binfast
-admin
name
:
hr
-admin
threads
:
# 开启虚拟线程 仅jdk21可用
virtual
:
...
...
@@ -172,7 +172,7 @@ easy-trans:
mp-new
:
true
dict
:
basePackages
:
-
top.binfast.app.admin.services
-
com.anplus.hr.constant
thread-pool
:
enabled
:
true
...
...
@@ -219,7 +219,7 @@ codegen:
# 作者
author
:
LiuBin
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName
:
top.binfast.app
packageName
:
com.anplus.hr
# 自动去除表前缀,默认是false
autoRemovePre
:
false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
...
...
admin/src/main/resources/logback-spring-prod.xml
0 → 100644
View file @
ef3bb2d0
<?xml version="1.0" encoding="UTF-8"?>
<!--
小技巧: 在根pom里面设置统一存放路径,统一管理方便维护
<properties>
<log-path>/Users/lengleng</log-path>
</properties>
1. 其他模块加日志输出,直接copy本文件放在resources 目录即可
2. 注意修改 <property name="${log-path}/log.path" value=""/> 的value模块
-->
<configuration
debug=
"false"
scan=
"false"
>
<property
name=
"log.path"
value=
"./logs"
/>
<!-- 日志最大的历史 30天 -->
<property
name=
"log.maxHistory"
value=
"30"
/>
<property
name=
"log.level"
value=
"debug"
/>
<property
name=
"log.maxSize"
value=
"50MB"
/>
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<property
name=
"LOG_PATTERN"
value=
"%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n"
/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule
conversionWord=
"clr"
class=
"org.springframework.boot.logging.logback.ColorConverter"
/>
<conversionRule
conversionWord=
"wex"
class=
"org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"
/>
<conversionRule
conversionWord=
"wEx"
class=
"org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"
/>
<!-- Console log output -->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
<charset>
utf-8
</charset>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender
name=
"file_console"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/console.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 日志文件名格式 -->
<fileNamePattern>
${log.path}/console.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- 日志最大 1天 -->
<maxHistory>
1
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${LOG_PATTERN}
</pattern>
<charset>
utf-8
</charset>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<!-- 过滤的级别 -->
<level>
INFO
</level>
</filter>
</appender>
<!-- Log file info output -->
<appender
name=
"info"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/info.log
</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/%d{yyyy-MM, aux}/info.%d{yyyy-MM-dd}.%i.log.gz
</fileNamePattern>
<maxFileSize>
${log.maxSize}
</maxFileSize>
<maxHistory>
${log.maxHistory}
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<level>
INFO
</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>
ACCEPT
</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- Log file error output -->
<appender
name=
"error"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/error.log
</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz
</fileNamePattern>
<maxFileSize>
${log.maxSize}
</maxFileSize>
<maxHistory>
${log.maxHistory}
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<level>
ERROR
</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>
ACCEPT
</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 异步输出 -->
<!-- <appender name="ASYNC-INFO" class="ch.qos.logback.classic.AsyncAppender">-->
<!-- <!– 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 –>-->
<!-- <discardingThreshold>0</discardingThreshold>-->
<!-- <!– 更改默认的队列的深度,该值会影响性能.默认值为256 –>-->
<!-- <queueSize>256</queueSize>-->
<!-- <!– 开启记录信息 –>-->
<!-- <includeCallerData>true</includeCallerData>-->
<!-- <!– 添加附加的appender,最多只能添加一个 –>-->
<!-- <appender-ref ref="info"/>-->
<!-- </appender>-->
<!-- <appender name="ASYNC-ERROR" class="ch.qos.logback.classic.AsyncAppender">-->
<!-- <!– 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 –>-->
<!-- <discardingThreshold>0</discardingThreshold>-->
<!-- <!– 更改默认的队列的深度,该值会影响性能.默认值为256 –>-->
<!-- <queueSize>256</queueSize>-->
<!-- <!– 开启记录信息 –>-->
<!-- <includeCallerData>true</includeCallerData>-->
<!-- <!– 添加附加的appender,最多只能添加一个 –>-->
<!-- <appender-ref ref="error"/>-->
<!-- </appender>-->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"INFO"
>
<!-- <appender-ref ref="console"/>-->
<appender-ref
ref=
"file_console"
/>
<appender-ref
ref=
"info"
/>
<appender-ref
ref=
"error"
/>
</root>
</configuration>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment