mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-11 17:30:29 +08:00
feat: 租户访客策略 SQL、访客邀约验证包、component-org 与发布脚本
- docs/sql: organization_* 与 tenant_* 访客楼层策略脚本 - docs/testing: 访客邀约页初始化验证、pack 脚本与 README(忽略 dist/__pycache__) - maven-ninca-common-component-organization: CpImageStoreServiceImpl、starter、run-verify、releases 脚本与 javap 审计 JSON - docs/superpowers: component-org 生产问题修复计划 - scripts/test-env/prepare-db.sh 更新 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+176
@@ -0,0 +1,176 @@
|
||||
# =============================================================================
|
||||
# 组织组件本地/测试启动覆盖配置
|
||||
# 加载顺序:classpath(jar 内公共 application.properties)→ 本目录(见 run-verify.sh,仅 application 名,不含 application-node)
|
||||
# 现场部署参考:部署包/.../application-node.properties + start.sh
|
||||
# =============================================================================
|
||||
|
||||
# --- 本地/测试强制覆盖 ---
|
||||
spring.application.name=ninca-common-component-organization
|
||||
server.port=17026
|
||||
server.instance-id=component-organization-verify-local
|
||||
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=123456
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://192.168.3.12:3307/component-organization?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
eureka.client.enabled=false
|
||||
spring.cloud.consul.enabled=false
|
||||
spring.cloud.consul.discovery.enabled=false
|
||||
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6380
|
||||
spring.redis.password=1qaz!QAZ
|
||||
spring.redis.database=6
|
||||
spring.redis.timeout=5000
|
||||
spring.redis.pool.max-wait=-1
|
||||
spring.redis.pool.max-active=200
|
||||
spring.redis.pool.min-idle=0
|
||||
spring.redis.pool.max-idle=8
|
||||
|
||||
logging.path=/tmp/ninca-component-org-verify-logs
|
||||
logging.level.root=INFO
|
||||
|
||||
# 日志实现由 run-verify.sh 传入 --logging.config=file:…/recognition-logback.xml(勿在此处写 classpath:recognition-logback.xml,以免覆盖失效)
|
||||
|
||||
# --- Spring 通用(与部署包一致)---
|
||||
spring.jackson.time-zone=GMT+8
|
||||
spring.http.encoding.charset=UTF-8
|
||||
spring.http.encoding.enabled=true
|
||||
spring.http.encoding.force=true
|
||||
|
||||
# --- i18n(BOOT-INF 同名)---
|
||||
spring.messages.basename=messages_zh_CN,component-account/messages_zh_CN,component-resource/messages_zh_CN,core-aggregate/messages_zh_CN,core-device/messages_zh_CN,devicesdk/messages_zh_CN,component-org/messages_zh_CN
|
||||
|
||||
# --- 上传限制 ---
|
||||
cloudwalk.multipart.maxFileSize=50MB
|
||||
cloudwalk.multipart.maxRequestSize=50MB
|
||||
|
||||
# --- Quartz(占位符引用当前数据源)---
|
||||
quartz.driver=${spring.datasource.driver-class-name}
|
||||
quartz.url=${spring.datasource.url}
|
||||
quartz.user=${spring.datasource.username}
|
||||
quartz.password=${spring.datasource.password}
|
||||
quartz.maxConnections=20
|
||||
quartz.schedulerName=${spring.application.name}
|
||||
quartz.clustered=true
|
||||
quartz.strategy=local
|
||||
quartz.lazyStart=120
|
||||
quartz.pool-type=druid
|
||||
|
||||
# --- 注册照质量分 ---
|
||||
imageQualityScore=0.65
|
||||
|
||||
# --- 本机验证路径(替代部署包 /data/cwos/…)---
|
||||
cloudwalk.common-app.download.downDir=/tmp/ninca-component-org-verify/download
|
||||
cloudwalk.component.file.urlPrefix=http://127.0.0.1:${server.port}/ninca-common-component-organization/file/imgByPath?path=
|
||||
qr.code.url=http://127.0.0.1:${server.port}/general-person-h5/#/register?businessId=
|
||||
|
||||
# --- Feign 服务名(与部署包一致;上游需注册或可改 ribbon list)---
|
||||
feign.davinci-portal.name=cwos-portal
|
||||
feign.resource.name=cwos-portal
|
||||
feign.portal.name=cwos-portal
|
||||
feign.device.name=cwos-portal
|
||||
feign.pineapple.name=cloudwalk-pineapple-manager
|
||||
|
||||
# --- 定时任务 cron ---
|
||||
cloudwalk.imageStore.person.cron=0 */2 * * * ?
|
||||
cloudwalk.imageStore.imageSync.cron=0 */2 * * * ?
|
||||
|
||||
# --- 导出限制(部署包数值)---
|
||||
cloudwalk.common-app.download.excelMaxRows=10000
|
||||
cloudwalk.common-app.download.exportAllCount=100000
|
||||
cloudwalk.common-app.download.shardingSize=31457280
|
||||
cloudwalk.common-app.download.compressionType=.zip
|
||||
|
||||
# --- Kafka(测试环境:未起 Kafka 时可改为本机或注释依赖;此处保留部署包结构便于对齐)---
|
||||
cloudwalk.component-organization.kafka.service-code=imgstoreApp
|
||||
cloudwalk.component-organization.kafka.producer.groupId=component-organization
|
||||
cloudwalk.component-organization.kafka.consumer.groupId=component-organization
|
||||
# 覆盖 BOOT-INF 内网地址:可按 env.sh / Docker 修改
|
||||
cloudwalk.component-organization.kafka.producer.bootstrapServers=127.0.0.1:9092
|
||||
cloudwalk.component-organization.kafka.consumer.bootstrapServers=127.0.0.1:9092
|
||||
|
||||
person.name.space=componentOrg
|
||||
|
||||
# --- Management(与部署包规律:业务端口 +100)---
|
||||
management.port=17126
|
||||
management.context-path=/actuator
|
||||
management.security.enabled=false
|
||||
endpoints.enabled=false
|
||||
endpoints.info.enabled=true
|
||||
endpoints.health.enabled=true
|
||||
endpoints.prometheus.enabled=true
|
||||
|
||||
# --- 图库同步(线程池取部署包「根目录」application.properties 较大规格,便于压测对齐)---
|
||||
group-person.syn.config.task_is_all.threshold=100
|
||||
group-person.syn.config.lock-handle-syn-task-second=150
|
||||
ninca.group.person.syn.pool.corePoolSize=40
|
||||
ninca.group.person.syn.pool.maxPoolSize=80
|
||||
ninca.group.person.syn.pool.queueCapacity=1000
|
||||
ninca.group.person.syn.pool.keepAliveSeconds=150
|
||||
ninca.group.person.syn.pool.allowCoreThreadTimeOut=true
|
||||
group-person.delete.keep.days=7
|
||||
|
||||
device.report.thread.corePoolSize=20
|
||||
device.report.thread.maxPoolSize=40
|
||||
device.report.thread.queueCapacity=500
|
||||
device.report.thread.keepAliveSeconds=150
|
||||
device.report.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
device.group.change.thread.corePoolSize=20
|
||||
device.group.change.thread.maxPoolSize=40
|
||||
device.group.change.thread.queueCapacity=500
|
||||
device.group.change.thread.keepAliveSeconds=150
|
||||
device.group.change.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
handle.image.thread.corePoolSize=40
|
||||
handle.image.thread.maxPoolSize=160
|
||||
handle.image.thread.queueCapacity=2000
|
||||
handle.image.thread.keepAliveSeconds=150
|
||||
handle.image.thread.allowCoreThreadTimeOut=true
|
||||
|
||||
ninca.picture.revision.pool.corePoolSize=5
|
||||
ninca.picture.revision.pool.maxPoolSize=5
|
||||
ninca.picture.revision.pool.queueCapacity=100000
|
||||
ninca.picture.revision.pool.keepAliveSeconds=150
|
||||
ninca.picture.revision.pool.allowCoreThreadTimeOut=true
|
||||
|
||||
device.report.approach.time.diff.milliseconds=1000
|
||||
device.person.sync.time.diff.minutes=60
|
||||
cwos.image.store.sync.log=false
|
||||
device.group.pull.time.diff.minutes=10
|
||||
|
||||
ribbon.ReadTimeout=10000
|
||||
ribbon.ConnectTimeout=10000
|
||||
|
||||
# --- 图片 / 人脸像素限制 ---
|
||||
image.size.min=10240
|
||||
image.size.max=3145728
|
||||
image.width.min=30
|
||||
image.width.max=400
|
||||
image.height.min=30
|
||||
image.height.max=400
|
||||
face.width.min=100
|
||||
face.width.max=400
|
||||
face.height.min=100
|
||||
face.height.max=400
|
||||
|
||||
revision.engine.port=20010
|
||||
group-person.syn.config.delay-add-validate-data=false
|
||||
group-person.syn.config.delay-add-validate-hour=48
|
||||
group-person.syn.config.delay-handle-validate.cron=1 0 0 /1 * ? *
|
||||
group-person.syn.config.handle-group-face-exception.cron=0 */5 * * * ?
|
||||
|
||||
# --- 星河湾业务常量(与部署包根目录 application.properties 一致)---
|
||||
xhwId=21474e012cd14e26bc62771873b22562
|
||||
xhwDefaultFloorId=605560547135455232
|
||||
xhwSixFloorId=605560541473144832
|
||||
support.muti.group.device.type=CW-IS1330,-8,MTD8
|
||||
|
||||
# --- cloudwalk-common-serial(UUIDSerial / Snowflake;与电梯应用一致)---
|
||||
cloudwalk.serial.enabled=true
|
||||
cloudwalk.serial.serial-length=8
|
||||
cloudwalk.serial.serial-type=redis
|
||||
cloudwalk.serial.serial-redis-key=CLOUDWALK-ACS-SERIAL-KEY
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# 配置顺序:classpath(fat jar 内公共 application.properties)
|
||||
# → 本目录 application.properties(本地 MySQL/Redis、关 Consul)。
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../../../../" && pwd)"
|
||||
source "$REPO_ROOT/scripts/test-env/config/env.sh" 2>/dev/null || true
|
||||
|
||||
JAR="$SCRIPT_DIR/../../target/ninca-common-component-organization-2.9.4-xinghewan.jar"
|
||||
JAVA_BIN="${JAVA_HOME:-/usr/lib/jvm/java-8-openjdk-amd64}/bin/java"
|
||||
|
||||
if [[ ! -f "$JAR" ]]; then
|
||||
echo "Missing $JAR — run: mvn -pl cwos-component-organization-starter -am package -DskipTests" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$JAVA_BIN" -jar "$JAR" \
|
||||
--spring.config.location="classpath:/,classpath:/config/,file:${SCRIPT_DIR}/" \
|
||||
--spring.config.name=application \
|
||||
--spring.cloud.bootstrap.location="file:${SCRIPT_DIR}/bootstrap.properties" \
|
||||
--logging.config="file:${SCRIPT_DIR}/recognition-logback.xml" \
|
||||
--spring.main.banner-mode=off \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user