feat: 用户启停/注销、机构账号查询、手机号查记录、机构上传配置

1. 用户管理:新增启用(user/enable)/禁用(user/disable)/注销(user/admin_cancel)接口,
   平台超管可操作全部用户,机构管理员限本机构;注销带分布式锁、禁自己/超管守卫
2. 禁用/注销立即踢下线:Redis黑名单(user:disabled:{uid}) + JWT过滤器拦截,
   TTL与token有效期一致
3. 系统管理员查看各机构账号:GET user/page/org_account(机构/账号/手机号等筛选)
4. 按手机号查上传/发送/接收记录:GET user_file/record/page_by_phone,
   发送/接收方向按部署侧 file.transfer.location 自动映射
5. 机构上传配置:新表 x_upload_config + upload_config/info|modify|check 接口,
   上传总开关/后缀白名单/单文件大小限制,网盘落库时强制校验
6. 加固:UserInfoDTO.setPassword 缺省密码未配置时不再抛 rawPassword cannot be null
7. 新增 x_upload_config 建表脚本(upgrade-20260915-release.sql 为上线版)、
   生产部署说明、前端接口文档×2、运维脚本 sfile-ctl.sh、AGENTS.md
This commit is contained in:
2026-09-15 12:14:27 +08:00
parent 54b7e9a555
commit c305ca946e
39 changed files with 2637 additions and 8 deletions

View File

@@ -0,0 +1,96 @@
server:
port: 8080
spring:
application:
name: s-file
datasource:
url: jdbc:postgresql://sfile-pg:5432/s_file
driver-class-name: org.postgresql.Driver
username: postgres
password: sfile123
druid:
initial-size: 2
min-idle: 2
max-active: 10
validation-query: SELECT 1
redis:
host: sfile-redis
port: 6379
timeout: 5000
lettuce:
pool:
max-active: 8
max-idle: 4
rabbitmq:
host: sfile-mq
port: 5672
username: guest
password: guest
servlet:
multipart:
max-file-size: 500MB
max-request-size: 500MB
main:
allow-bean-definition-overriding: true
mybatis-plus:
mapper-locations: classpath*:com/senmesh/**/mapper/*.xml
# 平台编码(init-data 中 uc_platform.platform_code=1)
system:
code: 1
# 发号器雪花 workerId(键格式: code.snowflake.workid.<容器IP>)
"[code.snowflake.workid.172.20.0.10]": 1
security:
jwt:
enable: true
secret: sfile-functional-test-secret-key-please-change-0123456789abcdef
expiration: 86400000
header: Authorization
ignoring: /error,/favicon.ico
login-page: /login
superior-only: false
use-local: true
allow-if-all-abstain-decisions: true
oauth2:
enable: false
not-logs: ""
# 新用户初始密码
user:
default:
password: Qaz123567!@#
file:
upload-dir: /data/upload
storage:
type: local
transfer:
# 内网侧
location: "1"
send-dir: /data/transfer/send
receive-dir: /data/transfer/receive
unpack-risk-check: false
dify:
risk:
rule:
api-key: test-rule-key
scan:
api-key: test-scan-key
rabbitmq:
custom:
topic-exchange-name: s-file-test-topic
delayed-exchange-name: s-file-test-delayed
broadcast-id: s-file-test-broadcast
swagger:
enable: false
logging:
level:
com.senmesh: info