Commit Graph
1663 Commits
Author SHA1 Message Date
ClaudeandClaude Opus 4.7 ccefc179cb docs: refresh CLAUDE.md and pin Claude's commit identity
- Rewrite project overview to match the current state of the codebase:
  corrected db-stack contents (Postgres + RabbitMQ only; Redis is not in
  docker-compose-db.yml, MQTT is in docker-compose-optional.yml), added
  Makefile-based workflows (podman compose wrappers with REGISTRY/STACK
  switches), listed the full set of dc3-common-* submodules and the new
  dc3-driver-listening-virtual driver, and noted the reactive R<T> /
  GrpcR response envelope and the lack of unit tests.
- Add a project-only rule instructing Claude to commit using the
  claude[bot] GitHub identity (209825114+claude[bot]@users.noreply.github.com)
  so Claude's commits show the real avatar on GitHub, matching how
  Copilot's commits already render in this repo's history. The repo's
  default git config is intentionally left untouched so the human
  author's own commits keep their own identity.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:47:11 +08:00
ClaudeandClaude Opus 4.7 831a3df366 refactor(manager): route TenantApi call through Facade
DriverRegisterServiceImpl was the last @GrpcClient holdout in
dc3-common-manager — it called TenantApi.selectByCode while processing
driver-registration requests from a driver. Swaps the stub for
TenantFacade so manager business code is now also @GrpcClient-free.

dc3-center-manager picks up facade-grpc and dc3.facade.mode=grpc to match
the distributed deployment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:46:56 +08:00
ClaudeandClaude Opus 4.7 9392b4d5fd feat(gateway): migrate auth filter chain to Facade and trim dependencies
FilterService previously exposed raw gRPC DTOs (GrpcRTenantDTO,
GrpcRUserLoginDTO) on its interface, leaking protocol into the gateway
filter. This commit:

- Reshapes FilterService signatures to return facade BOs (FacadeTenantBO,
  FacadeUserLoginBO) and renames methods for consistency
  (getTenantDTO -> getTenant, getLoginDTO -> getUserLogin, getUserDTO -> getUser)
- Rewrites FilterServiceImpl to inject Tenant/User/UserLogin/TokenFacade
  instead of four @GrpcClient stubs; TokenFacade returns a plain boolean
- Updates AuthenticGatewayFilter to use the new types
- Drops dc3-api-auth and grpc-client-spring-boot-starter from
  dc3-common-gateway (no longer directly referenced); facade-grpc brings
  them in transitively when gateway app runs in grpc mode
- dc3-gateway declares facade-grpc and pins dc3.facade.mode=grpc

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:46:44 +08:00
ClaudeandClaude Opus 4.7 c4a74f10a2 feat(data): migrate data module from @GrpcClient to Facade
Replaces all six @GrpcClient BlockingStub usages in dc3-common-data
business logic with Facade calls:

- DeviceStatusServiceImpl: DeviceApi -> DeviceFacade
- DriverStatusServiceImpl: DriverApi + DeviceApi -> DriverFacade + DeviceFacade;
  de-duplicates selectOnline/Offline logic along the way
- PointValueServiceImpl: PointApi -> PointFacade
- PointValueCommandServiceImpl: DriverApi -> DriverFacade

Business code no longer references GrpcXxxDTO / GrpcXxxQuery / BlockingStub
types at all. dc3-center-data declares facade-grpc and pins
dc3.facade.mode=grpc, keeping the distributed deployment behavior identical.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:46:30 +08:00
ClaudeandClaude Opus 4.7 7615eb9bee feat(facade): introduce facade layer for cross-service calls
Adds three new modules that let business code call center services
through protocol-neutral interfaces instead of @GrpcClient stubs:

- dc3-common-facade-api: Device/Driver/Point + Tenant/User/UserLogin/Token
  facade interfaces plus facade-owned BO/Query/Page types
- dc3-common-facade-local: in-process implementations backed by the
  auth/manager services; zero serialization cost in single deployments
- dc3-common-facade-grpc: gRPC implementations holding BlockingStubs;
  default mode for distributed deployments

Implementation selection is driven by dc3.facade.mode={local|grpc} via
@ConditionalOnProperty, with grpc as the matchIfMissing default. Wire-up
for dc3-center-single (dc3.facade.mode=local + facade-local dependency)
is included so the single-deployment mode is runnable out of the box.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:46:15 +08:00
Copilot 625ef7b30a feat: add .env file for Docker Compose configuration and update usage instructions 2026-04-21 01:11:59 +08:00
Copilot dd4e6b34cf fix: update Docker images to version 2026.5 across all docker-compose files 2026-04-20 03:16:30 +08:00
Copilot 44489157eb fix: exclude .mvn directory from dockerignore to allow Maven configuration 2026-04-20 00:26:54 +08:00
Vickey 3e078cf794 fix: correct JAVA_OPS syntax and update Maven command in Dockerfile 2026-04-19 14:07:19 +08:00
Vickey 6a4321923f chore: update version to 2026.4.19 across all modules and adjust branch settings in codeql.yml 2026-04-19 13:45:21 +08:00
Copilot 5491d15f96 fix: revert proto package to api.common.* to fix build breakage
Proto3 type resolution walks up the package hierarchy. After changing
package api.common.auth/data/manager to api.center.*, unqualified
references like GrpcR/GrpcBase (defined in api.common) can no longer
be resolved, causing PROTOC compile errors.

Revert package declarations to api.common.auth/data/manager while
keeping java_package as io.github.pnoker.api.center.* — java_package
is independent from proto package and controls Java output only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 02:05:36 +08:00
Vickey 83bd668628 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	dc3-api/pom.xml
#	dc3-common/pom.xml
#	pom.xml
2026-04-18 01:59:58 +08:00
Copilot 04e8d29bb8 fix: complete dc3-api proto optimization
1. manager_point.proto: add missing SelectById RPC and GrpcRPointDTO
   response message to match driver_point.proto symmetry

2. Rename java_outer_classname to include module prefix to avoid
   confusion between driver and manager modules:
   - driver: DeviceProto→DriverDeviceProto, DriverProto→DriverRegistrationProto,
     EntityProto→DriverEntityProto, PointProto→DriverPointProto,
     QueryProto→DriverQueryProto, QueryPageProto→DriverQueryPageProto
   - manager: DeviceProto→ManagerDeviceProto, DriverProto→ManagerDriverProto,
     PointProto→ManagerPointProto, QueryProto→ManagerQueryProto,
     QueryPageProto→ManagerQueryPageProto

3. Reorganize proto files into subdirectories matching proto package:
   - auth:    src/main/protobuf/api/center/auth/
   - data:    src/main/protobuf/api/center/data/
   - driver:  src/main/protobuf/api/common/driver/
   - manager: src/main/protobuf/api/center/manager/
   Update all intra-module imports to use full absolute paths

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:51:07 +08:00
Copilot 352fece66e fix: optimize dc3-api pom element order and proto files
- dc3-api/pom.xml: move <profiles> to after <build> per Maven POM
  standard element ordering; move <dependencyManagement> before
  <dependencies>
- driver_device.proto: rename driverConfigs/pointConfigs to
  driver_configs/point_configs (proto3 snake_case convention)
- auth/data/manager protos: align package declaration from
  api.common.xxx to api.center.xxx to match java_package option
- driver_entity.proto, driver_query.proto, driver_query_page.proto,
  manager_query_page.proto: remove trailing blank lines

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:41:47 +08:00
Copilot 079dbbf25e fix: remove invalid .* glob from @ComponentScan basePackages
Spring's @ComponentScan basePackages takes literal package names, not
glob patterns. The '.*' suffix was invalid and could cause unexpected
scan boundaries. Fixed 8 files:
- RedisInitRunner, ThreadInitRunner, MqttInitRunner, DataInitRunner
- DriverInitRunner, DalConfig, AuthInitRunner, ManagerInitRunner

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:34:05 +08:00
Copilot 339cdd304d chore: fix inceptionYear and scm connection in all pom.xml
- Fix <inceptionYear> from '2016-2022' to '2016' in 20 pom.xml files
- Fix <scm> connection/developerConnection to use scm:git: prefix in 22 pom.xml files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:31:07 +08:00
Copilot cb5e6d4526 refactor: optimize dc3-gateway and dc3-common-gateway
- Fix <inceptionYear> from '2016-2022' to '2016' in dc3-gateway/pom.xml
- Fix <scm> connection/developerConnection to use scm:git: prefix
- Fix trailing slash in auth_route_token URI in application-test.yml
- Fix @ComponentScan basePackages: 'io.github.pnoker.common.gateway.*' -> 'io.github.pnoker.common.gateway'
- Refactor AuthenticGatewayFilter: replace @Resource field injection with constructor injection
- Refactor AuthenticGatewayFilter: move getUserDTO() call outside headers lambda
- Refactor AuthenticGatewayFilter: distinguish UnAuthorizedException (warn) from unexpected errors (error+stacktrace)
- Extract writeErrorResponse() helper to eliminate duplicated response-building code

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:29:08 +08:00
Copilot b1f42ba5cc refactor: optimize root, dc3-common and dc3-api pom.xml
- Consolidate 19+ individual DC3 module version properties into single <dc3.version>
- Remove redundant <scope>compile</scope> from DC3 Api dependencyManagement entries
- Reorder elements: modules before properties, profiles after dependencyManagement
- Fix <scm> connection/developerConnection to use scm:git: protocol prefix
- Fix <inceptionYear> from range '2016-2022' to correct single year '2016'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:15:20 +08:00
Copilot 44393212d9 chore: bump version to 2026.4.18.3 and optimize pom.xml dependencies
- Bump all module versions from 2025.11.1 to 2026.4.18.3
- Remove orphaned dc3-common-influx dependency and property from root pom.xml
- Standardize dependency comment style in dc3-common/pom.xml
- Merge gRPC dependency groups into single section in dc3-common-api
- Restructure Spring Integration MQTT and Eclipse Paho groups in dc3-common-mqtt
- Fix incorrect comment 'DC3 Common Exception' to 'DC3 Common Related' in dc3-common-postgres
- Add missing blank line before </dependencies> in dc3-common-driver
- Remove stray blank line in root pom.xml dependencyManagement

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:05:30 +08:00
Copilot e13d75cbdf chore: bump version to 2026.4.18.3 and optimize pom.xml dependencies
- Bump all module versions from 2025.11.1 to 2026.4.18.3
- Remove orphaned dc3-common-influx dependency and property from root pom.xml
- Standardize dependency comment style in dc3-common/pom.xml
- Merge gRPC dependency groups into single section in dc3-common-api
- Restructure Spring Integration MQTT and Eclipse Paho groups in dc3-common-mqtt
- Fix incorrect comment 'DC3 Common Exception' to 'DC3 Common Related' in dc3-common-postgres
- Add missing blank line before </dependencies> in dc3-common-driver
- Remove stray blank line in root pom.xml dependencyManagement

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 01:05:30 +08:00
Vickey 75225a53f0 refactor: replace NioEventLoopGroup with MultiThreadIoEventLoopGroup to utilize NioIoHandler factory in UDP and TCP Netty servers 2026-02-11 11:58:48 +08:00
Vickey 3814145482 refactor: replace deprecated EnvironmentPostProcessor imports and update JsonMapper references 2026-02-11 11:56:52 +08:00
Vickey 8e7a437cc8 feat: add detailed JavaDoc comments to driver implementations and entry points 2026-01-07 20:03:06 +08:00
Vickey 5013ca096b feat: add JavaDoc comments and enhance field naming consistency across project 2026-01-07 17:07:46 +08:00
Vickey 66361055f4 feat: . 2026-01-07 15:19:43 +08:00
Vickey 013f0c0f19 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/PrefixConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/QueryWrapperConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/RequestConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/SuffixConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/SymbolConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/constant/common/TimeConstant.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/enums/DeviceEventTypeEnum.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/enums/DeviceStatusEnum.java
#	dc3-common/dc3-common-constant/src/main/java/io/github/pnoker/common/enums/EnableFlagEnum.java
2026-01-07 15:19:02 +08:00
zzi666 bb12374ff1 . 2026-01-06 21:20:54 +08:00
zzi666 e2025a09cc docs: Enhance documentation for various classes and methods
Updated JavaDoc comments across multiple classes, translating Chinese comments to English and providing detailed descriptions. This includes entity models, service implementations, and query objects, ensuring clarity on their purpose and functionality. Improved parameter and return value descriptions for better understanding and maintainability.
2026-01-05 17:53:08 +08:00
zzi666 47472b9689 docs: 完善MQTT和PostgreSQL相关类的文档注释
为MQTT模块的实体类、服务类、配置类以及PostgreSQL相关工具类和配置类添加详细的文档注释
包括类的作用、功能描述以及重要方法的说明
提升代码可读性和维护性,方便开发者理解和使用
2026-01-05 15:34:01 +08:00
zzi666 5c0669cc7d docs: 更新工具类和配置类的文档注释
完善多个工具类和配置类的JavaDoc文档注释,包括:
1. 工具类如HostUtil、PageUtil、CodeUtil等添加详细功能描述
2. 配置类如RedisConfig、RabbitConfig等补充配置说明
3. 实体类如TreeNode、Pages等增加数据结构描述
4. 服务接口如BaseService等添加方法说明
5. 正则工具类RegexUtil补充参数校验规则

统一文档格式,使用<p>标签分段,保持风格一致
2026-01-05 15:12:01 +08:00
zzi666 190e34d65f docs: 更新代码注释和文档说明
更新多个Java类中的注释,将中文注释翻译为英文并补充详细说明
包括线程池配置、业务对象、查询对象等核心组件的文档
添加方法参数和返回值的详细说明
2026-01-04 10:08:05 +08:00
zzi666 b001364147 docs(web): 完善Java类文档注释,增加英文描述和详细说明
更新多个Java类的文档注释,将中文注释补充为双语格式(中英文),并添加更详细的类和方法说明。
主要包括响应工具类、Web配置类、基础控制器接口和异常处理配置等核心组件。
2025-12-31 14:54:51 +08:00
zzi666 24c75ec69a docs(utils): 更新工具类文档注释为英文并补充详细说明
更新了多个工具类(FileUtil, CmdUtil, ServiceException, TimeUtil, DecodeUtil, JsonUtil)的文档注释:
1. 将中文注释翻译为英文
2. 补充了更详细的类和方法说明
3. 统一了文档格式和风格
4. 完善了参数和返回值的描述
2025-12-31 14:41:52 +08:00
zzi666 f7779cd453 docs(application): 更新应用类注释以提供更清晰的描述
更新了DataApplication、AuthApplication、ManagerApplication和SingleApplication类的注释,添加了更详细的服务描述和主要功能说明,使开发者更容易理解各服务的用途和入口点。
2025-12-31 14:24:35 +08:00
zzi666 342fb4df14 refactor(proto): 优化proto文件注释和结构
删除重复的README.md文件
统一proto文件的注释格式为"Configuration options for code generation"
简化proto消息和服务的注释,移除冗余描述
调整字段注释格式,增加可读性
2025-12-31 14:15:29 +08:00
zzi666 8a2d9829cb docs: 更新多个驱动模块的类注释文档
为S7 PLC、OPC-UA、MQTT和Modbus驱动模块中的关键类添加详细注释
包括功能描述、版本信息和作者信息,提高代码可读性和维护性
2025-12-31 11:42:40 +08:00
zzi666 f206c4300b feat: add comment 2025-12-31 10:13:07 +08:00
zzi666 c6814a568b Merge branch 'develop' of github.com:pnoker/iot-dc3 into develop 2025-12-31 10:07:38 +08:00
Vickey 5ea9f22d0f feat: . 2025-12-28 19:23:20 +08:00
Vickey 719fdd900b feat: . 2025-12-26 11:54:30 +08:00
Vickey c728c075f4 feat: . 2025-11-13 19:32:23 +08:00
Vickey 03d7856032 feat: . 2025-11-11 13:23:43 +08:00
Vickey f9e7f89ac3 feat: update pom 2025-11-11 13:22:24 +08:00
Vickey 764cab603a Merge branch 'release' into develop 2025-11-11 13:20:00 +08:00
zzi666 80d1ef4d67 refactor: standardize and translate comments across driver services, implementations, and application files for clarity and consistency 2025-11-06 16:39:26 +08:00
zzi666 313308b8d8 refactor: standardize and translate comments across Protobuf files and environment script for clarity and consistency 2025-11-06 16:37:35 +08:00
zzi666 d6d918ec8a refactor: standardize and translate comments in Protobuf files for improved clarity and consistency across modules 2025-11-06 16:37:18 +08:00
zzi666 7825724848 refactor: standardize and translate comments across driver modules for consistency and clarity 2025-10-28 15:45:52 +08:00
Henry Zhang 86e4d563e9 Revise SECURITY.md with updated support and practices
Updated the security policy to include supported versions and best practices.
2025-10-28 14:27:30 +08:00
zzi666 47dd8f37fc refactor: translate and standardize comments in configuration files across all driver modules for consistency 2025-10-28 10:53:14 +08:00