2
0

71 Commits

Author SHA1 Message Date
caiyuchao
6d2f63f747 release for 1.0.19 2025-07-03 14:37:31 +08:00
caiyuchao
f027c0f30a fix: 删除sql 2025-07-03 14:35:54 +08:00
caiyuchao
abbc4592e1 fix: 流量单位换算 2025-06-25 14:41:31 +08:00
caiyuchao
50c5a4c192 fix: billRule不启用情况 2025-06-25 12:24:22 +08:00
caiyuchao
602bb0c31d fix: sql调整 2025-06-25 11:34:22 +08:00
caiyuchao
cf57e7b0e3 fix: reconnectClient 2025-06-25 11:24:34 +08:00
caiyuchao
2e85639d1e feat: 更新建表sql 2025-06-24 19:01:00 +08:00
caiyuchao
eee4d94be6 fix: 邮件标题 2025-06-24 18:20:50 +08:00
caiyuchao
2874f33917 fix: 任务job 2025-06-24 17:41:39 +08:00
caiyuchao
34bbdc7586 fix: 验证码邮件标题 2025-06-24 16:02:03 +08:00
caiyuchao
60715a123c fix: 历史cdr 2025-06-23 19:00:35 +08:00
caiyuchao
d97fa12744 feat: 升级sql 2025-06-23 16:03:58 +08:00
caiyuchao
57f6c50625 fix: 账单列表;充值类型 2025-06-23 15:56:12 +08:00
caiyuchao
35cf811689 fix: 当前流量统计/扣费账单/上网记录类型等 2025-06-20 17:26:47 +08:00
caiyuchao
3b6f05d2c7 release for 1.0.18 2025-06-19 20:08:53 +08:00
caiyuchao
886ee2f9b0 fix: 1.0.17sql调整 2025-06-18 10:42:16 +08:00
caiyuchao
ff2e89f6ee release for 1.0.17 2025-06-18 10:22:15 +08:00
caiyuchao
46bfc26eae feat: 发票和提醒配置 2025-06-17 18:29:58 +08:00
caiyuchao
23c6900fb9 fix: 下载调整 2025-06-17 16:14:17 +08:00
caiyuchao
4a55516016 feat: 下载调整 2025-06-17 16:05:02 +08:00
caiyuchao
3dfee8e360 feat: 下载发票pdf 2025-06-16 19:14:31 +08:00
caiyuchao
b70ac9d5cc feat: 流量和余额不足提醒 2025-06-16 18:00:33 +08:00
caiyuchao
a2cb97ce4c fix: 账单接口 2025-06-13 18:08:18 +08:00
caiyuchao
f8876ea188 feat: 发票时间调整 2025-06-12 18:28:00 +08:00
caiyuchao
32fc1d98ac feat: 账单和发票补充 2025-06-11 17:45:52 +08:00
caiyuchao
560162c27d feat: 账单和发票 2025-06-11 17:38:12 +08:00
caiyuchao
a43bba5617 fix: 补充sql脚本 2025-06-11 11:13:22 +08:00
caiyuchao
b055b2cbf9 release for 1.0.16 2025-06-10 18:31:17 +08:00
caiyuchao
3c12e7490c feat: 添加mesh和roaming功能 2025-06-06 10:45:45 +08:00
caiyuchao
4765f3b5cf fix: 修复警报查询接口 2025-06-05 17:40:22 +08:00
caiyuchao
d57204ff3a feat: 添加白名单接口 2025-06-04 18:02:52 +08:00
caiyuchao
4ecb7b53dd feat: 添加新菜单权限 2025-06-04 16:23:00 +08:00
caiyuchao
ef6f48f590 feat: 添加新菜单 2025-06-04 15:56:27 +08:00
caiyuchao
3aa3c2260d feat: 警报列表 2025-06-04 15:18:44 +08:00
caiyuchao
73a9d60d2a feat: 更新omada api 2025-06-04 15:17:00 +08:00
caiyuchao
3798930698 fix: 文件上传转换工具 2025-06-03 11:24:33 +08:00
caiyuchao
4b40cc925c feat: 删除按钮菜单 2025-06-03 10:14:48 +08:00
caiyuchao
01f4a5c3d6 feat: paypal配置 2025-04-29 18:03:46 +08:00
caiyuchao
e9765d7d39 release for 1.0.15 2025-04-28 19:08:12 +08:00
caiyuchao
087ad2f34f fix:支付配置 2025-04-28 19:02:07 +08:00
caiyuchao
59ffe91e72 fix: 修复菜单sql 2025-04-28 15:33:28 +08:00
caiyuchao
095dacb873 fix: 支付货币对接 2025-04-28 14:31:08 +08:00
caiyuchao
0fa1439304 fix: license调整 2025-04-27 17:49:35 +08:00
caiyuchao
2da336a69f fix: license防篡改系统时间 2025-04-27 16:35:00 +08:00
caiyuchao
ffd27558d1 feat: license防篡改系统时间 2025-04-27 15:41:33 +08:00
caiyuchao
3a69f83746 feat: 操作日志统一英语 2025-04-25 14:49:47 +08:00
caiyuchao
b99d2600f7 feat: stripe支付 2025-04-25 11:27:27 +08:00
caiyuchao
9a4eaddc50 feat: 支付全局配置 2025-04-23 17:41:51 +08:00
caiyuchao
45d78ed7d3 feat: paypal支付 2025-04-23 15:50:01 +08:00
caiyuchao
517c1e7d96 fix: 未知异常 2025-04-21 16:35:12 +08:00
caiyuchao
d94e9d84ab feat: release for 1.0.14 2025-04-17 21:01:33 +08:00
caiyuchao
cb24deceb0 feat: 支持激活码license 2025-04-17 20:54:30 +08:00
caiyuchao
73a25e95c7 fix: 获取linux信息 2025-04-16 21:32:30 +08:00
caiyuchao
185a0d1bd4 fix: linux信息 2025-04-16 21:21:56 +08:00
caiyuchao
559a659797 fix: 邮件标题自定义 2025-04-16 16:16:15 +08:00
caiyuchao
b472c6a2a7 fix: 邮件自定义 2025-04-16 15:31:50 +08:00
caiyuchao
05554f4157 fix: 邮件自定义模板 2025-04-16 15:04:37 +08:00
caiyuchao
4f5cd0c0ce feat: 邮件内容自定义html 2025-04-16 14:09:20 +08:00
caiyuchao
e8b672f119 feat: 支持邮箱登录 2025-04-16 09:46:20 +08:00
caiyuchao
475b9a5184 feat: license公钥 2025-04-15 16:49:52 +08:00
caiyuchao
8db29f5dcc fix: system从库 2025-04-15 16:48:02 +08:00
caiyuchao
9f398a03d9 feat: License由网关控制 2025-04-14 17:47:07 +08:00
caiyuchao
62d510ccdd fix: gen代码生成 2025-04-14 16:25:33 +08:00
caiyuchao
0ca5f424d3 feat: License控制 2025-04-14 16:00:12 +08:00
caiyuchao
3cc98f22cd fix: gen代码生成 2025-04-14 10:07:54 +08:00
zhangsz
0a69c22211 fix: AjaxResult default return EN message 2025-04-12 16:02:44 +08:00
caiyuchao
0fa82f1337 fix: 个人信息验证码 2025-04-09 17:15:12 +08:00
caiyuchao
3d0f8efa23 feat: 修改个人信息验证码 2025-03-31 10:44:58 +08:00
caiyuchao
42102fa636 feat: 退款功能 2025-03-26 15:14:41 +08:00
caiyuchao
b5c97f99df feat: 支付代码调整 2025-03-26 15:14:31 +08:00
caiyuchao
8375e1bab9 fix: cdr历史 2025-03-21 11:05:25 +08:00
183 changed files with 7382 additions and 946 deletions

45
pom.xml
View File

@@ -6,13 +6,13 @@
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
<name>wfc</name>
<description>WANFi Control and Billing System</description>
<properties>
<wfc.version>1.0.13</wfc.version>
<wfc.version>1.0.19</wfc.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
@@ -40,6 +40,9 @@
<org.mapstruct.version>1.6.3</org.mapstruct.version>
<mail.version>1.6.2</mail.version>
<ijapy.version>2.9.11</ijapy.version>
<turelicense.version>1.33</turelicense.version>
<paypal.version>1.0.0</paypal.version>
<stripe.version>29.0.0</stripe.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<wfc.nacos.server>${env.NACOS_SERVER_NAME}</wfc.nacos.server>
<wfc.nacos.port>${env.NACOS_SERVER_PORT}</wfc.nacos.port>
@@ -295,6 +298,13 @@
<version>${wfc.version}</version>
</dependency>
<!-- license服务 -->
<dependency>
<groupId>org.wfc</groupId>
<artifactId>wfc-common-license</artifactId>
<version>${wfc.version}</version>
</dependency>
<!-- MapStruct -->
<dependency>
<groupId>org.mapstruct</groupId>
@@ -343,6 +353,27 @@
<artifactId>IJPay-All</artifactId>
<version>${ijapy.version}</version>
</dependency>
<!-- License -->
<dependency>
<groupId>de.schlichtherle.truelicense</groupId>
<artifactId>truelicense-core</artifactId>
<version>${turelicense.version}</version>
</dependency>
<!-- PayPal -->
<dependency>
<groupId>com.paypal.sdk</groupId>
<artifactId>paypal-server-sdk</artifactId>
<version>${paypal.version}</version>
</dependency>
<!-- Stripe -->
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>${stripe.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -421,6 +452,16 @@
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>*.keystore</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>*.keystore</include>
</includes>
</resource>
</resources>
</build>

View File

@@ -0,0 +1,9 @@
SET FOREIGN_KEY_CHECKS = 0;
INSERT IGNORE INTO `wfc_system_db`.`sys_menu` VALUES (2033, 'menu.device.alerts.management', 2028, 21, '/device/alerts', 'view.device_alerts', NULL, 1, 0, 'C', '0', '0', '', 'carbon:ai-results-low', 'admin', '2025-06-04 15:35:21', '', '2025-06-04 15:37:11', '', 'device_alerts');
INSERT IGNORE INTO `wfc_system_db`.`sys_menu` VALUES (2034, 'menu.device.access.management', 2028, 22, '/device/access', 'view.device_access', NULL, 1, 0, 'C', '0', '0', NULL, 'carbon:carbon', 'super', '2025-06-04 15:40:48', '', NULL, '', 'device_access');
INSERT IGNORE INTO `wfc_system_db`.`sys_role_menu` VALUES (2, 2033);
INSERT IGNORE INTO `wfc_system_db`.`sys_role_menu` VALUES (2, 2034);
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -0,0 +1,18 @@
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE `wfc_user_db`.`u_bill`
ADD COLUMN `invoice_number` varchar(64) NULL COMMENT '发票编号' AFTER `status`,
ADD COLUMN `invoice_file` varchar(255) NULL COMMENT '发票文件' AFTER `invoice_number`,
ADD COLUMN `invoice_file_path` varchar(500) NULL COMMENT '发票文件路径' AFTER `invoice_file`,
ADD COLUMN `invoice_time` datetime NULL COMMENT '发票时间' AFTER `invoice_file_path`;
ALTER TABLE `wfc_user_db`.`u_account`
ADD COLUMN `package_reminder` tinyint(4) NULL COMMENT '套餐提醒' AFTER `up_limit_enable`,
ADD COLUMN `balance_reminder` tinyint(4) NULL COMMENT '余额提醒' AFTER `package_reminder`;
INSERT IGNORE INTO `wfc_system_db`.`sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, 'Reminder Task', 'DEFAULT', 'reminderTask.reminderJob', '0 * * * * ?', '3', '1', '0', 'admin', '2025-06-16 11:26:10', '', NULL, '');
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -87,10 +87,10 @@ INSERT INTO `config_info` VALUES (50, 'wfc-payment-test.yml', 'DEFAULT_GROUP', '
INSERT INTO `config_info` VALUES (51, 'sentinel-wfc-gateway-test', 'DEFAULT_GROUP', '[\r\n {\r\n \"resource\": \"wfc-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"wfc-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"wfc-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"wfc-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]', 'a8b3ec396dd09d5f2ba494cc80a7afa0', '2024-12-28 19:28:44', '2024-12-28 19:28:44', NULL, '172.19.0.1', '', 'wfc-test', '限流策略', NULL, NULL, 'json', NULL, '');
INSERT INTO `config_info` VALUES (61, 'application-prod.yml', 'DEFAULT_GROUP', 'spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n # 资源信息\n #messages:\n # 国际化资源文件路径\n #basename: i18n/messages\n \n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: false\n httpclient:\n enabled: true\n disable-ssl-validation: true\n client:\n config:\n default:\n connectTimeout: 60000\n readTimeout: 60000\n compression:\n request:\n enabled: true\n min-request-size: 8192\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n \n\n \n', '35d3cd36aeef1b24d4fdb9f73e0fb2c6', '2024-12-13 11:52:34', '2025-02-08 09:39:47', NULL, '172.20.0.1', '', 'wfc-prod', '通用配置', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (62, 'wfc-gateway-prod.yml', 'DEFAULT_GROUP', 'spring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: wfc-auth\n uri: lb://wfc-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: wfc-gen\n uri: lb://wfc-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: wfc-job\n uri: lb://wfc-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: wfc-system\n uri: lb://wfc-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 用户模块\n - id: wfc-user\n uri: lb://wfc-user\n predicates:\n - Path=/u/**\n filters:\n - StripPrefix=1 \n # 文件服务\n - id: wfc-file\n uri: lb://wfc-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n # payment\n - id: wfc-payment\n uri: lb://wfc-payment\n predicates:\n - Path=/payment/**\n filters:\n - StripPrefix=1 \n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n mailEnabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /auth/checkRepeat\n - /*/v2/api-docs\n - /csrf\n - /u/email/code\n - /system/email/code\n - /payment/aliPay/callback\n - /payment/wxPay/callback\n - /u/user/profile/forgotPwd\n - /system/user/profile/forgotPwd', '7c2ff7c096ccba897a41dbb18e979fec', '2024-12-13 11:52:34', '2025-02-13 03:14:41', NULL, '192.168.2.158', '', 'wfc-prod', 'wfc-gateway production', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (62, 'wfc-gateway-prod.yml', 'DEFAULT_GROUP', 'spring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: wfc-auth\n uri: lb://wfc-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: wfc-gen\n uri: lb://wfc-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: wfc-job\n uri: lb://wfc-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: wfc-system\n uri: lb://wfc-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 用户模块\n - id: wfc-user\n uri: lb://wfc-user\n predicates:\n - Path=/u/**\n filters:\n - StripPrefix=1 \n # 文件服务\n - id: wfc-file\n uri: lb://wfc-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n # payment\n - id: wfc-payment\n uri: lb://wfc-payment\n predicates:\n - Path=/payment/**\n filters:\n - StripPrefix=1 \n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n mailEnabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /auth/checkRepeat\n - /*/v2/api-docs\n - /csrf\n - /u/email/code\n - /system/email/code\n - /payment/aliPay/callback\n - /payment/wxPay/callback\n - /u/user/profile/forgotPwd\n - /system/user/profile/forgotPwd\n - /payment/stripe/callback', '6da5647d73fe6680ed197fa2f2a2b310', '2024-12-13 11:52:34', '2025-04-25 10:44:09', NULL, '192.168.2.177', '', 'wfc-prod', 'wfc-gateway production', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (63, 'wfc-auth-prod.yml', 'DEFAULT_GROUP', 'spring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n', 'c3f5481240e7581cc397f5c7918fd785', '2024-12-13 11:52:34', '2024-12-13 11:53:35', NULL, '192.168.2.116', '', 'wfc-prod', '认证中心', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (64, 'wfc-monitor-prod.yml', 'DEFAULT_GROUP', '# spring\nspring:\n security:\n user:\n name: wfc\n password: 123456\n boot:\n admin:\n ui:\n title: visual monitor\n', 'c8f896d284d5328aab16baeb81a3685c', '2024-12-13 11:52:34', '2024-12-13 11:54:04', NULL, '192.168.2.116', '', 'wfc-prod', '监控中心', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (65, 'wfc-system-prod.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://wfc-mysql:3306/wfc_system_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: org.wfc.system\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By wfc\n licenseUrl: https://wfc.vip', 'a355587121f711511c9010a4a8c0d797', '2024-12-13 11:52:34', '2024-12-13 11:54:49', NULL, '192.168.2.116', '', 'wfc-prod', '系统模块', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (65, 'wfc-system-prod.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://wfc-mysql:3306/wfc_system_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n # 从库数据源\n user:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://wfc-mysql:3306/wfc_user_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: org.wfc.system\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By wfc\n licenseUrl: https://wfc.vip', '6d6ace553dddd9e9396ea7007e7e8039', '2024-12-13 11:52:34', '2025-04-02 20:31:17', NULL, '192.168.2.158', '', 'wfc-prod', '系统模块', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (66, 'wfc-gen-prod.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: wfc-redis\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://wfc-mysql:3306/wfc_system_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: org.wfc.gen.domain\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By wfc\n licenseUrl: https://wfc.vip\n\n# 代码生成\ngen:\n # 作者\n author: wfc\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: org.wfc.system\n # 自动去除表前缀默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n', '5ec7d9b8eb46eca656316e5f817aadb2', '2024-12-13 11:52:34', '2024-12-13 11:55:28', NULL, '192.168.2.116', '', 'wfc-prod', '代码生成', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (67, 'wfc-job-prod.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: wfc-redis\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://wfc-mysql:3306/wfc_system_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: org.wfc.job.domain\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By wfc\n licenseUrl: https://wfc.vip\n', '1376deec876c0878df743b4d96c7f125', '2024-12-13 11:52:34', '2024-12-13 11:56:07', NULL, '192.168.2.116', '', 'wfc-prod', '定时任务', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (68, 'wfc-file-prod.yml', 'DEFAULT_GROUP', '# 本地文件上传 \nfile:\n domain: wfc-file:9201\n path: /opt/wfc/upload\n prefix: /kyc\n gateway: http://192.168.2.116:8080\n\n# FastDFS配置\nfdfs:\n domain: http://wfc-file\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: wfc-file:22122\n\n# Minio配置\nminio:\n url: http://wfc-file:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test', '67ac8270276a9e28271471cbbd6c7784', '2024-12-13 11:52:34', '2025-01-16 01:46:26', NULL, '172.19.0.1', '', 'wfc-prod', '文件服务', '', '', 'yaml', '', '');

View File

@@ -294,65 +294,15 @@ CREATE TABLE `sys_menu` (
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, 'menu.system.management', 0, 1001, '/manage', 'layout.base', '', 1, 0, 'M', '0', '0', '', 'carbon:cloud-service-management', 'admin', '2024-05-08 21:50:55', 'admin', '2024-05-12 23:46:57', '系统管理目录', 'manage');
INSERT INTO `sys_menu` VALUES (3, 'menu.system.tools', 0, 1003, '/tool', NULL, '', 1, 0, 'M', '0', '0', '', 'carbon:user-role', 'admin', '2024-05-08 21:50:55', 'admin', '2024-05-12 23:46:57', '系统工具目录', 'tool');
INSERT INTO `sys_menu` VALUES (100, 'menu.system.account.management', 1, 1, '/manage/user', 'view.manage_user', '', 1, 0, 'C', '0', '0', 'system:user:list', 'ic:round-manage-accounts', 'admin', '2024-05-08 21:50:55', 'admin', '2024-12-04 10:21:07', '用户管理菜单', 'manage_user');
INSERT INTO `sys_menu` VALUES (101, 'menu.system.role.management', 1, 2, '/manage/role', 'view.manage_role', '', 1, 0, 'C', '0', '0', 'system:role:list', 'carbon:user-role', 'admin', '2024-05-08 21:50:55', '', NULL, '角色管理菜单', 'manage_role');
INSERT INTO `sys_menu` VALUES (102, 'menu.system.menu.management', 1, 3, '/manage/menu', 'view.manage_menu', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'material-symbols:route', 'admin', '2024-05-08 21:50:55', 'admin', '2024-05-12 23:46:12', '菜单管理菜单', 'manage_menu');
INSERT INTO `sys_menu` VALUES (103, 'menu.system.department.management', 1, 4, '/manage/dept', 'view.manage_dept', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'carbon:box', 'admin', '2024-05-08 21:50:55', 'ryadmin', '2024-12-04 10:20:07', '部门管理菜单', 'manage_dept');
INSERT INTO `sys_menu` VALUES (104, 'menu.system.position.management', 1, 5, '/manage/post', 'view.manage_post', NULL, 1, 0, 'C', '0', '0', 'system:post:list', 'carbon:group', 'admin', '2024-06-02 22:18:48', '', '2024-12-04 10:20:12', '', 'manage_post');
INSERT INTO `sys_menu` VALUES (105, 'menu.system.dict.management', 1, 6, '/manage/dict', 'view.manage_dict', NULL, 1, 0, 'C', '0', '0', 'system:dict:list', 'carbon:volume-block-storage', 'admin', '2024-06-02 23:13:40', '', NULL, '', 'manage_dict');
INSERT INTO `sys_menu` VALUES (115, 'menu.system.code.generator', 3, 2, '/gen', 'tool.gen', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'carbon:box', 'admin', '2024-11-21 18:47:51', '', NULL, '代码生成菜单', 'tool_gen');
INSERT INTO `sys_menu` VALUES (116, 'menu.system.interface', 3, 3, 'http://localhost:8080/swagger-ui/index.html', '', '', 0, 0, 'C', '0', '0', 'tool:swagger:list', 'carbon:box', 'admin', '2024-11-21 18:47:51', '', NULL, '系统接口菜单', 'tool_swagger');
INSERT INTO `sys_menu` VALUES (1000, 'menu.action.user.query', 100, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', '2024-05-08 21:50:55', '', '2024-12-11 11:46:34', '', NULL);
INSERT INTO `sys_menu` VALUES (1001, 'menu.action.user.add', 100, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1002, 'menu.action.user.modify', 100, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1003, 'menu.action.user.delete', 100, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1004, 'menu.action.user.export', 100, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1005, 'menu.action.user.import', 100, 6, '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1006, 'menu.action.user.reset.password', 100, 7, '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1007, 'menu.action.role.query', 101, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1008, 'menu.action.role.add', 101, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1009, 'menu.action.role.modify', 101, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1010, 'menu.action.role.delete', 101, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1011, 'menu.action.role.export', 101, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1012, 'menu.action.menu.query', 102, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1013, 'menu.action.menu.add', 102, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1014, 'menu.action.menu.modify', 102, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1015, 'menu.action.menu.delete', 102, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1016, 'menu.action.department.query', 103, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1017, 'menu.action.department.add', 103, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1018, 'menu.action.department.modify', 103, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1019, 'menu.action.department.delete', 103, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1020, 'menu.action.position.query', 104, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1021, 'menu.action.position.add', 104, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1022, 'menu.action.position.modify', 104, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1023, 'menu.action.position.delete', 104, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1024, 'menu.action.position.export', 104, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1025, 'menu.action.dict.query', 105, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1026, 'menu.action.dict.add', 105, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1027, 'menu.action.dict.modify', 105, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1028, 'menu.action.dict.delete', 105, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1029, 'menu.action.dict.export', 105, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1039, 'menu.action.operate.query', 500, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1040, 'menu.action.operate.delete', 500, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1041, 'menu.action.log.export', 500, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1042, 'menu.action.login.query', 501, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1043, 'menu.action.login.delete', 501, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1044, 'menu.action.log.export', 501, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1045, 'menu.action.account.unlock', 501, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:unlock', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1049, 'menu.action.task.query', 2015, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1050, 'menu.action.task.add', 2015, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1051, 'menu.action.task.modify', 2015, 3, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1052, 'menu.action.task.delete', 2015, 4, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1053, 'menu.action.task.status.modify', 2015, 5, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (1054, 'menu.action.task.export', 2015, 6, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', '2024-05-08 21:50:55', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (2010, 'menu.user.management', 0, 10, '/user-center', 'layout.base', NULL, 1, 0, 'M', '0', '0', '', 'carbon:user-multiple', 'admin', '2024-11-28 14:37:09', '', '2024-12-12 10:45:03', '', 'user-center');
INSERT INTO `sys_menu` VALUES (2011, 'menu.user.cdr.management', 1063, 0, '/user-center/cdr-manage', 'view.user-center_cdr-manage', NULL, 1, 1, 'C', '0', '0', NULL, 'carbon:report', 'admin', '2024-11-28 14:37:56', '', NULL, '', 'user-center_cdr-manage');
INSERT INTO `sys_menu` VALUES (2012, 'menu.user.kyc.management', 1063, 0, '/user-center/kyc', 'view.user-center_kyc', NULL, 1, 1, 'C', '0', '0', NULL, 'carbon:image-search-alt', 'admin', '2024-11-28 14:42:27', '', NULL, '', 'user-center_kyc');
INSERT INTO `sys_menu` VALUES (2013, 'menu.user.account.management', 1063, 0, '/user-center/account', 'view.user-center_account', NULL, 1, 1, 'C', '0', '0', NULL, 'carbon:user-avatar', 'admin', '2024-11-28 14:43:43', '', NULL, '', 'user-center_account');
INSERT INTO `sys_menu` VALUES (2014, 'menu.system.log.management', 1, 100, '/manage/log', 'view.manage_log', NULL, 1, 1, 'C', '0', '0', 'system:operlog:list', 'carbon:account', 'admin', '2024-11-28 17:20:41', '', NULL, '', 'manage_log');
INSERT INTO `sys_menu` VALUES (2015, 'menu.system.job.management', 1, 7, '/manage/task', 'view.manage_task', NULL, 1, 1, 'C', '0', '0', '', 'carbon:document-multiple-01', 'admin', '2024-11-28 17:21:09', '', '2025-01-08 15:23:33', '', 'manage_task');
INSERT INTO `sys_menu` VALUES (2018, 'menu.action.batch.delete', 2014, 0, '', NULL, NULL, 1, 0, 'F', '0', '0', 'system:operlog:remove', '#', 'super', '2024-12-03 18:43:13', '', NULL, '', NULL);
INSERT INTO `sys_menu` VALUES (2019, 'menu.user.info', 2010, 0, '/user-center/user', 'view.user-center_user', NULL, 1, 1, 'C', '0', '0', '', 'carbon:account', 'super', '2024-12-04 09:53:02', '', '2024-12-11 18:16:22', '', 'user-center_account');
INSERT INTO `sys_menu` VALUES (2020, 'menu.user.cdr.management', 2010, 1, '/user-center/cdr', 'view.user-center_cdr', NULL, 1, 1, 'C', '0', '0', '', 'carbon:document-multiple-01', 'super', '2024-12-04 10:15:36', '', '2024-12-11 20:33:02', '', 'user-center_cdr');
INSERT INTO `sys_menu` VALUES (2021, 'menu.user.bill.management', 2010, 2, '/user-center/bill', 'view.user-center_bill', NULL, 1, 1, 'C', '0', '0', '', 'carbon:carbon', 'super', '2024-12-04 10:17:39', '', '2024-12-16 18:33:22', '', 'user-center_bill');
@@ -361,12 +311,13 @@ INSERT INTO `sys_menu` VALUES (2023, 'menu.billing.management', 0, 20, '/billing
INSERT INTO `sys_menu` VALUES (2024, 'menu.billing.rule.management', 2023, 1, '/billing/rule', 'view.billing_rule', NULL, 1, 0, 'C', '0', '0', '', 'carbon:document-multiple-01', 'super', '2024-12-04 10:35:07', '', '2025-01-07 16:51:20', '', 'billing_rule');
INSERT INTO `sys_menu` VALUES (2025, 'menu.billing.ratelimit.management', 2023, 2, '/billing/ratelimit', 'view.billing_ratelimit', NULL, 1, 0, 'C', '0', '0', '', 'carbon:rocket', 'admin', '2024-12-23 14:49:30', '', '2024-12-23 15:16:10', '', 'billing_ratelimit');
INSERT INTO `sys_menu` VALUES (2026, 'menu.billing.package.management', 2023, 3, '/billing/package', 'view.billing_package', NULL, 1, 1, 'C', '0', '0', NULL, 'carbon:document', 'super', '2024-12-04 10:36:37', '', NULL, '', 'billing_package');
INSERT INTO `sys_menu` VALUES (2027, 'menu.billing.payment.setting', 2023, 4, '/billing/setting', 'view.billing_setting', NULL, 1, 1, 'C', '0', '1', NULL, 'carbon:settings-services', 'super', '2024-12-04 10:37:58', '', NULL, '', 'billing_setting');
INSERT INTO `sys_menu` VALUES (2028, 'menu.device.management', 0, 0, '/device', 'layout.base', NULL, 1, 0, 'M', '0', '0', '', 'carbon:volume-block-storage', 'super', '2024-12-04 10:43:40', '', '2024-12-04 10:50:20', '', 'device');
INSERT INTO `sys_menu` VALUES (2029, 'menu.device.ap.management', 2028, 10, '/device/apdevice', 'view.device_apdevice', NULL, 1, 1, 'C', '0', '0', '', 'carbon:category', 'super', '2024-12-04 10:46:31', '', '2025-01-06 16:25:18', '', 'device_ap');
INSERT INTO `sys_menu` VALUES (2030, 'menu.device.client.management', 2028, 20, '/device/terminal', 'view.device_terminal', NULL, 1, 1, 'C', '0', '0', '', 'carbon:user-multiple', 'super', '2024-12-04 10:47:56', '', '2025-01-06 18:11:35', '', 'device_ue');
INSERT INTO `sys_menu` VALUES (2031, 'menu.device.wlan.management', 2028, 12, '/device/wlan', 'view.device_wlan', NULL, 1, 1, 'C', '0', '0', '', 'carbon:rocket', 'super', '2025-02-18 10:46:31', '', NULL, '', 'device_wlan');
INSERT INTO `sys_menu` VALUES (2032, 'menu.device.portal.management', 2028, 14, '/device/portal', 'view.device_portal', NULL, 1, 1, 'C', '0', '0', '', 'carbon:building-insights-3', 'super', '2025-02-18 10:46:31', '', NULL, '', 'device_portal');
INSERT INTO `sys_menu` VALUES (2033, 'menu.device.alerts.management', 2028, 21, '/device/alerts', 'view.device_alerts', NULL, 1, 0, 'C', '0', '0', '', 'carbon:ai-results-low', 'admin', '2025-06-04 15:35:21', '', '2025-06-04 15:37:11', '', 'device_alerts');
INSERT INTO `sys_menu` VALUES (2034, 'menu.device.access.management', 2028, 22, '/device/access', 'view.device_access', NULL, 1, 0, 'C', '0', '0', NULL, 'carbon:carbon', 'super', '2025-06-04 15:40:48', '', NULL, '', 'device_access');
-- ----------------------------
-- Table structure for sys_oper_log
@@ -532,6 +483,8 @@ INSERT INTO `sys_role_menu` VALUES (2, 2029);
INSERT INTO `sys_role_menu` VALUES (2, 2030);
INSERT INTO `sys_role_menu` VALUES (2, 2031);
INSERT INTO `sys_role_menu` VALUES (2, 2032);
INSERT INTO `sys_role_menu` VALUES (2, 2033);
INSERT INTO `sys_role_menu` VALUES (2, 2034);
-- ----------------------------
-- Table structure for sys_user

View File

@@ -54,6 +54,8 @@ CREATE TABLE `u_account` (
`down_limit_enable` tinyint(1) NULL DEFAULT 0 COMMENT '下行限速启用',
`up_limit` bigint(20) NULL DEFAULT NULL COMMENT '上行限速',
`up_limit_enable` tinyint(1) NULL DEFAULT 0 COMMENT '上行限速启用',
`package_reminder` tinyint(4) NULL DEFAULT NULL COMMENT '套餐提醒',
`balance_reminder` tinyint(4) NULL DEFAULT NULL COMMENT '余额提醒',
`del_flag` tinyint(1) NULL DEFAULT 0 COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
@@ -115,6 +117,10 @@ CREATE TABLE `u_bill` (
`type` tinyint(4) NULL DEFAULT NULL COMMENT '类型',
`amount` decimal(18, 4) NULL DEFAULT NULL COMMENT '金额',
`status` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`invoice_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发票编号',
`invoice_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发票文件',
`invoice_file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '发票文件路径',
`invoice_time` datetime NULL DEFAULT NULL COMMENT '发票时间',
`del_flag` tinyint(1) NULL DEFAULT 0 COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-api</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -0,0 +1,64 @@
package org.wfc.omada.api.accesscontrol;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.wfc.omada.api.accesscontrol.model.OperationResponsePortalAccessControlOpenApiVo;
import org.wfc.omada.api.accesscontrol.model.PortalAccessControlOpenApiVo;
import org.wfc.omada.config.FeignConfig;
import javax.validation.Valid;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:10.834815900+08:00[Asia/Shanghai]")
@Validated
@Api(value = "OmadaAccessControl", description = "the OmadaAccessControl API")
@FeignClient(name="OmadaAccessControlApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaAccessControlApi {
/**
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control : Get access control setting
* Get access control setting of the site with the given omadacId and siteId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager View Only&lt;br/&gt;&lt;br/&gt;The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): &lt;br/&gt;-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get access control setting", nickname = "getAccessControl", notes = "Get access control setting of the site with the given omadacId and siteId.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager View Only<br/><br/>The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): <br/>-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.", response = OperationResponsePortalAccessControlOpenApiVo.class, tags={ "Omada/Access Control","Access Control", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponsePortalAccessControlOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponsePortalAccessControlOpenApiVo> getAccessControl(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);
/**
* PATCH /openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control : Modify access control setting
* Modify access control setting of the site. When modifying, the full configuration parameters should be passed in&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager Modify&lt;br/&gt;&lt;br/&gt;The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): &lt;br/&gt;-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param portalAccessControlOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify access control setting", nickname = "modifyAccessControl", notes = "Modify access control setting of the site. When modifying, the full configuration parameters should be passed in<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager Modify<br/><br/>The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): <br/>-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.", response = OperationResponsePortalAccessControlOpenApiVo.class, tags={ "Omada/Access Control","Access Control", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponsePortalAccessControlOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
ResponseEntity<OperationResponsePortalAccessControlOpenApiVo> modifyAccessControl(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId, @Valid @RequestBody(required = false) PortalAccessControlOpenApiVo portalAccessControlOpenApiVo);
}

View File

@@ -0,0 +1,156 @@
package org.wfc.omada.api.accesscontrol.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;
/**
* List of Free-Authentication Client Policy
*/
@ApiModel(description = "List of Free-Authentication Client Policy")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:18.126730900+08:00[Asia/Shanghai]")
public class FreeAuthClientPolicyOpenApiVo {
@JsonProperty("idInt")
private Integer idInt;
@JsonProperty("type")
private Integer type;
@JsonProperty("clientIp")
private String clientIp;
@JsonProperty("clientMac")
private String clientMac;
public FreeAuthClientPolicyOpenApiVo idInt(Integer idInt) {
this.idInt = idInt;
return this;
}
/**
* Entry ID of the policy. Except for newly added policies, this parameter should be retained
* @return idInt
*/
@ApiModelProperty(value = "Entry ID of the policy. Except for newly added policies, this parameter should be retained")
public Integer getIdInt() {
return idInt;
}
public void setIdInt(Integer idInt) {
this.idInt = idInt;
}
public FreeAuthClientPolicyOpenApiVo type(Integer type) {
this.type = type;
return this;
}
/**
* Type of the policy. It should be a value as follows: 3: Free auth client IP, and parameter [clientIp] is needed. 4: Free auth client MAC, and parameter [clientMac] is needed
* @return type
*/
@ApiModelProperty(required = true, value = "Type of the policy. It should be a value as follows: 3: Free auth client IP, and parameter [clientIp] is needed. 4: Free auth client MAC, and parameter [clientMac] is needed")
@NotNull
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public FreeAuthClientPolicyOpenApiVo clientIp(String clientIp) {
this.clientIp = clientIp;
return this;
}
/**
* Free auth client IP Address
* @return clientIp
*/
@ApiModelProperty(value = "Free auth client IP Address")
@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b")
public String getClientIp() {
return clientIp;
}
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
public FreeAuthClientPolicyOpenApiVo clientMac(String clientMac) {
this.clientMac = clientMac;
return this;
}
/**
* Free auth client MAC Address, for example: AA-AA-AA-AA-AA-AA
* @return clientMac
*/
@ApiModelProperty(value = "Free auth client MAC Address, for example: AA-AA-AA-AA-AA-AA")
@Pattern(regexp="[A-Fa-f0-9]{1}[02468aceACE]{1}([-:][A-Fa-f0-9]{2}){5}")
public String getClientMac() {
return clientMac;
}
public void setClientMac(String clientMac) {
this.clientMac = clientMac;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FreeAuthClientPolicyOpenApiVo freeAuthClientPolicyOpenApiVo = (FreeAuthClientPolicyOpenApiVo) o;
return Objects.equals(this.idInt, freeAuthClientPolicyOpenApiVo.idInt) &&
Objects.equals(this.type, freeAuthClientPolicyOpenApiVo.type) &&
Objects.equals(this.clientIp, freeAuthClientPolicyOpenApiVo.clientIp) &&
Objects.equals(this.clientMac, freeAuthClientPolicyOpenApiVo.clientMac);
}
@Override
public int hashCode() {
return Objects.hash(idInt, type, clientIp, clientMac);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FreeAuthClientPolicyOpenApiVo {\n");
sb.append(" idInt: ").append(toIndentedString(idInt)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" clientIp: ").append(toIndentedString(clientIp)).append("\n");
sb.append(" clientMac: ").append(toIndentedString(clientMac)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,128 @@
package org.wfc.omada.api.accesscontrol.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.Objects;
/**
* OperationResponsePortalAccessControlOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:18.126730900+08:00[Asia/Shanghai]")
public class OperationResponsePortalAccessControlOpenApiVo {
@JsonProperty("errorCode")
private Integer errorCode;
@JsonProperty("msg")
private String msg;
@JsonProperty("result")
private PortalAccessControlOpenApiVo result;
public OperationResponsePortalAccessControlOpenApiVo errorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
/**
* Get errorCode
* @return errorCode
*/
@ApiModelProperty(value = "")
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public OperationResponsePortalAccessControlOpenApiVo msg(String msg) {
this.msg = msg;
return this;
}
/**
* Get msg
* @return msg
*/
@ApiModelProperty(value = "")
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public OperationResponsePortalAccessControlOpenApiVo result(PortalAccessControlOpenApiVo result) {
this.result = result;
return this;
}
/**
* Get result
* @return result
*/
@ApiModelProperty(value = "")
@Valid
public PortalAccessControlOpenApiVo getResult() {
return result;
}
public void setResult(PortalAccessControlOpenApiVo result) {
this.result = result;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OperationResponsePortalAccessControlOpenApiVo operationResponsePortalAccessControlOpenApiVo = (OperationResponsePortalAccessControlOpenApiVo) o;
return Objects.equals(this.errorCode, operationResponsePortalAccessControlOpenApiVo.errorCode) &&
Objects.equals(this.msg, operationResponsePortalAccessControlOpenApiVo.msg) &&
Objects.equals(this.result, operationResponsePortalAccessControlOpenApiVo.result);
}
@Override
public int hashCode() {
return Objects.hash(errorCode, msg, result);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OperationResponsePortalAccessControlOpenApiVo {\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" msg: ").append(toIndentedString(msg)).append("\n");
sb.append(" result: ").append(toIndentedString(result)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,177 @@
package org.wfc.omada.api.accesscontrol.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* PortalAccessControlOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:18.126730900+08:00[Asia/Shanghai]")
public class PortalAccessControlOpenApiVo {
@JsonProperty("preAuthAccessEnable")
private Boolean preAuthAccessEnable;
@JsonProperty("preAuthAccessPolicies")
@Valid
private List<PreAuthAccessPolicyOpenApiVo> preAuthAccessPolicies = null;
@JsonProperty("freeAuthClientEnable")
private Boolean freeAuthClientEnable;
@JsonProperty("freeAuthClientPolicies")
@Valid
private List<FreeAuthClientPolicyOpenApiVo> freeAuthClientPolicies = null;
public PortalAccessControlOpenApiVo preAuthAccessEnable(Boolean preAuthAccessEnable) {
this.preAuthAccessEnable = preAuthAccessEnable;
return this;
}
/**
* Whether to enable Pre-Authentication Access. If parameter [preAuthAccessEnable] is true, parameter [preAuthAccessPolicies] is needed
* @return preAuthAccessEnable
*/
@ApiModelProperty(required = true, value = "Whether to enable Pre-Authentication Access. If parameter [preAuthAccessEnable] is true, parameter [preAuthAccessPolicies] is needed")
@NotNull
public Boolean getPreAuthAccessEnable() {
return preAuthAccessEnable;
}
public void setPreAuthAccessEnable(Boolean preAuthAccessEnable) {
this.preAuthAccessEnable = preAuthAccessEnable;
}
public PortalAccessControlOpenApiVo preAuthAccessPolicies(List<PreAuthAccessPolicyOpenApiVo> preAuthAccessPolicies) {
this.preAuthAccessPolicies = preAuthAccessPolicies;
return this;
}
public PortalAccessControlOpenApiVo addPreAuthAccessPoliciesItem(PreAuthAccessPolicyOpenApiVo preAuthAccessPoliciesItem) {
if (this.preAuthAccessPolicies == null) {
this.preAuthAccessPolicies = new ArrayList<>();
}
this.preAuthAccessPolicies.add(preAuthAccessPoliciesItem);
return this;
}
/**
* List of Pre-Authentication Access Policy
* @return preAuthAccessPolicies
*/
@ApiModelProperty(value = "List of Pre-Authentication Access Policy")
@Valid
public List<PreAuthAccessPolicyOpenApiVo> getPreAuthAccessPolicies() {
return preAuthAccessPolicies;
}
public void setPreAuthAccessPolicies(List<PreAuthAccessPolicyOpenApiVo> preAuthAccessPolicies) {
this.preAuthAccessPolicies = preAuthAccessPolicies;
}
public PortalAccessControlOpenApiVo freeAuthClientEnable(Boolean freeAuthClientEnable) {
this.freeAuthClientEnable = freeAuthClientEnable;
return this;
}
/**
* Whether to enable Free-Authentication Client. If parameter [freeAuthClientEnable] is true, parameter [freeAuthClientPolicies] is needed
* @return freeAuthClientEnable
*/
@ApiModelProperty(required = true, value = "Whether to enable Free-Authentication Client. If parameter [freeAuthClientEnable] is true, parameter [freeAuthClientPolicies] is needed")
@NotNull
public Boolean getFreeAuthClientEnable() {
return freeAuthClientEnable;
}
public void setFreeAuthClientEnable(Boolean freeAuthClientEnable) {
this.freeAuthClientEnable = freeAuthClientEnable;
}
public PortalAccessControlOpenApiVo freeAuthClientPolicies(List<FreeAuthClientPolicyOpenApiVo> freeAuthClientPolicies) {
this.freeAuthClientPolicies = freeAuthClientPolicies;
return this;
}
public PortalAccessControlOpenApiVo addFreeAuthClientPoliciesItem(FreeAuthClientPolicyOpenApiVo freeAuthClientPoliciesItem) {
if (this.freeAuthClientPolicies == null) {
this.freeAuthClientPolicies = new ArrayList<>();
}
this.freeAuthClientPolicies.add(freeAuthClientPoliciesItem);
return this;
}
/**
* List of Free-Authentication Client Policy
* @return freeAuthClientPolicies
*/
@ApiModelProperty(value = "List of Free-Authentication Client Policy")
@Valid
public List<FreeAuthClientPolicyOpenApiVo> getFreeAuthClientPolicies() {
return freeAuthClientPolicies;
}
public void setFreeAuthClientPolicies(List<FreeAuthClientPolicyOpenApiVo> freeAuthClientPolicies) {
this.freeAuthClientPolicies = freeAuthClientPolicies;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PortalAccessControlOpenApiVo portalAccessControlOpenApiVo = (PortalAccessControlOpenApiVo) o;
return Objects.equals(this.preAuthAccessEnable, portalAccessControlOpenApiVo.preAuthAccessEnable) &&
Objects.equals(this.preAuthAccessPolicies, portalAccessControlOpenApiVo.preAuthAccessPolicies) &&
Objects.equals(this.freeAuthClientEnable, portalAccessControlOpenApiVo.freeAuthClientEnable) &&
Objects.equals(this.freeAuthClientPolicies, portalAccessControlOpenApiVo.freeAuthClientPolicies);
}
@Override
public int hashCode() {
return Objects.hash(preAuthAccessEnable, preAuthAccessPolicies, freeAuthClientEnable, freeAuthClientPolicies);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PortalAccessControlOpenApiVo {\n");
sb.append(" preAuthAccessEnable: ").append(toIndentedString(preAuthAccessEnable)).append("\n");
sb.append(" preAuthAccessPolicies: ").append(toIndentedString(preAuthAccessPolicies)).append("\n");
sb.append(" freeAuthClientEnable: ").append(toIndentedString(freeAuthClientEnable)).append("\n");
sb.append(" freeAuthClientPolicies: ").append(toIndentedString(freeAuthClientPolicies)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,181 @@
package org.wfc.omada.api.accesscontrol.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;
/**
* List of Pre-Authentication Access Policy
*/
@ApiModel(description = "List of Pre-Authentication Access Policy")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:18.126730900+08:00[Asia/Shanghai]")
public class PreAuthAccessPolicyOpenApiVo {
@JsonProperty("idInt")
private Integer idInt;
@JsonProperty("type")
private Integer type;
@JsonProperty("ip")
private String ip;
@JsonProperty("subnetMask")
private Integer subnetMask;
@JsonProperty("url")
private String url;
public PreAuthAccessPolicyOpenApiVo idInt(Integer idInt) {
this.idInt = idInt;
return this;
}
/**
* Entry ID of the policy. Except for newly added policies, this parameter should be retained
* @return idInt
*/
@ApiModelProperty(value = "Entry ID of the policy. Except for newly added policies, this parameter should be retained")
public Integer getIdInt() {
return idInt;
}
public void setIdInt(Integer idInt) {
this.idInt = idInt;
}
public PreAuthAccessPolicyOpenApiVo type(Integer type) {
this.type = type;
return this;
}
/**
* Type of the policy. It should be a value as follows: 1: Destination IP Range, and parameter [ip] and [subnetMask] is needed. 2: URL, and parameter [url] is needed
* @return type
*/
@ApiModelProperty(required = true, value = "Type of the policy. It should be a value as follows: 1: Destination IP Range, and parameter [ip] and [subnetMask] is needed. 2: URL, and parameter [url] is needed")
@NotNull
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public PreAuthAccessPolicyOpenApiVo ip(String ip) {
this.ip = ip;
return this;
}
/**
* IP Address of Pre-Authentication Access
* @return ip
*/
@ApiModelProperty(value = "IP Address of Pre-Authentication Access")
@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b")
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public PreAuthAccessPolicyOpenApiVo subnetMask(Integer subnetMask) {
this.subnetMask = subnetMask;
return this;
}
/**
* Subnet mask of Pre-Authentication Access. It should be within the range of 1-32
* @return subnetMask
*/
@ApiModelProperty(value = "Subnet mask of Pre-Authentication Access. It should be within the range of 1-32")
public Integer getSubnetMask() {
return subnetMask;
}
public void setSubnetMask(Integer subnetMask) {
this.subnetMask = subnetMask;
}
public PreAuthAccessPolicyOpenApiVo url(String url) {
this.url = url;
return this;
}
/**
* URL of Pre-Authentication Access
* @return url
*/
@ApiModelProperty(value = "URL of Pre-Authentication Access")
@Pattern(regexp="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:([0-9]|[1-9]\\d{1,3}|[1-5]\\d{4}|6[0-4]\\d{4}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5]))?|([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,18}(:([0-9]|[1-9]\\d{1,3}|[1-5]\\d{4}|6[0-4]\\d{4}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5]))?)")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PreAuthAccessPolicyOpenApiVo preAuthAccessPolicyOpenApiVo = (PreAuthAccessPolicyOpenApiVo) o;
return Objects.equals(this.idInt, preAuthAccessPolicyOpenApiVo.idInt) &&
Objects.equals(this.type, preAuthAccessPolicyOpenApiVo.type) &&
Objects.equals(this.ip, preAuthAccessPolicyOpenApiVo.ip) &&
Objects.equals(this.subnetMask, preAuthAccessPolicyOpenApiVo.subnetMask) &&
Objects.equals(this.url, preAuthAccessPolicyOpenApiVo.url);
}
@Override
public int hashCode() {
return Objects.hash(idInt, type, ip, subnetMask, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PreAuthAccessPolicyOpenApiVo {\n");
sb.append(" idInt: ").append(toIndentedString(idInt)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" ip: ").append(toIndentedString(ip)).append("\n");
sb.append(" subnetMask: ").append(toIndentedString(subnetMask)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,21 +10,29 @@ import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.wfc.omada.config.FeignConfig;
import org.wfc.omada.api.log.model.AuditLogNotificationSettingEditOpenApiVo;
import org.wfc.omada.api.log.model.DeleteGlobalAlertLogListOpenApiVo;
import org.wfc.omada.api.log.model.DeleteGlobalEventLogListOpenApiVo;
import org.wfc.omada.api.log.model.DeleteSiteAlertLogListOpenApiVo;
import org.wfc.omada.api.log.model.DeleteSiteEventLogListOpenApiVo;
import org.wfc.omada.api.log.model.LogNotificationSettingEditOpenApiV2Vo;
import org.wfc.omada.api.log.model.LogNotificationSettingEditOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseAlertLogGridVoAlertLogOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseAuditLogNotificationSettingOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseEventLogGridVoEventLogOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseGridVoAuditLogOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseLogNotificationSettingOpenApiVo;
import org.wfc.omada.api.log.model.OperationResponseWithoutResult;
import org.wfc.omada.api.log.model.ResolveSiteLogListOpenApiVo;
import org.wfc.omada.config.FeignConfig;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:48.508+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:58:31.493597800+08:00[Asia/Shanghai]")
@Validated
@Api(value = "OmadaLog", description = "the OmadaLog API")
@@ -32,30 +40,157 @@ import javax.validation.constraints.NotNull;
public interface OmadaLogApi {
/**
* GET /openapi/v1/{omadacId}/audit-notification : Get global audit log notification
* Get global audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
* DELETE /openapi/v1/${omada.omadac-id}/logs/alerts/delete : Delete global alert log
* Delete global alert log.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param deleteGlobalAlertLogListOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global audit log notification", nickname = "getAuditLogSettingForGlobal", notes = "Get global audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Delete global alert log", nickname = "deleteAlertLogsForGlobal", notes = "Delete global alert log.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/logs/alerts/delete",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<OperationResponseWithoutResult> deleteAlertLogsForGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization,@ApiParam(value = "" ) @Valid @RequestBody(required = false) DeleteGlobalAlertLogListOpenApiVo deleteGlobalAlertLogListOpenApiVo);
/**
* DELETE /openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts/delete : Delete site alert log
* Delete site alert log.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param deleteSiteAlertLogListOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Delete site alert log", nickname = "deleteAlertLogsForSite", notes = "Delete site alert log.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts/delete",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<OperationResponseWithoutResult> deleteAlertLogsForSite(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "" ) @Valid @RequestBody(required = false) DeleteSiteAlertLogListOpenApiVo deleteSiteAlertLogListOpenApiVo);
/**
* DELETE /openapi/v1/${omada.omadac-id}/logs/events/delete : Delete global event log
* Delete global event log.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param deleteGlobalEventLogListOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Delete global event log", nickname = "deleteEventLogsForGlobal", notes = "Delete global event log.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/logs/events/delete",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<OperationResponseWithoutResult> deleteEventLogsForGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization,@ApiParam(value = "" ) @Valid @RequestBody(required = false) DeleteGlobalEventLogListOpenApiVo deleteGlobalEventLogListOpenApiVo);
/**
* DELETE /openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/events/delete : Delete site event log
* Delete site event log.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param deleteSiteEventLogListOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Delete site event log", nickname = "deleteEventLogsForSite", notes = "Delete site event log.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/events/delete",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<OperationResponseWithoutResult> deleteEventLogsForSite(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "" ) @Valid @RequestBody(required = false) DeleteSiteEventLogListOpenApiVo deleteSiteEventLogListOpenApiVo);
/**
* GET /openapi/v1/${omada.omadac-id}/logs/alerts : Get global alert log list
* Get logs in global alert log page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param page Start page number. Start from 1. (required)
* @param pageSize Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100) (required)
* @param filtersTimeStart Filter query parameters, support field 1679297710438 (required)
* @param filtersTimeEnd Filter query parameters, support field 1681889710438 (required)
* @param filtersModule Filter query parameters, support field module, it should be a value as follows: System, Device (optional)
* @param filtersResolved Filter query parameters, support field resolved, it should be a value as follows: true, false (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global alert log list", nickname = "getAlertLogsForGlobal", notes = "Get logs in global alert log page.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseAlertLogGridVoAlertLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseAlertLogGridVoAlertLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/logs/alerts",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseAlertLogGridVoAlertLogOpenApiVo> getAlertLogsForGlobal(@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100)", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Filter query parameters, support field 1679297710438", required = true) @Valid @RequestParam(value = "filters.timeStart", required = true) Long filtersTimeStart,@NotNull @ApiParam(value = "Filter query parameters, support field 1681889710438", required = true) @Valid @RequestParam(value = "filters.timeEnd", required = true) Long filtersTimeEnd,@ApiParam(value = "Filter query parameters, support field module, it should be a value as follows: System, Device") @Valid @RequestParam(value = "filters.module", required = false) String filtersModule,@ApiParam(value = "Filter query parameters, support field resolved, it should be a value as follows: true, false") @Valid @RequestParam(value = "filters.resolved", required = false) Boolean filtersResolved);
/**
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts : Get site alert log list
* Get logs in site alert log page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param page Start page number. Start from 1. (required)
* @param pageSize Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100) (required)
* @param filtersTimeStart Filter query parameters, support field 1679297710438 (required)
* @param filtersTimeEnd Filter query parameters, support field 1681889710438 (required)
* @param filtersModule Filter query parameters, support field module, it should be a value as follows: System, Device, Client (optional)
* @param filtersResolved Filter query parameters, support field resolved, it should be a value as follows: true, false (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site alert log list", nickname = "getAlertLogsForSite", notes = "Get logs in site alert log page.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseAlertLogGridVoAlertLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseAlertLogGridVoAlertLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseAlertLogGridVoAlertLogOpenApiVo> getAlertLogsForSite(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100)", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Filter query parameters, support field 1679297710438", required = true) @Valid @RequestParam(value = "filters.timeStart", required = true) Long filtersTimeStart,@NotNull @ApiParam(value = "Filter query parameters, support field 1681889710438", required = true) @Valid @RequestParam(value = "filters.timeEnd", required = true) Long filtersTimeEnd,@ApiParam(value = "Filter query parameters, support field module, it should be a value as follows: System, Device, Client") @Valid @RequestParam(value = "filters.module", required = false) String filtersModule,@ApiParam(value = "Filter query parameters, support field resolved, it should be a value as follows: true, false") @Valid @RequestParam(value = "filters.resolved", required = false) Boolean filtersResolved);
/**
* GET /openapi/v1/${omada.omadac-id}/audit-notification : Get global audit log notification
* Get global audit log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global audit log notification", nickname = "getAuditLogSettingForGlobal", notes = "Get global audit log notification.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/audit-notification",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseAuditLogNotificationSettingOpenApiVo> getAuditLogSettingForGlobal(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);
ResponseEntity<OperationResponseAuditLogNotificationSettingOpenApiVo> getAuditLogSettingForGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization);
/**
* GET /openapi/v1/{omadacId}/sites/{siteId}/site/audit-notification : Get site audit log notification
* Get site audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/site/audit-notification : Get site audit log notification
* Get site audit log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site audit log notification", nickname = "getAuditLogSettingForMsp1", notes = "Get site audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Get site audit log notification", nickname = "getAuditLogSettingForMsp1", notes = "Get site audit log notification.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/site/audit-notification",
@@ -65,8 +200,8 @@ public interface OmadaLogApi {
/**
* GET /openapi/v1/{omadacId}/audit-logs : Get global audit log list
* Get audit logs in global audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
* GET /openapi/v1/${omada.omadac-id}/audit-logs : Get global audit log list
* Get audit logs in global audit page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param page Start page number. Start from 1. (required)
@@ -77,9 +212,10 @@ public interface OmadaLogApi {
* @param filtersAuditTypes Filter query parameters, support field auditTypes, for the values of auditLog type, refer to section 5.2.2 of the Open API Access Guide, example:Log,Cloud Access,User Interface. (optional)
* @param filtersTimes Filter query parameters, support field times, example:[{\&quot;timeStart\&quot;:1678060800000,\&quot;timeEnd\&quot;:1678665599999}](UrlEncode:%5B%7B%22timeStart%22%3A1678060800000%2C%22timeEnd%22%3A1678665599999%7D%5D).If this parameter is not specified (not included or empty array), the interface will query data within the default time period: [{\&quot;timeStart\&quot;: Current timestamp minus milliseconds of 7 days,\&quot;timeEnd\&quot;: Current timestamp}]. (optional)
* @param searchKey Fuzzy query parameters, support field content (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global audit log list", nickname = "getAuditLogsForGlobal", notes = "Get audit logs in global audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseGridVoAuditLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Get global audit log list", nickname = "getAuditLogsForGlobal", notes = "Get audit logs in global audit page.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseGridVoAuditLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoAuditLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/audit-logs",
@@ -89,8 +225,8 @@ public interface OmadaLogApi {
/**
* GET /openapi/v1/{omadacId}/sites/{siteId}/audit-logs : Get site audit log list
* Get audit logs in site audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/audit-logs : Get site audit log list
* Get audit logs in site audit page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
@@ -102,9 +238,10 @@ public interface OmadaLogApi {
* @param filtersAuditTypes Filter query parameters, support field auditTypes, for the values of auditLog type, refer to section 5.2.2 of the Open API Access Guide, example:Log,Cloud Access,User Interface. (optional)
* @param filtersTimes Filter query parameters, support field times, example:[{\&quot;timeStart\&quot;:1678060800000,\&quot;timeEnd\&quot;:1678665599999}](UrlEncode:%5B%7B%22timeStart%22%3A1678060800000%2C%22timeEnd%22%3A1678665599999%7D%5D).If this parameter is not specified (not included or empty array), the interface will query data within the default time period: [{\&quot;timeStart\&quot;: Current timestamp minus milliseconds of 7 days,\&quot;timeEnd\&quot;: Current timestamp}]. (optional)
* @param searchKey Fuzzy query parameters, support field content (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site audit log list", nickname = "getAuditLogsForSite", notes = "Get audit logs in site audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseGridVoAuditLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Get site audit log list", nickname = "getAuditLogsForSite", notes = "Get audit logs in site audit page.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseGridVoAuditLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoAuditLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/audit-logs",
@@ -114,10 +251,56 @@ public interface OmadaLogApi {
/**
* GET /openapi/v1/{omadacId}/log-notification : Get global log notification
* GET /openapi/v1/${omada.omadac-id}/logs/events : Get global event log list
* Get logs in global event log page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param page Start page number. Start from 1. (required)
* @param pageSize Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100) (required)
* @param filtersTimeStart Filter query parameters, support field 1679297710438 (required)
* @param filtersTimeEnd Filter query parameters, support field 1681889710438 (required)
* @param filtersModule Filter query parameters, support field module, it should be a value as follows: System, Device (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global event log list", nickname = "getEventLogsForGlobal", notes = "Get logs in global event log page.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseEventLogGridVoEventLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseEventLogGridVoEventLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/logs/events",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseEventLogGridVoEventLogOpenApiVo> getEventLogsForGlobal(@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100)", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Filter query parameters, support field 1679297710438", required = true) @Valid @RequestParam(value = "filters.timeStart", required = true) Long filtersTimeStart,@NotNull @ApiParam(value = "Filter query parameters, support field 1681889710438", required = true) @Valid @RequestParam(value = "filters.timeEnd", required = true) Long filtersTimeEnd,@ApiParam(value = "Filter query parameters, support field module, it should be a value as follows: System, Device") @Valid @RequestParam(value = "filters.module", required = false) String filtersModule);
/**
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/events : Get site event log list
* Get logs in site event log page.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param page Start page number. Start from 1. (required)
* @param pageSize Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100) (required)
* @param filtersTimeStart Filter query parameters, support field 1679297710438 (required)
* @param filtersTimeEnd Filter query parameters, support field 1681889710438 (required)
* @param filtersModule Filter query parameters, support field module, it should be a value as follows: System, Device, Client (optional)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site event log list", nickname = "getEventLogsForSite", notes = "Get logs in site event log page.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseEventLogGridVoEventLogOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseEventLogGridVoEventLogOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/events",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseEventLogGridVoEventLogOpenApiVo> getEventLogsForSite(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 11000.(value:10,15,20,30,50,100)", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Filter query parameters, support field 1679297710438", required = true) @Valid @RequestParam(value = "filters.timeStart", required = true) Long filtersTimeStart,@NotNull @ApiParam(value = "Filter query parameters, support field 1681889710438", required = true) @Valid @RequestParam(value = "filters.timeEnd", required = true) Long filtersTimeEnd,@ApiParam(value = "Filter query parameters, support field module, it should be a value as follows: System, Device, Client") @Valid @RequestParam(value = "filters.module", required = false) String filtersModule);
/**
* GET /openapi/v1/${omada.omadac-id}/log-notification : Get global log notification
* Get global log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
* @deprecated
*/
@@ -127,31 +310,33 @@ public interface OmadaLogApi {
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/log-notification",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForGlobal(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization);
/**
* GET /openapi/v2/{omadacId}/log-notification : Get global log notification
* GET /openapi/v2/${omada.omadac-id}/log-notification : Get global log notification
* Get global log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get global log notification", nickname = "getLogSettingForGlobalV2", notes = "Get global log notification.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager View Only", response = OperationResponseLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseLogNotificationSettingOpenApiVo.class) })
@RequestMapping(value = "/openapi/v2/{omadacId}/log-notification",
@RequestMapping(value = "/openapi/v2/${omada.omadac-id}/log-notification",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForGlobalV2(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForGlobalV2(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization);
/**
* GET /openapi/v1/{omadacId}/sites/{siteId}/site/log-notification : Get site log notification
* GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/site/log-notification : Get site log notification
* Get site log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
* @deprecated
*/
@@ -165,67 +350,53 @@ public interface OmadaLogApi {
/**
* GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/site/log-notification : Get site template log notification
* Get site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Site Template Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteTemplateId Site Template ID (required)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site template log notification", nickname = "getLogSettingForSiteTemplate", notes = "Get site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Site Template Manager View Only", response = OperationResponseLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseLogNotificationSettingOpenApiVo.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sitetemplates/{siteTemplateId}/site/log-notification",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForSiteTemplate(@ApiParam(value = "Site Template ID",required=true) @PathVariable("siteTemplateId") String siteTemplateId);
/**
* GET /openapi/v2/{omadacId}/sites/{siteId}/site/log-notification : Get site log notification
* GET /openapi/v2/${omada.omadac-id}/sites/{siteId}/site/log-notification : Get site log notification
* Get site log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager View Only
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Get site log notification", nickname = "getLogSettingForSiteV2", notes = "Get site log notification.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager View Only", response = OperationResponseLogNotificationSettingOpenApiVo.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseLogNotificationSettingOpenApiVo.class) })
@RequestMapping(value = "/openapi/v2/{omadacId}/sites/{siteId}/site/log-notification",
@RequestMapping(value = "/openapi/v2/${omada.omadac-id}/sites/{siteId}/site/log-notification",
produces = "*/*",
method = RequestMethod.GET)
ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForSiteV2(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);
/**
* PATCH /openapi/v1/{omadacId}/audit-notification : Modify global audit log notification
* Modify global audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager Modify
* PATCH /openapi/v1/${omada.omadac-id}/audit-notification : Modify global audit log notification
* Modify global audit log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param auditLogNotificationSettingEditOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify global audit log notification", nickname = "modifyAuditLogSettingGlobal", notes = "Modify global audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Modify global audit log notification", nickname = "modifyAuditLogSettingGlobal", notes = "Modify global audit log notification.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/audit-notification",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
ResponseEntity<OperationResponseWithoutResult> modifyAuditLogSettingGlobal(@ApiParam(value = "" ) @Valid @RequestBody(required = false) AuditLogNotificationSettingEditOpenApiVo auditLogNotificationSettingEditOpenApiVo);
ResponseEntity<OperationResponseWithoutResult> modifyAuditLogSettingGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization,@ApiParam(value = "" ) @Valid @RequestBody(required = false) AuditLogNotificationSettingEditOpenApiVo auditLogNotificationSettingEditOpenApiVo);
/**
* PATCH /openapi/v1/{omadacId}/sites/{siteId}/site/audit-notification : Modify site audit log notification
* Modify site audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
* PATCH /openapi/v1/${omada.omadac-id}/sites/{siteId}/site/audit-notification : Modify site audit log notification
* Modify site audit log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param auditLogNotificationSettingEditOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify site audit log notification", nickname = "modifyAuditLogSettingSite1", notes = "Modify site audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Modify site audit log notification", nickname = "modifyAuditLogSettingSite1", notes = "Modify site audit log notification.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/site/audit-notification",
@@ -236,10 +407,11 @@ public interface OmadaLogApi {
/**
* PATCH /openapi/v1/{omadacId}/log-notification : Modify global log notification
* PATCH /openapi/v1/${omada.omadac-id}/log-notification : Modify global log notification
* Modify global log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param logNotificationSettingEditOpenApiVo (optional)
* @return OK (status code 200)
* @deprecated
@@ -251,33 +423,35 @@ public interface OmadaLogApi {
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
ResponseEntity<OperationResponseWithoutResult> modifyLogSettingGlobal(@ApiParam(value = "" ) @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiVo logNotificationSettingEditOpenApiVo);
ResponseEntity<OperationResponseWithoutResult> modifyLogSettingGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization,@ApiParam(value = "" ) @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiVo logNotificationSettingEditOpenApiVo);
/**
* PATCH /openapi/v2/{omadacId}/log-notification : Modify global log notification
* PATCH /openapi/v2/${omada.omadac-id}/log-notification : Modify global log notification
* Modify global log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param logNotificationSettingEditOpenApiV2Vo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify global log notification", nickname = "modifyLogSettingGlobalV2", notes = "Modify global log notification.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v2/{omadacId}/log-notification",
@RequestMapping(value = "/openapi/v2/${omada.omadac-id}/log-notification",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
ResponseEntity<OperationResponseWithoutResult> modifyLogSettingGlobalV2(@ApiParam(value = "" ) @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiV2Vo logNotificationSettingEditOpenApiV2Vo);
ResponseEntity<OperationResponseWithoutResult> modifyLogSettingGlobalV2(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization,@ApiParam(value = "" ) @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiV2Vo logNotificationSettingEditOpenApiV2Vo);
/**
* PATCH /openapi/v1/{omadacId}/sites/{siteId}/site/log-notification : Modify site log notification
* PATCH /openapi/v1/${omada.omadac-id}/sites/{siteId}/site/log-notification : Modify site log notification
* Modify site log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param logNotificationSettingEditOpenApiVo (optional)
* @return OK (status code 200)
* @deprecated
@@ -293,37 +467,19 @@ public interface OmadaLogApi {
/**
* PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/site/log-notification : Modify site template log notification
* Modify site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Site Template Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteTemplateId Site Template ID (required)
* @param logNotificationSettingEditOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify site template log notification", nickname = "modifyLogSettingSiteTemplate", notes = "Modify site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Site Template Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sitetemplates/{siteTemplateId}/site/log-notification",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
ResponseEntity<OperationResponseWithoutResult> modifyLogSettingSiteTemplate(@ApiParam(value = "Site Template ID",required=true) @PathVariable("siteTemplateId") String siteTemplateId,@ApiParam(value = "" ) @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiVo logNotificationSettingEditOpenApiVo);
/**
* PATCH /openapi/v2/{omadacId}/sites/{siteId}/site/log-notification : Modify site log notification
* PATCH /openapi/v2/${omada.omadac-id}/sites/{siteId}/site/log-notification : Modify site log notification
* Modify site log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param logNotificationSettingEditOpenApiV2Vo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Modify site log notification", nickname = "modifyLogSettingSiteV2", notes = "Modify site log notification.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v2/{omadacId}/sites/{siteId}/site/log-notification",
@RequestMapping(value = "/openapi/v2/${omada.omadac-id}/sites/{siteId}/site/log-notification",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.PATCH)
@@ -331,10 +487,11 @@ public interface OmadaLogApi {
/**
* POST /openapi/v1/{omadacId}/reset/log-notification : Reset global log notification
* POST /openapi/v1/${omada.omadac-id}/reset/log-notification : Reset global log notification
* Reset global log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Reset global log notification", nickname = "resetLogSettingGlobal", notes = "Reset global log notification.<br/><br/>The interface requires one of the permissions: <br/>Global Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@@ -343,15 +500,16 @@ public interface OmadaLogApi {
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/reset/log-notification",
produces = "*/*",
method = RequestMethod.POST)
ResponseEntity<OperationResponseWithoutResult> resetLogSettingGlobal(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);
ResponseEntity<OperationResponseWithoutResult> resetLogSettingGlobal(@ApiParam(value = "" , defaultValue="Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw") @RequestHeader(value="Authorization", required=false) String authorization);
/**
* POST /openapi/v1/{omadacId}/sites/{siteId}/site/reset/log-notification : Reset site log notification
* POST /openapi/v1/${omada.omadac-id}/sites/{siteId}/site/reset/log-notification : Reset site log notification
* Reset site log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @return OK (status code 200)
*/
@ApiOperation(value = "Reset site log notification", nickname = "resetLogSettingSite", notes = "Reset site log notification.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@@ -364,19 +522,22 @@ public interface OmadaLogApi {
/**
* POST /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/site/reset/log-notification : Reset site template log notification
* Reset site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Site Template Manager Modify
* POST /openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts/resolve : Resolve site alert log
* Resolve site alert log.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Log &amp; Audit Log Manager Modify
*
* @param omadacId Omada ID (required)
* @param siteTemplateId Site Template ID (required)
* @param siteId Site ID (required)
* @param authorization (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
* @param resolveSiteLogListOpenApiVo (optional)
* @return OK (status code 200)
*/
@ApiOperation(value = "Reset site template log notification", nickname = "resetLogSettingSiteTemplate", notes = "Reset site template log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>Global Site Template Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiOperation(value = "Resolve site alert log", nickname = "resolveAlertForSite", notes = "Resolve site alert log.<br/><br/>The interface requires one of the permissions: <br/>Site Log & Audit Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Log","Log", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sitetemplates/{siteTemplateId}/site/reset/log-notification",
@RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/logs/alerts/resolve",
produces = "*/*",
consumes = "application/json",
method = RequestMethod.POST)
ResponseEntity<OperationResponseWithoutResult> resetLogSettingSiteTemplate(@ApiParam(value = "Site Template ID",required=true) @PathVariable("siteTemplateId") String siteTemplateId);
ResponseEntity<OperationResponseWithoutResult> resolveAlertForSite(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "" ) @Valid @RequestBody(required = false) ResolveSiteLogListOpenApiVo resolveSiteLogListOpenApiVo);
}

View File

@@ -0,0 +1,190 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* AlertLogGridVoAlertLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AlertLogGridVoAlertLogOpenApiVo {
@JsonProperty("totalRows")
private Long totalRows;
@JsonProperty("currentPage")
private Integer currentPage;
@JsonProperty("currentSize")
private Integer currentSize;
@JsonProperty("data")
@Valid
private List<AlertLogOpenApiVo> data = null;
@JsonProperty("alertLogStat")
private AlertLogStatOpenApiVo alertLogStat;
public AlertLogGridVoAlertLogOpenApiVo totalRows(Long totalRows) {
this.totalRows = totalRows;
return this;
}
/**
* Total rows of all items.
* @return totalRows
*/
@ApiModelProperty(value = "Total rows of all items.")
public Long getTotalRows() {
return totalRows;
}
public void setTotalRows(Long totalRows) {
this.totalRows = totalRows;
}
public AlertLogGridVoAlertLogOpenApiVo currentPage(Integer currentPage) {
this.currentPage = currentPage;
return this;
}
/**
* Current page number.
* @return currentPage
*/
@ApiModelProperty(value = "Current page number.")
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public AlertLogGridVoAlertLogOpenApiVo currentSize(Integer currentSize) {
this.currentSize = currentSize;
return this;
}
/**
* Number of entries per page.
* @return currentSize
*/
@ApiModelProperty(value = "Number of entries per page.")
public Integer getCurrentSize() {
return currentSize;
}
public void setCurrentSize(Integer currentSize) {
this.currentSize = currentSize;
}
public AlertLogGridVoAlertLogOpenApiVo data(List<AlertLogOpenApiVo> data) {
this.data = data;
return this;
}
public AlertLogGridVoAlertLogOpenApiVo addDataItem(AlertLogOpenApiVo dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
this.data.add(dataItem);
return this;
}
/**
* Get data
* @return data
*/
@ApiModelProperty(value = "")
@Valid
public List<AlertLogOpenApiVo> getData() {
return data;
}
public void setData(List<AlertLogOpenApiVo> data) {
this.data = data;
}
public AlertLogGridVoAlertLogOpenApiVo alertLogStat(AlertLogStatOpenApiVo alertLogStat) {
this.alertLogStat = alertLogStat;
return this;
}
/**
* Get alertLogStat
* @return alertLogStat
*/
@ApiModelProperty(value = "")
@Valid
public AlertLogStatOpenApiVo getAlertLogStat() {
return alertLogStat;
}
public void setAlertLogStat(AlertLogStatOpenApiVo alertLogStat) {
this.alertLogStat = alertLogStat;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AlertLogGridVoAlertLogOpenApiVo alertLogGridVoAlertLogOpenApiVo = (AlertLogGridVoAlertLogOpenApiVo) o;
return Objects.equals(this.totalRows, alertLogGridVoAlertLogOpenApiVo.totalRows) &&
Objects.equals(this.currentPage, alertLogGridVoAlertLogOpenApiVo.currentPage) &&
Objects.equals(this.currentSize, alertLogGridVoAlertLogOpenApiVo.currentSize) &&
Objects.equals(this.data, alertLogGridVoAlertLogOpenApiVo.data) &&
Objects.equals(this.alertLogStat, alertLogGridVoAlertLogOpenApiVo.alertLogStat);
}
@Override
public int hashCode() {
return Objects.hash(totalRows, currentPage, currentSize, data, alertLogStat);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AlertLogGridVoAlertLogOpenApiVo {\n");
sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n");
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
sb.append(" currentSize: ").append(toIndentedString(currentSize)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" alertLogStat: ").append(toIndentedString(alertLogStat)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,201 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* AlertLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AlertLogOpenApiVo {
@JsonProperty("id")
private String id;
@JsonProperty("key")
private String key;
@JsonProperty("module")
private String module;
@JsonProperty("content")
private String content;
@JsonProperty("time")
private Long time;
@JsonProperty("level")
private String level;
public AlertLogOpenApiVo id(String id) {
this.id = id;
return this;
}
/**
* Log ID.
* @return id
*/
@ApiModelProperty(value = "Log ID.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public AlertLogOpenApiVo key(String key) {
this.key = key;
return this;
}
/**
* Log key.
* @return key
*/
@ApiModelProperty(value = "Log key.")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public AlertLogOpenApiVo module(String module) {
this.module = module;
return this;
}
/**
* Log module.
* @return module
*/
@ApiModelProperty(value = "Log module.")
public String getModule() {
return module;
}
public void setModule(String module) {
this.module = module;
}
public AlertLogOpenApiVo content(String content) {
this.content = content;
return this;
}
/**
* Log content.
* @return content
*/
@ApiModelProperty(value = "Log content.")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public AlertLogOpenApiVo time(Long time) {
this.time = time;
return this;
}
/**
* Log time.
* @return time
*/
@ApiModelProperty(value = "Log time.")
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
public AlertLogOpenApiVo level(String level) {
this.level = level;
return this;
}
/**
* Alert log level.
* @return level
*/
@ApiModelProperty(value = "Alert log level.")
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AlertLogOpenApiVo alertLogOpenApiVo = (AlertLogOpenApiVo) o;
return Objects.equals(this.id, alertLogOpenApiVo.id) &&
Objects.equals(this.key, alertLogOpenApiVo.key) &&
Objects.equals(this.module, alertLogOpenApiVo.module) &&
Objects.equals(this.content, alertLogOpenApiVo.content) &&
Objects.equals(this.time, alertLogOpenApiVo.time) &&
Objects.equals(this.level, alertLogOpenApiVo.level);
}
@Override
public int hashCode() {
return Objects.hash(id, key, module, content, time, level);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AlertLogOpenApiVo {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" module: ").append(toIndentedString(module)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" time: ").append(toIndentedString(time)).append("\n");
sb.append(" level: ").append(toIndentedString(level)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,178 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Alert log statistic.
*/
@ApiModel(description = "Alert log statistic.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AlertLogStatOpenApiVo {
@JsonProperty("totalLogNum")
private Long totalLogNum;
@JsonProperty("unResolvedLogNum")
private Long unResolvedLogNum;
@JsonProperty("resolvedLogNum")
private Long resolvedLogNum;
@JsonProperty("systemLogNum")
private Long systemLogNum;
@JsonProperty("deviceLogNum")
private Long deviceLogNum;
public AlertLogStatOpenApiVo totalLogNum(Long totalLogNum) {
this.totalLogNum = totalLogNum;
return this;
}
/**
* Total log number.
* @return totalLogNum
*/
@ApiModelProperty(value = "Total log number.")
public Long getTotalLogNum() {
return totalLogNum;
}
public void setTotalLogNum(Long totalLogNum) {
this.totalLogNum = totalLogNum;
}
public AlertLogStatOpenApiVo unResolvedLogNum(Long unResolvedLogNum) {
this.unResolvedLogNum = unResolvedLogNum;
return this;
}
/**
* Unresolved alert log number.
* @return unResolvedLogNum
*/
@ApiModelProperty(value = "Unresolved alert log number.")
public Long getUnResolvedLogNum() {
return unResolvedLogNum;
}
public void setUnResolvedLogNum(Long unResolvedLogNum) {
this.unResolvedLogNum = unResolvedLogNum;
}
public AlertLogStatOpenApiVo resolvedLogNum(Long resolvedLogNum) {
this.resolvedLogNum = resolvedLogNum;
return this;
}
/**
* Resolved alert log number.
* @return resolvedLogNum
*/
@ApiModelProperty(value = "Resolved alert log number.")
public Long getResolvedLogNum() {
return resolvedLogNum;
}
public void setResolvedLogNum(Long resolvedLogNum) {
this.resolvedLogNum = resolvedLogNum;
}
public AlertLogStatOpenApiVo systemLogNum(Long systemLogNum) {
this.systemLogNum = systemLogNum;
return this;
}
/**
* System alert log number.
* @return systemLogNum
*/
@ApiModelProperty(value = "System alert log number.")
public Long getSystemLogNum() {
return systemLogNum;
}
public void setSystemLogNum(Long systemLogNum) {
this.systemLogNum = systemLogNum;
}
public AlertLogStatOpenApiVo deviceLogNum(Long deviceLogNum) {
this.deviceLogNum = deviceLogNum;
return this;
}
/**
* Device alert log number.
* @return deviceLogNum
*/
@ApiModelProperty(value = "Device alert log number.")
public Long getDeviceLogNum() {
return deviceLogNum;
}
public void setDeviceLogNum(Long deviceLogNum) {
this.deviceLogNum = deviceLogNum;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AlertLogStatOpenApiVo alertLogStatOpenApiVo = (AlertLogStatOpenApiVo) o;
return Objects.equals(this.totalLogNum, alertLogStatOpenApiVo.totalLogNum) &&
Objects.equals(this.unResolvedLogNum, alertLogStatOpenApiVo.unResolvedLogNum) &&
Objects.equals(this.resolvedLogNum, alertLogStatOpenApiVo.resolvedLogNum) &&
Objects.equals(this.systemLogNum, alertLogStatOpenApiVo.systemLogNum) &&
Objects.equals(this.deviceLogNum, alertLogStatOpenApiVo.deviceLogNum);
}
@Override
public int hashCode() {
return Objects.hash(totalLogNum, unResolvedLogNum, resolvedLogNum, systemLogNum, deviceLogNum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AlertLogStatOpenApiVo {\n");
sb.append(" totalLogNum: ").append(toIndentedString(totalLogNum)).append("\n");
sb.append(" unResolvedLogNum: ").append(toIndentedString(unResolvedLogNum)).append("\n");
sb.append(" resolvedLogNum: ").append(toIndentedString(resolvedLogNum)).append("\n");
sb.append(" systemLogNum: ").append(toIndentedString(systemLogNum)).append("\n");
sb.append(" deviceLogNum: ").append(toIndentedString(deviceLogNum)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
* Audit Log Notification List
*/
@ApiModel(description = "Audit Log Notification List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AuditLogNotificationEditOpenApiVo {
@JsonProperty("key")

View File

@@ -10,7 +10,7 @@ import java.util.Objects;
* Audit Log Notification List
*/
@ApiModel(description = "Audit Log Notification List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AuditLogNotificationOpenApiVo {
@JsonProperty("key")

View File

@@ -12,7 +12,7 @@ import java.util.Objects;
/**
* AuditLogNotificationSettingEditOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AuditLogNotificationSettingEditOpenApiVo {
@JsonProperty("webhookConfig")

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
/**
* AuditLogNotificationSettingOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AuditLogNotificationSettingOpenApiVo {
@JsonProperty("webhookConfig")

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
/**
* AuditLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class AuditLogOpenApiVo {
@JsonProperty("time")

View File

@@ -0,0 +1,192 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* DeleteGlobalAlertLogListOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class DeleteGlobalAlertLogListOpenApiVo {
@JsonProperty("logs")
@Valid
private List<String> logs = null;
@JsonProperty("selectType")
private String selectType;
@JsonProperty("startTime")
private Long startTime;
@JsonProperty("endTime")
private Long endTime;
@JsonProperty("filterModule")
private String filterModule;
public DeleteGlobalAlertLogListOpenApiVo logs(List<String> logs) {
this.logs = logs;
return this;
}
public DeleteGlobalAlertLogListOpenApiVo addLogsItem(String logsItem) {
if (this.logs == null) {
this.logs = new ArrayList<>();
}
this.logs.add(logsItem);
return this;
}
/**
* Select the logs to delete; Log ID list can be obtained from 'Get global alert log list' interface.
* @return logs
*/
@ApiModelProperty(value = "Select the logs to delete; Log ID list can be obtained from 'Get global alert log list' interface.")
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
public DeleteGlobalAlertLogListOpenApiVo selectType(String selectType) {
this.selectType = selectType;
return this;
}
/**
* Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').
* @return selectType
*/
@ApiModelProperty(required = true, value = "Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').")
@NotNull
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
public DeleteGlobalAlertLogListOpenApiVo startTime(Long startTime) {
this.startTime = startTime;
return this;
}
/**
* The start timeStamp of the delete global alert log, unit: MS.
* @return startTime
*/
@ApiModelProperty(required = true, value = "The start timeStamp of the delete global alert log, unit: MS.")
@NotNull
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public DeleteGlobalAlertLogListOpenApiVo endTime(Long endTime) {
this.endTime = endTime;
return this;
}
/**
* The end timeStamp of the delete global alert log, unit: MS.
* @return endTime
*/
@ApiModelProperty(required = true, value = "The end timeStamp of the delete global alert log, unit: MS.")
@NotNull
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public DeleteGlobalAlertLogListOpenApiVo filterModule(String filterModule) {
this.filterModule = filterModule;
return this;
}
/**
* The module of the delete global log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.
* @return filterModule
*/
@ApiModelProperty(value = "The module of the delete global log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.")
public String getFilterModule() {
return filterModule;
}
public void setFilterModule(String filterModule) {
this.filterModule = filterModule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteGlobalAlertLogListOpenApiVo deleteGlobalAlertLogListOpenApiVo = (DeleteGlobalAlertLogListOpenApiVo) o;
return Objects.equals(this.logs, deleteGlobalAlertLogListOpenApiVo.logs) &&
Objects.equals(this.selectType, deleteGlobalAlertLogListOpenApiVo.selectType) &&
Objects.equals(this.startTime, deleteGlobalAlertLogListOpenApiVo.startTime) &&
Objects.equals(this.endTime, deleteGlobalAlertLogListOpenApiVo.endTime) &&
Objects.equals(this.filterModule, deleteGlobalAlertLogListOpenApiVo.filterModule);
}
@Override
public int hashCode() {
return Objects.hash(logs, selectType, startTime, endTime, filterModule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteGlobalAlertLogListOpenApiVo {\n");
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
sb.append(" selectType: ").append(toIndentedString(selectType)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" filterModule: ").append(toIndentedString(filterModule)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,192 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* DeleteGlobalEventLogListOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class DeleteGlobalEventLogListOpenApiVo {
@JsonProperty("logs")
@Valid
private List<String> logs = null;
@JsonProperty("selectType")
private String selectType;
@JsonProperty("startTime")
private Long startTime;
@JsonProperty("endTime")
private Long endTime;
@JsonProperty("filterModule")
private String filterModule;
public DeleteGlobalEventLogListOpenApiVo logs(List<String> logs) {
this.logs = logs;
return this;
}
public DeleteGlobalEventLogListOpenApiVo addLogsItem(String logsItem) {
if (this.logs == null) {
this.logs = new ArrayList<>();
}
this.logs.add(logsItem);
return this;
}
/**
* Select the logs to delete; Log ID list can be obtained from 'Get global event log list' interface.
* @return logs
*/
@ApiModelProperty(value = "Select the logs to delete; Log ID list can be obtained from 'Get global event log list' interface.")
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
public DeleteGlobalEventLogListOpenApiVo selectType(String selectType) {
this.selectType = selectType;
return this;
}
/**
* Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').
* @return selectType
*/
@ApiModelProperty(required = true, value = "Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').")
@NotNull
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
public DeleteGlobalEventLogListOpenApiVo startTime(Long startTime) {
this.startTime = startTime;
return this;
}
/**
* The start timeStamp of the delete global event log, unit: MS.
* @return startTime
*/
@ApiModelProperty(required = true, value = "The start timeStamp of the delete global event log, unit: MS.")
@NotNull
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public DeleteGlobalEventLogListOpenApiVo endTime(Long endTime) {
this.endTime = endTime;
return this;
}
/**
* The end timeStamp of the delete global event log, unit: MS.
* @return endTime
*/
@ApiModelProperty(required = true, value = "The end timeStamp of the delete global event log, unit: MS.")
@NotNull
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public DeleteGlobalEventLogListOpenApiVo filterModule(String filterModule) {
this.filterModule = filterModule;
return this;
}
/**
* The module of the delete global log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.
* @return filterModule
*/
@ApiModelProperty(value = "The module of the delete global log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.")
public String getFilterModule() {
return filterModule;
}
public void setFilterModule(String filterModule) {
this.filterModule = filterModule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteGlobalEventLogListOpenApiVo deleteGlobalEventLogListOpenApiVo = (DeleteGlobalEventLogListOpenApiVo) o;
return Objects.equals(this.logs, deleteGlobalEventLogListOpenApiVo.logs) &&
Objects.equals(this.selectType, deleteGlobalEventLogListOpenApiVo.selectType) &&
Objects.equals(this.startTime, deleteGlobalEventLogListOpenApiVo.startTime) &&
Objects.equals(this.endTime, deleteGlobalEventLogListOpenApiVo.endTime) &&
Objects.equals(this.filterModule, deleteGlobalEventLogListOpenApiVo.filterModule);
}
@Override
public int hashCode() {
return Objects.hash(logs, selectType, startTime, endTime, filterModule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteGlobalEventLogListOpenApiVo {\n");
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
sb.append(" selectType: ").append(toIndentedString(selectType)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" filterModule: ").append(toIndentedString(filterModule)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,192 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* DeleteSiteAlertLogListOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class DeleteSiteAlertLogListOpenApiVo {
@JsonProperty("logs")
@Valid
private List<String> logs = null;
@JsonProperty("selectType")
private String selectType;
@JsonProperty("startTime")
private Long startTime;
@JsonProperty("endTime")
private Long endTime;
@JsonProperty("filterModule")
private String filterModule;
public DeleteSiteAlertLogListOpenApiVo logs(List<String> logs) {
this.logs = logs;
return this;
}
public DeleteSiteAlertLogListOpenApiVo addLogsItem(String logsItem) {
if (this.logs == null) {
this.logs = new ArrayList<>();
}
this.logs.add(logsItem);
return this;
}
/**
* Select the logs to delete; Log ID list can be obtained from 'Get site alert log list' interface.
* @return logs
*/
@ApiModelProperty(value = "Select the logs to delete; Log ID list can be obtained from 'Get site alert log list' interface.")
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
public DeleteSiteAlertLogListOpenApiVo selectType(String selectType) {
this.selectType = selectType;
return this;
}
/**
* Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').
* @return selectType
*/
@ApiModelProperty(required = true, value = "Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').")
@NotNull
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
public DeleteSiteAlertLogListOpenApiVo startTime(Long startTime) {
this.startTime = startTime;
return this;
}
/**
* The start timeStamp of the delete site alert log, unit: MS.
* @return startTime
*/
@ApiModelProperty(required = true, value = "The start timeStamp of the delete site alert log, unit: MS.")
@NotNull
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public DeleteSiteAlertLogListOpenApiVo endTime(Long endTime) {
this.endTime = endTime;
return this;
}
/**
* The end timeStamp of the delete site alert log, unit: MS.
* @return endTime
*/
@ApiModelProperty(required = true, value = "The end timeStamp of the delete site alert log, unit: MS.")
@NotNull
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public DeleteSiteAlertLogListOpenApiVo filterModule(String filterModule) {
this.filterModule = filterModule;
return this;
}
/**
* The module of the delete site alert log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.
* @return filterModule
*/
@ApiModelProperty(value = "The module of the delete site alert log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.")
public String getFilterModule() {
return filterModule;
}
public void setFilterModule(String filterModule) {
this.filterModule = filterModule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteSiteAlertLogListOpenApiVo deleteSiteAlertLogListOpenApiVo = (DeleteSiteAlertLogListOpenApiVo) o;
return Objects.equals(this.logs, deleteSiteAlertLogListOpenApiVo.logs) &&
Objects.equals(this.selectType, deleteSiteAlertLogListOpenApiVo.selectType) &&
Objects.equals(this.startTime, deleteSiteAlertLogListOpenApiVo.startTime) &&
Objects.equals(this.endTime, deleteSiteAlertLogListOpenApiVo.endTime) &&
Objects.equals(this.filterModule, deleteSiteAlertLogListOpenApiVo.filterModule);
}
@Override
public int hashCode() {
return Objects.hash(logs, selectType, startTime, endTime, filterModule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteSiteAlertLogListOpenApiVo {\n");
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
sb.append(" selectType: ").append(toIndentedString(selectType)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" filterModule: ").append(toIndentedString(filterModule)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,192 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* DeleteSiteEventLogListOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class DeleteSiteEventLogListOpenApiVo {
@JsonProperty("logs")
@Valid
private List<String> logs = null;
@JsonProperty("selectType")
private String selectType;
@JsonProperty("startTime")
private Long startTime;
@JsonProperty("endTime")
private Long endTime;
@JsonProperty("filterModule")
private String filterModule;
public DeleteSiteEventLogListOpenApiVo logs(List<String> logs) {
this.logs = logs;
return this;
}
public DeleteSiteEventLogListOpenApiVo addLogsItem(String logsItem) {
if (this.logs == null) {
this.logs = new ArrayList<>();
}
this.logs.add(logsItem);
return this;
}
/**
* Select the logs to delete; Log ID list can be obtained from 'Get site event log list' interface.
* @return logs
*/
@ApiModelProperty(value = "Select the logs to delete; Log ID list can be obtained from 'Get site event log list' interface.")
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
public DeleteSiteEventLogListOpenApiVo selectType(String selectType) {
this.selectType = selectType;
return this;
}
/**
* Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').
* @return selectType
*/
@ApiModelProperty(required = true, value = "Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').")
@NotNull
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
public DeleteSiteEventLogListOpenApiVo startTime(Long startTime) {
this.startTime = startTime;
return this;
}
/**
* The start timeStamp of the delete site event log, unit: MS.
* @return startTime
*/
@ApiModelProperty(required = true, value = "The start timeStamp of the delete site event log, unit: MS.")
@NotNull
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public DeleteSiteEventLogListOpenApiVo endTime(Long endTime) {
this.endTime = endTime;
return this;
}
/**
* The end timeStamp of the delete site event log, unit: MS.
* @return endTime
*/
@ApiModelProperty(required = true, value = "The end timeStamp of the delete site event log, unit: MS.")
@NotNull
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public DeleteSiteEventLogListOpenApiVo filterModule(String filterModule) {
this.filterModule = filterModule;
return this;
}
/**
* The module of the delete site event log; It is required when [selectType] is 'all', filterModule should be a value as follows: ['System', 'Device', 'Client'].
* @return filterModule
*/
@ApiModelProperty(value = "The module of the delete site event log; It is required when [selectType] is 'all', filterModule should be a value as follows: ['System', 'Device', 'Client'].")
public String getFilterModule() {
return filterModule;
}
public void setFilterModule(String filterModule) {
this.filterModule = filterModule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteSiteEventLogListOpenApiVo deleteSiteEventLogListOpenApiVo = (DeleteSiteEventLogListOpenApiVo) o;
return Objects.equals(this.logs, deleteSiteEventLogListOpenApiVo.logs) &&
Objects.equals(this.selectType, deleteSiteEventLogListOpenApiVo.selectType) &&
Objects.equals(this.startTime, deleteSiteEventLogListOpenApiVo.startTime) &&
Objects.equals(this.endTime, deleteSiteEventLogListOpenApiVo.endTime) &&
Objects.equals(this.filterModule, deleteSiteEventLogListOpenApiVo.filterModule);
}
@Override
public int hashCode() {
return Objects.hash(logs, selectType, startTime, endTime, filterModule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteSiteEventLogListOpenApiVo {\n");
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
sb.append(" selectType: ").append(toIndentedString(selectType)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" filterModule: ").append(toIndentedString(filterModule)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,190 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* EventLogGridVoEventLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class EventLogGridVoEventLogOpenApiVo {
@JsonProperty("totalRows")
private Long totalRows;
@JsonProperty("currentPage")
private Integer currentPage;
@JsonProperty("currentSize")
private Integer currentSize;
@JsonProperty("data")
@Valid
private List<EventLogOpenApiVo> data = null;
@JsonProperty("eventLogStat")
private EventLogStatOpenApiVo eventLogStat;
public EventLogGridVoEventLogOpenApiVo totalRows(Long totalRows) {
this.totalRows = totalRows;
return this;
}
/**
* Total rows of all items.
* @return totalRows
*/
@ApiModelProperty(value = "Total rows of all items.")
public Long getTotalRows() {
return totalRows;
}
public void setTotalRows(Long totalRows) {
this.totalRows = totalRows;
}
public EventLogGridVoEventLogOpenApiVo currentPage(Integer currentPage) {
this.currentPage = currentPage;
return this;
}
/**
* Current page number.
* @return currentPage
*/
@ApiModelProperty(value = "Current page number.")
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public EventLogGridVoEventLogOpenApiVo currentSize(Integer currentSize) {
this.currentSize = currentSize;
return this;
}
/**
* Number of entries per page.
* @return currentSize
*/
@ApiModelProperty(value = "Number of entries per page.")
public Integer getCurrentSize() {
return currentSize;
}
public void setCurrentSize(Integer currentSize) {
this.currentSize = currentSize;
}
public EventLogGridVoEventLogOpenApiVo data(List<EventLogOpenApiVo> data) {
this.data = data;
return this;
}
public EventLogGridVoEventLogOpenApiVo addDataItem(EventLogOpenApiVo dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
this.data.add(dataItem);
return this;
}
/**
* Get data
* @return data
*/
@ApiModelProperty(value = "")
@Valid
public List<EventLogOpenApiVo> getData() {
return data;
}
public void setData(List<EventLogOpenApiVo> data) {
this.data = data;
}
public EventLogGridVoEventLogOpenApiVo eventLogStat(EventLogStatOpenApiVo eventLogStat) {
this.eventLogStat = eventLogStat;
return this;
}
/**
* Get eventLogStat
* @return eventLogStat
*/
@ApiModelProperty(value = "")
@Valid
public EventLogStatOpenApiVo getEventLogStat() {
return eventLogStat;
}
public void setEventLogStat(EventLogStatOpenApiVo eventLogStat) {
this.eventLogStat = eventLogStat;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EventLogGridVoEventLogOpenApiVo eventLogGridVoEventLogOpenApiVo = (EventLogGridVoEventLogOpenApiVo) o;
return Objects.equals(this.totalRows, eventLogGridVoEventLogOpenApiVo.totalRows) &&
Objects.equals(this.currentPage, eventLogGridVoEventLogOpenApiVo.currentPage) &&
Objects.equals(this.currentSize, eventLogGridVoEventLogOpenApiVo.currentSize) &&
Objects.equals(this.data, eventLogGridVoEventLogOpenApiVo.data) &&
Objects.equals(this.eventLogStat, eventLogGridVoEventLogOpenApiVo.eventLogStat);
}
@Override
public int hashCode() {
return Objects.hash(totalRows, currentPage, currentSize, data, eventLogStat);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EventLogGridVoEventLogOpenApiVo {\n");
sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n");
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
sb.append(" currentSize: ").append(toIndentedString(currentSize)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" eventLogStat: ").append(toIndentedString(eventLogStat)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,176 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* EventLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class EventLogOpenApiVo {
@JsonProperty("id")
private String id;
@JsonProperty("key")
private String key;
@JsonProperty("module")
private String module;
@JsonProperty("content")
private String content;
@JsonProperty("time")
private Long time;
public EventLogOpenApiVo id(String id) {
this.id = id;
return this;
}
/**
* Log ID.
* @return id
*/
@ApiModelProperty(value = "Log ID.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public EventLogOpenApiVo key(String key) {
this.key = key;
return this;
}
/**
* Log key.
* @return key
*/
@ApiModelProperty(value = "Log key.")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public EventLogOpenApiVo module(String module) {
this.module = module;
return this;
}
/**
* Log module.
* @return module
*/
@ApiModelProperty(value = "Log module.")
public String getModule() {
return module;
}
public void setModule(String module) {
this.module = module;
}
public EventLogOpenApiVo content(String content) {
this.content = content;
return this;
}
/**
* Log content.
* @return content
*/
@ApiModelProperty(value = "Log content.")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public EventLogOpenApiVo time(Long time) {
this.time = time;
return this;
}
/**
* Log time.
* @return time
*/
@ApiModelProperty(value = "Log time.")
public Long getTime() {
return time;
}
public void setTime(Long time) {
this.time = time;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EventLogOpenApiVo eventLogOpenApiVo = (EventLogOpenApiVo) o;
return Objects.equals(this.id, eventLogOpenApiVo.id) &&
Objects.equals(this.key, eventLogOpenApiVo.key) &&
Objects.equals(this.module, eventLogOpenApiVo.module) &&
Objects.equals(this.content, eventLogOpenApiVo.content) &&
Objects.equals(this.time, eventLogOpenApiVo.time);
}
@Override
public int hashCode() {
return Objects.hash(id, key, module, content, time);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EventLogOpenApiVo {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" module: ").append(toIndentedString(module)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" time: ").append(toIndentedString(time)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,153 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/**
* Event log statistic.
*/
@ApiModel(description = "Event log statistic.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class EventLogStatOpenApiVo {
@JsonProperty("totalLogNum")
private Long totalLogNum;
@JsonProperty("systemLogNum")
private Long systemLogNum;
@JsonProperty("deviceLogNum")
private Long deviceLogNum;
@JsonProperty("clientLogNum")
private Long clientLogNum;
public EventLogStatOpenApiVo totalLogNum(Long totalLogNum) {
this.totalLogNum = totalLogNum;
return this;
}
/**
* Total log number.
* @return totalLogNum
*/
@ApiModelProperty(value = "Total log number.")
public Long getTotalLogNum() {
return totalLogNum;
}
public void setTotalLogNum(Long totalLogNum) {
this.totalLogNum = totalLogNum;
}
public EventLogStatOpenApiVo systemLogNum(Long systemLogNum) {
this.systemLogNum = systemLogNum;
return this;
}
/**
* System event log number.
* @return systemLogNum
*/
@ApiModelProperty(value = "System event log number.")
public Long getSystemLogNum() {
return systemLogNum;
}
public void setSystemLogNum(Long systemLogNum) {
this.systemLogNum = systemLogNum;
}
public EventLogStatOpenApiVo deviceLogNum(Long deviceLogNum) {
this.deviceLogNum = deviceLogNum;
return this;
}
/**
* Device event log number.
* @return deviceLogNum
*/
@ApiModelProperty(value = "Device event log number.")
public Long getDeviceLogNum() {
return deviceLogNum;
}
public void setDeviceLogNum(Long deviceLogNum) {
this.deviceLogNum = deviceLogNum;
}
public EventLogStatOpenApiVo clientLogNum(Long clientLogNum) {
this.clientLogNum = clientLogNum;
return this;
}
/**
* Client event log number.
* @return clientLogNum
*/
@ApiModelProperty(value = "Client event log number.")
public Long getClientLogNum() {
return clientLogNum;
}
public void setClientLogNum(Long clientLogNum) {
this.clientLogNum = clientLogNum;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EventLogStatOpenApiVo eventLogStatOpenApiVo = (EventLogStatOpenApiVo) o;
return Objects.equals(this.totalLogNum, eventLogStatOpenApiVo.totalLogNum) &&
Objects.equals(this.systemLogNum, eventLogStatOpenApiVo.systemLogNum) &&
Objects.equals(this.deviceLogNum, eventLogStatOpenApiVo.deviceLogNum) &&
Objects.equals(this.clientLogNum, eventLogStatOpenApiVo.clientLogNum);
}
@Override
public int hashCode() {
return Objects.hash(totalLogNum, systemLogNum, deviceLogNum, clientLogNum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EventLogStatOpenApiVo {\n");
sb.append(" totalLogNum: ").append(toIndentedString(totalLogNum)).append("\n");
sb.append(" systemLogNum: ").append(toIndentedString(systemLogNum)).append("\n");
sb.append(" deviceLogNum: ").append(toIndentedString(deviceLogNum)).append("\n");
sb.append(" clientLogNum: ").append(toIndentedString(clientLogNum)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
/**
* GridVoAuditLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class GridVoAuditLogOpenApiVo {
@JsonProperty("totalRows")

View File

@@ -10,7 +10,7 @@ import java.util.Objects;
* Log Event Email (This config applies to the log site view)
*/
@ApiModel(description = "Log Event Email (This config applies to the log site view)")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogAlertEmailOpenApiVo {
@JsonProperty("alertEmailEnable")

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
* Event Notification List
*/
@ApiModel(description = "Event Notification List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationEditOpenApiV2Vo {
@JsonProperty("key")

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
* Log Notification List
*/
@ApiModel(description = "Log Notification List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationEditOpenApiVo {
@JsonProperty("key")

View File

@@ -10,7 +10,7 @@ import java.util.Objects;
* Log Notification List
*/
@ApiModel(description = "Log Notification List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationOpenApiVo {
@JsonProperty("key")

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
/**
* LogNotificationSettingEditOpenApiV2Vo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationSettingEditOpenApiV2Vo {
@JsonProperty("webhookConfig")

View File

@@ -12,7 +12,7 @@ import java.util.Objects;
/**
* LogNotificationSettingEditOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationSettingEditOpenApiVo {
@JsonProperty("webhookConfig")

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
/**
* LogNotificationSettingOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class LogNotificationSettingOpenApiVo {
@JsonProperty("webhookConfig")

View File

@@ -0,0 +1,128 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.Objects;
/**
* OperationResponseAlertLogGridVoAlertLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseAlertLogGridVoAlertLogOpenApiVo {
@JsonProperty("errorCode")
private Integer errorCode;
@JsonProperty("msg")
private String msg;
@JsonProperty("result")
private AlertLogGridVoAlertLogOpenApiVo result;
public OperationResponseAlertLogGridVoAlertLogOpenApiVo errorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
/**
* Get errorCode
* @return errorCode
*/
@ApiModelProperty(value = "")
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public OperationResponseAlertLogGridVoAlertLogOpenApiVo msg(String msg) {
this.msg = msg;
return this;
}
/**
* Get msg
* @return msg
*/
@ApiModelProperty(value = "")
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public OperationResponseAlertLogGridVoAlertLogOpenApiVo result(AlertLogGridVoAlertLogOpenApiVo result) {
this.result = result;
return this;
}
/**
* Get result
* @return result
*/
@ApiModelProperty(value = "")
@Valid
public AlertLogGridVoAlertLogOpenApiVo getResult() {
return result;
}
public void setResult(AlertLogGridVoAlertLogOpenApiVo result) {
this.result = result;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OperationResponseAlertLogGridVoAlertLogOpenApiVo operationResponseAlertLogGridVoAlertLogOpenApiVo = (OperationResponseAlertLogGridVoAlertLogOpenApiVo) o;
return Objects.equals(this.errorCode, operationResponseAlertLogGridVoAlertLogOpenApiVo.errorCode) &&
Objects.equals(this.msg, operationResponseAlertLogGridVoAlertLogOpenApiVo.msg) &&
Objects.equals(this.result, operationResponseAlertLogGridVoAlertLogOpenApiVo.result);
}
@Override
public int hashCode() {
return Objects.hash(errorCode, msg, result);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OperationResponseAlertLogGridVoAlertLogOpenApiVo {\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" msg: ").append(toIndentedString(msg)).append("\n");
sb.append(" result: ").append(toIndentedString(result)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
/**
* OperationResponseAuditLogNotificationSettingOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseAuditLogNotificationSettingOpenApiVo {
@JsonProperty("errorCode")

View File

@@ -0,0 +1,128 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import java.util.Objects;
/**
* OperationResponseEventLogGridVoEventLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseEventLogGridVoEventLogOpenApiVo {
@JsonProperty("errorCode")
private Integer errorCode;
@JsonProperty("msg")
private String msg;
@JsonProperty("result")
private EventLogGridVoEventLogOpenApiVo result;
public OperationResponseEventLogGridVoEventLogOpenApiVo errorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
/**
* Get errorCode
* @return errorCode
*/
@ApiModelProperty(value = "")
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public OperationResponseEventLogGridVoEventLogOpenApiVo msg(String msg) {
this.msg = msg;
return this;
}
/**
* Get msg
* @return msg
*/
@ApiModelProperty(value = "")
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public OperationResponseEventLogGridVoEventLogOpenApiVo result(EventLogGridVoEventLogOpenApiVo result) {
this.result = result;
return this;
}
/**
* Get result
* @return result
*/
@ApiModelProperty(value = "")
@Valid
public EventLogGridVoEventLogOpenApiVo getResult() {
return result;
}
public void setResult(EventLogGridVoEventLogOpenApiVo result) {
this.result = result;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OperationResponseEventLogGridVoEventLogOpenApiVo operationResponseEventLogGridVoEventLogOpenApiVo = (OperationResponseEventLogGridVoEventLogOpenApiVo) o;
return Objects.equals(this.errorCode, operationResponseEventLogGridVoEventLogOpenApiVo.errorCode) &&
Objects.equals(this.msg, operationResponseEventLogGridVoEventLogOpenApiVo.msg) &&
Objects.equals(this.result, operationResponseEventLogGridVoEventLogOpenApiVo.result);
}
@Override
public int hashCode() {
return Objects.hash(errorCode, msg, result);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OperationResponseEventLogGridVoEventLogOpenApiVo {\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" msg: ").append(toIndentedString(msg)).append("\n");
sb.append(" result: ").append(toIndentedString(result)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
/**
* OperationResponseGridVoAuditLogOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseGridVoAuditLogOpenApiVo {
@JsonProperty("errorCode")

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
/**
* OperationResponseLogNotificationSettingOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseLogNotificationSettingOpenApiVo {
@JsonProperty("errorCode")

View File

@@ -8,7 +8,7 @@ import java.util.Objects;
/**
* OperationResponseWithoutResult
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class OperationResponseWithoutResult {
@JsonProperty("errorCode")

View File

@@ -0,0 +1,192 @@
package org.wfc.omada.api.log.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* ResolveSiteLogListOpenApiVo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class ResolveSiteLogListOpenApiVo {
@JsonProperty("logs")
@Valid
private List<String> logs = null;
@JsonProperty("selectType")
private String selectType;
@JsonProperty("startTime")
private Long startTime;
@JsonProperty("endTime")
private Long endTime;
@JsonProperty("filterModule")
private String filterModule;
public ResolveSiteLogListOpenApiVo logs(List<String> logs) {
this.logs = logs;
return this;
}
public ResolveSiteLogListOpenApiVo addLogsItem(String logsItem) {
if (this.logs == null) {
this.logs = new ArrayList<>();
}
this.logs.add(logsItem);
return this;
}
/**
* Select the logs to resolve; Log ID list can be obtained from 'Get site alert log list' interface.
* @return logs
*/
@ApiModelProperty(value = "Select the logs to resolve; Log ID list can be obtained from 'Get site alert log list' interface.")
public List<String> getLogs() {
return logs;
}
public void setLogs(List<String> logs) {
this.logs = logs;
}
public ResolveSiteLogListOpenApiVo selectType(String selectType) {
this.selectType = selectType;
return this;
}
/**
* Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').
* @return selectType
*/
@ApiModelProperty(required = true, value = "Select type of logs. include: include selected logs, exclude: all but exclude selected logs, all: include all logs(Parameter [logs] need input '[]').")
@NotNull
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
public ResolveSiteLogListOpenApiVo startTime(Long startTime) {
this.startTime = startTime;
return this;
}
/**
* The start timeStamp of the resolve site alert log, unit: MS.
* @return startTime
*/
@ApiModelProperty(required = true, value = "The start timeStamp of the resolve site alert log, unit: MS.")
@NotNull
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public ResolveSiteLogListOpenApiVo endTime(Long endTime) {
this.endTime = endTime;
return this;
}
/**
* The end timeStamp of the resolve site alert log, unit: MS.
* @return endTime
*/
@ApiModelProperty(required = true, value = "The end timeStamp of the resolve site alert log, unit: MS.")
@NotNull
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public ResolveSiteLogListOpenApiVo filterModule(String filterModule) {
this.filterModule = filterModule;
return this;
}
/**
* The module of the resolve site alert log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.
* @return filterModule
*/
@ApiModelProperty(value = "The module of the resolve site alert log; It is required when [selectType] is 'all', filterModule should be a value as follows: 'System' or 'Device'.")
public String getFilterModule() {
return filterModule;
}
public void setFilterModule(String filterModule) {
this.filterModule = filterModule;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResolveSiteLogListOpenApiVo resolveSiteLogListOpenApiVo = (ResolveSiteLogListOpenApiVo) o;
return Objects.equals(this.logs, resolveSiteLogListOpenApiVo.logs) &&
Objects.equals(this.selectType, resolveSiteLogListOpenApiVo.selectType) &&
Objects.equals(this.startTime, resolveSiteLogListOpenApiVo.startTime) &&
Objects.equals(this.endTime, resolveSiteLogListOpenApiVo.endTime) &&
Objects.equals(this.filterModule, resolveSiteLogListOpenApiVo.filterModule);
}
@Override
public int hashCode() {
return Objects.hash(logs, selectType, startTime, endTime, filterModule);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResolveSiteLogListOpenApiVo {\n");
sb.append(" logs: ").append(toIndentedString(logs)).append("\n");
sb.append(" selectType: ").append(toIndentedString(selectType)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" filterModule: ").append(toIndentedString(filterModule)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -11,7 +11,7 @@ import java.util.Objects;
* Log Notification Webhook Config (This config applies to the Omada Pro Controller only)
*/
@ApiModel(description = "Log Notification Webhook Config (This config applies to the Omada Pro Controller only)")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class WebhookConfigEditOpenApiVo {
@JsonProperty("webhookEnable")

View File

@@ -10,7 +10,7 @@ import java.util.Objects;
* Log Notification Webhook Config (This config applies to the Omada Pro Controller only)
*/
@ApiModel(description = "Log Notification Webhook Config (This config applies to the Omada Pro Controller only)")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:45:56.254+08:00[Asia/Shanghai]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T17:52:43.984874600+08:00[Asia/Shanghai]")
public class WebhookConfigOpenApiVo {
@JsonProperty("webhookEnable")

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-api</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -2,7 +2,9 @@ package org.wfc.system.api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import org.wfc.common.core.constant.ServiceNameConstants;
@@ -26,4 +28,8 @@ public interface RemoteFileService
*/
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
@GetMapping("/download")
public R<byte[]> download(@RequestParam("filePath") String filePath);
}

View File

@@ -25,6 +25,11 @@ public class SysFile
*/
private String localUrl;
/**
* 文件路径
*/
private String filePath;
/**
* 文件gateway地址
*/
@@ -64,6 +69,14 @@ public class SysFile
this.gatewayUrl = gatewayUrl;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -71,6 +84,7 @@ public class SysFile
.append("url", getUrl())
.append("localUrl", getLocalUrl())
.append("gatewayUrl", getGatewayUrl())
.append("filePath", getFilePath())
.toString();
}
}

View File

@@ -1,12 +1,13 @@
package org.wfc.system.api.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.wfc.common.core.annotation.Excel;
import org.wfc.common.core.annotation.Excel.ColumnType;
import org.wfc.common.core.utils.MessageUtils;
import org.wfc.common.core.web.domain.BaseEntity;
import java.util.Date;
/**
* 操作日志记录表 oper_log
*
@@ -104,7 +105,7 @@ public class SysOperLog extends BaseEntity
if (title == null || title.isEmpty()) {
this.title=title;
}
this.title = MessageUtils.message(title);
this.title = MessageUtils.messageEnUS(title);
}
public Integer getBusinessType()

View File

@@ -67,6 +67,9 @@ public class SysUser extends BaseEntity
/** 地址 */
private String address;
/** 验证码 */
private String code;
/** 帐号状态0正常 1停用 */
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
private String status;
@@ -332,6 +335,15 @@ public class SysUser extends BaseEntity
{
this.roleId = roleId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@@ -30,6 +30,11 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
{
return R.fail("Failed to upload file:" + throwable.getMessage());
}
@Override
public R<byte[]> download(String filePath) {
return R.fail("Failed to download file:" + throwable.getMessage());
}
};
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-api</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -91,4 +91,7 @@ public interface RemoteUUserService
@GetMapping(value = "/order/{id}")
public R<UOrderVo> getOrderById(@PathVariable("id") Long id);
@PostMapping("/account/reminder")
public R<Boolean> sendReminderEMail();
}

View File

@@ -37,4 +37,6 @@ public class UOrderVo {
private Long updateBy;
private Date updateTime;
private String currency;
}

View File

@@ -82,6 +82,11 @@ public class RemoteUUserFallbackFactory implements FallbackFactory<RemoteUUserSe
public R<UOrderVo> getOrderById(Long id) {
return R.fail("get order error:" + throwable.getMessage());
}
@Override
public R<Boolean> sendReminderEMail() {
return R.fail("send reminder email error:" + throwable.getMessage());
}
};
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -56,11 +56,11 @@ public class SysLoginService {
throw new ServiceException("auth.password.not.in.specified.range");
}
// 用户名不在指定范围内 错误
if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|| username.length() > UserConstants.USERNAME_MAX_LENGTH) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "auth.username.not.in.specified.range");
throw new ServiceException("auth.username.not.in.specified.range");
}
// if (username.length() < UserConstants.USERNAME_MIN_LENGTH
// || username.length() > UserConstants.USERNAME_MAX_LENGTH) {
// recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "auth.username.not.in.specified.range");
// throw new ServiceException("auth.username.not.in.specified.range");
// }
// IP黑名单校验
String blackStr = Convert.toStr(redisService.getCacheObject(CacheConstants.SYS_LOGIN_BLACKIPLIST));
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr())) {

View File

@@ -56,11 +56,11 @@ public class ULoginService {
throw new ServiceException("auth.password.not.in.specified.range");
}
// 用户名不在指定范围内 错误
if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|| username.length() > UserConstants.USERNAME_MAX_LENGTH) {
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "auth.username.not.in.specified.range");
throw new ServiceException("auth.username.not.in.specified.range");
}
// if (username.length() < UserConstants.USERNAME_MIN_LENGTH
// || username.length() > UserConstants.USERNAME_MAX_LENGTH) {
// recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "auth.username.not.in.specified.range");
// throw new ServiceException("auth.username.not.in.specified.range");
// }
// IP黑名单校验
String blackStr = Convert.toStr(redisService.getCacheObject(CacheConstants.SYS_LOGIN_BLACKIPLIST));
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr())) {

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -20,6 +20,7 @@
<module>wfc-common-datasource</module>
<module>wfc-common-mail</module>
<module>wfc-common-mybatis</module>
<module>wfc-common-license</module>
</modules>
<artifactId>wfc-common</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -128,6 +128,11 @@
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -42,6 +42,26 @@ public class CacheConstants
*/
public static final String SYS_CONFIG_KEY = "sys_config:";
/**
* 支付参数管理 cache key
*/
public static final String SYS_PAY_CONFIG_KEY = "sys_pay_config";
/**
* 支付参数管理 currency cache key
*/
public static final String SYS_PAY_CURRENCY_KEY = "currency";
/**
* 支付参数管理 currency_symbol cache key
*/
public static final String SYS_PAY_CURRENCY_SYMBOL_KEY = "currency_symbol";
/**
* 支付参数管理 currency_symbol cache key
*/
public static final String SYS_PAY_PAYMENT_METHOD_KEY = "payment_methods";
/**
* 字典管理 cache key
*/

View File

@@ -0,0 +1,67 @@
package org.wfc.common.core.utils;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.Security;
import java.util.Base64;
public class AESUtil {
// AES密钥算法
private static final String KEY_ALGORITHM = "AES";
// 加密/解密算法/工作模式/填充方式
private static final String CIPHER_ALGORITHM = "AES/CBC/PKCS5Padding";
private static final String KEY = "EolSdjfd89v2PubN";
//CBC加密偏移量
private static final String IVCODE = "EjlnujOBvlv2PubN";
/**
* AES加密
*/
public static String encrypt(String data) {
try {
Security.addProvider(new BouncyCastleProvider());
SecretKeySpec secretKeySpec = new SecretKeySpec(KEY.getBytes(), KEY_ALGORITHM);
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM, "BC");
IvParameterSpec iv = new IvParameterSpec(IVCODE.getBytes());
cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, iv);
byte[] encryptedBytes = cipher.doFinal(data.getBytes());
return Base64.getEncoder().encodeToString(encryptedBytes);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* AES解密
*/
public static String decrypt(String encryptedData) {
try {
SecretKeySpec secretKeySpec = new SecretKeySpec(KEY.getBytes(), KEY_ALGORITHM);
IvParameterSpec iv = new IvParameterSpec(IVCODE.getBytes());
Security.addProvider(new BouncyCastleProvider());
byte[] encryptedBytes = javax.xml.bind.DatatypeConverter.parseBase64Binary(encryptedData);
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM, "BC");
cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, iv);
byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
return new String(decryptedBytes);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
// 验证
// public static void main(String[] args) throws Exception {
// String data = "AfPgwFAmo9K7KCqiiGpNRCyQMSxI6V33eH-nEMnVndJNVEYOEOEn5wSPkHUybfzcjDLnBejt-RKnIfqX";
// String encryptedData = encrypt(data); // 加密数据
// String decryptedData = decrypt(encryptedData); // 解密数据
// System.out.println("加密后的数据: " + encryptedData);
// System.out.println("解密后的数据: " + decryptedData);
// }
}

View File

@@ -6,6 +6,8 @@ import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.i18n.LocaleContextHolder;
import java.util.Locale;
/**
* 获取i18n资源文件
*
@@ -30,4 +32,13 @@ public class MessageUtils {
return code;
}
}
public static String messageEnUS(String code, Object... args) {
try {
Locale locale = new Locale("en", "US");
return MESSAGE_SOURCE.getMessage(code, args, locale);
} catch (NoSuchMessageException e) {
return code;
}
}
}

View File

@@ -1,13 +1,18 @@
package org.wfc.payment.utils;
package org.wfc.common.core.utils.file;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import org.apache.http.entity.ContentType;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* MultipartFile和File互转工具类
*/

View File

@@ -67,9 +67,18 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success()
{
return AjaxResult.success(MessageUtils.message("common.operate.success"));
return AjaxResult.success("Operation successful");
}
/**
* 返回成功消息
*
* @return 成功消息
*/
public static AjaxResult i18nsuccess() {
return AjaxResult.success("common.operate.success");
}
/**
* 返回成功数据
*
@@ -77,9 +86,18 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success(Object data)
{
return AjaxResult.success(MessageUtils.message("common.operate.success"), data);
return AjaxResult.success("Operation successful", data);
}
/**
* 返回成功数据
*
* @return 成功消息
*/
public static AjaxResult i18nsuccess(Object data) {
return AjaxResult.success("common.operate.success", data);
}
/**
* 返回成功消息
*
@@ -88,7 +106,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success(String msg)
{
return AjaxResult.success(MessageUtils.message(msg), null);
return AjaxResult.success(msg, null);
}
/**
@@ -100,7 +118,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult success(String msg, Object data)
{
return new AjaxResult(HttpStatus.SUCCESS, MessageUtils.message(msg), data);
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
}
/**
@@ -111,7 +129,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult warn(String msg)
{
return AjaxResult.warn(MessageUtils.message(msg), null);
return AjaxResult.warn(msg, null);
}
/**
@@ -123,7 +141,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult warn(String msg, Object data)
{
return new AjaxResult(HttpStatus.WARN, MessageUtils.message(msg), data);
return new AjaxResult(HttpStatus.WARN, msg, data);
}
/**
@@ -133,7 +151,16 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult error()
{
return AjaxResult.error(MessageUtils.message("common.operate.failed"));
return AjaxResult.error("Operation failed");
}
/**
* 返回错误消息
*
* @return 错误消息
*/
public static AjaxResult i18nerror() {
return AjaxResult.error("common.operate.failed");
}
/**
@@ -144,7 +171,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult error(String msg)
{
return AjaxResult.error(MessageUtils.message(msg), null);
return AjaxResult.error(msg, null);
}
/**
@@ -156,7 +183,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult error(String msg, Object data)
{
return new AjaxResult(HttpStatus.ERROR, MessageUtils.message(msg), data);
return new AjaxResult(HttpStatus.ERROR, msg, data);
}
/**
@@ -168,7 +195,7 @@ public class AjaxResult extends HashMap<String, Object>
*/
public static AjaxResult error(int code, String msg)
{
return new AjaxResult(code, MessageUtils.message(msg), null);
return new AjaxResult(code, msg, null);
}
/**

View File

@@ -179,6 +179,9 @@ common.request.parameter.type.not.match=Request parameter''{0}'' requires type:
common.demo.mode=Demo mode, no operation is allowed
common.system.error=Internal error, please contact the administrator
## wfc-payment
payment.pay.error=pay error
## system portal menu
menu.system.management=System Management
menu.system.config=System Config
@@ -227,6 +230,8 @@ menu.device.ap.management=AP Device
menu.device.client.management=Client
menu.device.wlan.management=WLAN
menu.device.portal.management=Portal
menu.device.alerts.management=Alerts
menu.device.access.management=Access Control
menu.home.dashboard=Dashboard
menu.home.monitor=Monitor
menu.system.tools=System Tools

View File

@@ -181,6 +181,9 @@ common.request.parameter.type.not.match=请求参数类型不匹配,参数''{0
common.demo.mode=演示模式,不允许操作
common.system.error=内部错误,请联系管理员
## wfc-payment
payment.pay.error=支付错误
## system portal menu
menu.system.management=系统管理
menu.system.config=系统配置
@@ -231,6 +234,8 @@ menu.device.ap.management=AP设备
menu.device.client.management=终端设备
menu.device.wlan.management=无线网络
menu.device.portal.management=门户
menu.device.alerts.management=警报
menu.device.access.management=白名单
menu.home.dashboard=仪表盘
menu.home.monitor=监控中心
menu.system.tools=系统工具

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -0,0 +1,27 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.19</version>
</parent>
<artifactId>wfc-common-license</artifactId>
<description>
wfc-common-license服务
</description>
<dependencies>
<dependency>
<groupId>org.wfc</groupId>
<artifactId>wfc-common-core</artifactId>
</dependency>
<!-- License -->
<dependency>
<groupId>de.schlichtherle.truelicense</groupId>
<artifactId>truelicense-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,63 @@
package org.wfc.common.license;
import de.schlichtherle.license.AbstractKeyStoreParam;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
/**
* 自定义KeyStoreParam用于将公私钥存储文件存放到其他磁盘位置而不是项目中
*/
public class CustomKeyStoreParam extends AbstractKeyStoreParam {
/**
* 公钥/私钥在磁盘上的存储路径
*/
private String storePath;
private String alias;
private String storePwd;
private String keyPwd;
public CustomKeyStoreParam(Class clazz, String resource, String alias, String storePwd, String keyPwd) {
super(clazz, resource);
this.storePath = resource;
this.alias = alias;
this.storePwd = storePwd;
this.keyPwd = keyPwd;
}
@Override
public String getAlias() {
return alias;
}
@Override
public String getStorePwd() {
return storePwd;
}
@Override
public String getKeyPwd() {
return keyPwd;
}
/**
* 复写de.schlichtherle.license.AbstractKeyStoreParam的getStream()方法<br/>
* 用于将公私钥存储文件存放到其他磁盘位置而不是项目中
*
* @param
* @return java.io.InputStream
*/
@Override
public InputStream getStream() throws IOException {
// final InputStream in = new FileInputStream(new File(storePath));
InputStream in = this.getClass().getClassLoader().getResourceAsStream(storePath);
if (null == in) {
throw new FileNotFoundException(storePath);
}
return in;
}
}

View File

@@ -0,0 +1,300 @@
package org.wfc.common.license;
import de.schlichtherle.license.LicenseContent;
import de.schlichtherle.license.LicenseContentException;
import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseNotary;
import de.schlichtherle.license.LicenseParam;
import de.schlichtherle.license.NoLicenseInstalledException;
import de.schlichtherle.xml.GenericCertificate;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.wfc.common.license.domain.LicenseCheckModel;
import org.wfc.common.license.domain.LicenseConstants;
import org.wfc.common.license.serverinfo.AbstractServerInfos;
import org.wfc.common.license.serverinfo.LinuxServerInfos;
import org.wfc.common.license.serverinfo.WindowsServerInfos;
import org.wfc.common.license.utils.LicenseUtils;
import java.beans.XMLDecoder;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.List;
/**
* 自定义LicenseManager用于增加额外的服务器硬件信息校验
*/
@Slf4j
public class CustomLicenseManager extends LicenseManager {
//XML编码
private static final String XML_CHARSET = "UTF-8";
//默认BUFSIZE
private static final int DEFAULT_BUFSIZE = 8 * 1024;
public CustomLicenseManager() {
}
public CustomLicenseManager(LicenseParam param) {
super(param);
}
/**
* 复写create方法
*
* @return byte[]
*/
@Override
protected synchronized byte[] create(
LicenseContent content,
LicenseNotary notary)
throws Exception {
initialize(content);
this.validateCreate(content);
final GenericCertificate certificate = notary.sign(content);
return getPrivacyGuard().cert2key(certificate);
}
/**
* 复写install方法其中validate方法调用本类中的validate方法校验IP地址、Mac地址等其他信息
*
* @param
* @return de.schlichtherle.license.LicenseContent
*/
@Override
protected synchronized LicenseContent install(
final byte[] key,
final LicenseNotary notary)
throws Exception {
final GenericCertificate certificate = getPrivacyGuard().key2cert(key);
notary.verify(certificate);
final LicenseContent content = (LicenseContent) this.load(certificate.getEncoded());
this.validate(content);
setLicenseKey(key);
setCertificate(certificate);
return content;
}
/**
* 复写verify方法调用本类中的validate方法校验IP地址、Mac地址等其他信息
*
* @param
* @return de.schlichtherle.license.LicenseContent
*/
@Override
protected synchronized LicenseContent verify(final LicenseNotary notary)
throws Exception {
GenericCertificate certificate = getCertificate();
// Load license key from preferences,
final byte[] key = getLicenseKey();
if (null == key) {
throw new NoLicenseInstalledException(getLicenseParam().getSubject());
}
certificate = getPrivacyGuard().key2cert(key);
notary.verify(certificate);
final LicenseContent content = (LicenseContent) this.load(certificate.getEncoded());
this.validate(content);
setCertificate(certificate);
return content;
}
/**
* 校验生成证书的参数信息
*
* @param content 证书正文
*/
protected synchronized void validateCreate(final LicenseContent content)
throws LicenseContentException {
final LicenseParam param = getLicenseParam();
final Date now = new Date();
final Date notBefore = content.getNotBefore();
final Date notAfter = content.getNotAfter();
if (null != notAfter && now.after(notAfter)) {
throw new LicenseContentException("证书失效时间不能早于当前时间");
}
if (null != notBefore && null != notAfter && notAfter.before(notBefore)) {
throw new LicenseContentException("证书生效时间不能晚于证书失效时间");
}
final String consumerType = content.getConsumerType();
if (null == consumerType) {
throw new LicenseContentException("用户类型不能为空");
}
}
/**
* 复写validate方法增加IP地址、Mac地址等其他信息校验
*
* @param content LicenseContent
*/
@Override
protected synchronized void validate(final LicenseContent content)
throws LicenseContentException {
//1. 首先调用父类的validate方法
super.validate(content);
//2. 然后校验自定义的License参数
//License中可被允许的参数信息
LicenseCheckModel expectedCheckModel = (LicenseCheckModel) content.getExtra();
if (expectedCheckModel != null) {
//当前服务器真实的参数信息
LicenseCheckModel serverCheckModel = getServerInfos();
if (serverCheckModel != null) {
//校验IP地址
if (!checkIpAddress(expectedCheckModel.getIpAddress(), serverCheckModel.getIpAddress())) {
throw new LicenseContentException("当前服务器的IP没在授权范围内");
}
//校验Mac地址
if (!checkIpAddress(expectedCheckModel.getMacAddress(), serverCheckModel.getMacAddress())) {
throw new LicenseContentException("当前服务器的Mac地址没在授权范围内");
}
//校验主板序列号
if (!checkSerial(expectedCheckModel.getMainBoardSerial(), serverCheckModel.getMainBoardSerial())) {
throw new LicenseContentException("当前服务器的主板序列号没在授权范围内");
}
//校验CPU序列号
if (!checkSerial(expectedCheckModel.getCpuSerial(), serverCheckModel.getCpuSerial())) {
throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内");
}
} else {
throw new LicenseContentException("不能获取服务器硬件信息");
}
}
// 校验服务器时间是否被篡改
if (!verityTimeFile()) {
throw new LicenseContentException("当前服务器的时间不正常");
}
}
private boolean verityTimeFile() {
try {
// 取出时间文件
BufferedReader reader = new BufferedReader(new FileReader(LicenseConstants.TIME_PATH + LicenseConstants.TIME_FILE_NAME));
String fileJson = reader.readLine();
reader.close();
String decryptedJson = LicenseUtils.decrypt(fileJson);
if (Long.parseLong(decryptedJson) < System.currentTimeMillis()) {
return true;
}
} catch (Exception e) {
log.error("verity license time error", e);
return false;
}
return false;
}
/**
* 重写XMLDecoder解析XML
*
* @param encoded XML类型字符串
* @return java.lang.Object
*/
private Object load(String encoded) {
BufferedInputStream inputStream = null;
XMLDecoder decoder = null;
try {
inputStream = new BufferedInputStream(new ByteArrayInputStream(encoded.getBytes(XML_CHARSET)));
decoder = new XMLDecoder(new BufferedInputStream(inputStream, DEFAULT_BUFSIZE), null, null);
return decoder.readObject();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} finally {
try {
if (decoder != null) {
decoder.close();
}
if (inputStream != null) {
inputStream.close();
}
} catch (Exception e) {
log.error("XMLDecoder解析XML失败", e);
}
}
return null;
}
/**
* 获取当前服务器需要额外校验的License参数
*
* @return demo.LicenseCheckModel
*/
private LicenseCheckModel getServerInfos() {
//操作系统类型
String osName = System.getProperty("os.name").toLowerCase();
AbstractServerInfos abstractServerInfos = null;
//根据不同操作系统类型选择不同的数据获取方法
if (osName.startsWith("windows")) {
abstractServerInfos = new WindowsServerInfos();
} else if (osName.startsWith("linux")) {
abstractServerInfos = new LinuxServerInfos();
} else {//其他服务器类型
abstractServerInfos = new LinuxServerInfos();
}
return abstractServerInfos.getServerInfos();
}
/**
* 校验当前服务器的IP/Mac地址是否在可被允许的IP范围内<br/>
* 如果存在IP在可被允许的IP/Mac地址范围内则返回true
*
* @return boolean
*/
private boolean checkIpAddress(List<String> expectedList, List<String> serverList) {
if (expectedList != null && expectedList.size() > 0) {
if (serverList != null && serverList.size() > 0) {
for (String expected : expectedList) {
if (serverList.contains(expected.trim())) {
return true;
}
}
}
return false;
} else {
return true;
}
}
/**
* 校验当前服务器硬件主板、CPU等序列号是否在可允许范围内
*
* @param
* @return boolean
*/
private boolean checkSerial(String expectedSerial, String serverSerial) {
if (StringUtils.isNotBlank(expectedSerial)) {
if (StringUtils.isNotBlank(serverSerial)) {
if (expectedSerial.equals(serverSerial)) {
return true;
}
}
return false;
} else {
return true;
}
}
}

View File

@@ -0,0 +1,25 @@
package org.wfc.common.license;
import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;
/**
* de.schlichtherle.license.LicenseManager的单例
*/
public class LicenseManagerHolder {
private static volatile LicenseManager LICENSE_MANAGER;
public static LicenseManager getInstance(LicenseParam param) {
if (LICENSE_MANAGER == null) {
synchronized (LicenseManagerHolder.class) {
if (LICENSE_MANAGER == null) {
LICENSE_MANAGER = new CustomLicenseManager(param);
}
}
}
return LICENSE_MANAGER;
}
}

View File

@@ -0,0 +1,88 @@
package org.wfc.common.license;
import de.schlichtherle.license.CipherParam;
import de.schlichtherle.license.DefaultCipherParam;
import de.schlichtherle.license.DefaultLicenseParam;
import de.schlichtherle.license.KeyStoreParam;
import de.schlichtherle.license.LicenseContent;
import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;
import lombok.extern.slf4j.Slf4j;
import org.wfc.common.license.domain.LicenseVerifyParam;
import java.io.File;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.prefs.Preferences;
/**
* License校验类
*/
@Slf4j
public class LicenseVerify {
/**
* 安装License证书
*/
public synchronized LicenseContent install(LicenseVerifyParam param) {
LicenseContent result = null;
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//1. 安装证书
try {
LicenseManager licenseManager = LicenseManagerHolder.getInstance(initLicenseParam(param));
licenseManager.uninstall();
result = licenseManager.install(new File(param.getLicensePath()));
log.info(MessageFormat.format("证书安装成功,证书有效期:{0} - {1}", format.format(result.getNotBefore()), format.format(result.getNotAfter())));
} catch (Exception e) {
log.error("证书安装失败!", e);
}
return result;
}
/**
* 校验License证书
*
* @return boolean
*/
public boolean verify() {
LicenseManager licenseManager = LicenseManagerHolder.getInstance(null);
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//2. 校验证书
try {
LicenseContent licenseContent = licenseManager.verify();
log.debug(MessageFormat.format("证书校验通过,证书有效期:{0} - {1}", format.format(licenseContent.getNotBefore()), format.format(licenseContent.getNotAfter())));
return true;
} catch (Exception e) {
log.error("证书校验失败!", e);
return false;
}
}
/**
* 初始化证书生成参数
*
* @param param License校验类需要的参数
* @return de.schlichtherle.license.LicenseParam
*/
private LicenseParam initLicenseParam(LicenseVerifyParam param) {
Preferences preferences = Preferences.userNodeForPackage(LicenseVerify.class);
CipherParam cipherParam = new DefaultCipherParam(param.getStorePass());
KeyStoreParam publicStoreParam = new CustomKeyStoreParam(LicenseVerify.class
, param.getPublicKeysStorePath()
, param.getPublicAlias()
, param.getStorePass()
, null);
return new DefaultLicenseParam(param.getSubject()
, preferences
, publicStoreParam
, cipherParam);
}
}

View File

@@ -0,0 +1,98 @@
package org.wfc.common.license.domain;
import java.io.Serializable;
import java.util.List;
/**
* 自定义需要校验的License参数
*/
public class LicenseCheckModel implements Serializable {
private static final long serialVersionUID = 8600137500316662317L;
/**
* 可被允许的IP地址
*/
private List<String> ipAddress;
/**
* 可被允许的MAC地址
*/
private List<String> macAddress;
/**
* 可被允许的CPU序列号
*/
private String cpuSerial;
/**
* 可被允许的主板序列号
*/
private String mainBoardSerial;
public List<String> getIpAddress() {
return ipAddress;
}
public void setIpAddress(List<String> ipAddress) {
this.ipAddress = ipAddress;
}
public List<String> getMacAddress() {
return macAddress;
}
public void setMacAddress(List<String> macAddress) {
this.macAddress = macAddress;
}
public String getCpuSerial() {
return cpuSerial;
}
public void setCpuSerial(String cpuSerial) {
this.cpuSerial = cpuSerial;
}
public String getMainBoardSerial() {
return mainBoardSerial;
}
public void setMainBoardSerial(String mainBoardSerial) {
this.mainBoardSerial = mainBoardSerial;
}
@Override
public String toString() {
return "LicenseCheckModel{" +
"ipAddress=" + ipAddress +
", macAddress=" + macAddress +
", cpuSerial='" + cpuSerial + '\'' +
", mainBoardSerial='" + mainBoardSerial + '\'' +
'}';
}
public String toJsonString() {
StringBuilder jsonBuilder = new StringBuilder();
jsonBuilder.append("{");
// jsonBuilder.append("\"ipAddress\": [");
// for (String ip : ipAddress) {
// jsonBuilder.append("\"").append(ip).append("\", ");
// }
// jsonBuilder.deleteCharAt(jsonBuilder.length() - 1);
// jsonBuilder.deleteCharAt(jsonBuilder.length() - 1);
// jsonBuilder.append("], ");
// jsonBuilder.append("\"macAddress\": [");
// for (String mac : macAddress) {
// jsonBuilder.append("\"").append(mac).append("\", ");
// }
// jsonBuilder.deleteCharAt(jsonBuilder.length() - 1);
// jsonBuilder.deleteCharAt(jsonBuilder.length() - 1);
// jsonBuilder.append("], ");
jsonBuilder.append("\"cpuSerial\": \"").append(cpuSerial).append("\", ");
jsonBuilder.append("\"mainBoardSerial\": \"").append(mainBoardSerial).append("\"");
// jsonBuilder.append("\"registerAmount\": \"").append(registerAmount).append("\"");
jsonBuilder.append("}");
return jsonBuilder.toString();
}
}

View File

@@ -0,0 +1,14 @@
package org.wfc.common.license.domain;
/**
* @author: cyc
* @since: 2025-04-27
*/
public class LicenseConstants {
public final static String TIME_PATH = "/var/lib/pro/etc/server/";
public final static String TIME_FILE_NAME = "production.json";
public static final String KEY = "wfcwanfiAdmin6666";
}

View File

@@ -0,0 +1,95 @@
package org.wfc.common.license.domain;
/**
* License校验类需要的参数
*/
public class LicenseVerifyParam {
/**
* 证书subject
*/
private String subject;
/**
* 公钥别称
*/
private String publicAlias;
/**
* 访问公钥库的密码
*/
private String storePass;
/**
* 证书生成路径
*/
private String licensePath;
/**
* 密钥库存储路径
*/
private String publicKeysStorePath;
public LicenseVerifyParam() {
}
public LicenseVerifyParam(String subject, String publicAlias, String storePass, String licensePath, String publicKeysStorePath) {
this.subject = subject;
this.publicAlias = publicAlias;
this.storePass = storePass;
this.licensePath = licensePath;
this.publicKeysStorePath = publicKeysStorePath;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getPublicAlias() {
return publicAlias;
}
public void setPublicAlias(String publicAlias) {
this.publicAlias = publicAlias;
}
public String getStorePass() {
return storePass;
}
public void setStorePass(String storePass) {
this.storePass = storePass;
}
public String getLicensePath() {
return licensePath;
}
public void setLicensePath(String licensePath) {
this.licensePath = licensePath;
}
public String getPublicKeysStorePath() {
return publicKeysStorePath;
}
public void setPublicKeysStorePath(String publicKeysStorePath) {
this.publicKeysStorePath = publicKeysStorePath;
}
@Override
public String toString() {
return "LicenseVerifyParam{" +
"subject='" + subject + '\'' +
", publicAlias='" + publicAlias + '\'' +
", storePass='" + storePass + '\'' +
", licensePath='" + licensePath + '\'' +
", publicKeysStorePath='" + publicKeysStorePath + '\'' +
'}';
}
}

View File

@@ -0,0 +1,261 @@
package org.wfc.common.license.runner;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import org.wfc.common.license.LicenseVerify;
import org.wfc.common.license.domain.LicenseCheckModel;
import org.wfc.common.license.domain.LicenseConstants;
import org.wfc.common.license.domain.LicenseVerifyParam;
import org.wfc.common.license.serverinfo.AbstractServerInfos;
import org.wfc.common.license.utils.LicenseUtils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@Slf4j
@Component
@Data
public class LicenseCheckRunner implements ApplicationRunner {
@Autowired
private LicenseProperties licenseProperties;
private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
private ScheduledFuture<?> scheduledFuture;
// 启动定时任务
public void startTimer() {
scheduledFuture = scheduler.scheduleAtFixedRate(this::timer, 0, 30, TimeUnit.SECONDS);
scheduler.scheduleAtFixedRate(this::fileTimer, 0, 60, TimeUnit.SECONDS);
}
// 停止定时任务
public void stopTimer() {
if (scheduledFuture != null) {
scheduledFuture.cancel(false);
}
}
/**
* 文件唯一身份标识 == 相当于人类的指纹一样
*/
private static String md5 = "";
private static boolean isLoad = true;
public static void LicenseVerifyInstall(LicenseProperties licenseVerifyProperties) {
new LicenseCheckRunner(licenseVerifyProperties);
}
public LicenseCheckRunner(LicenseProperties licenseProperties) {
// startTimer();
this.licenseProperties = licenseProperties;
if (StrUtil.isNotEmpty(licenseProperties.getLicensePath())) {
// install();
try {
String readMd5 = getMd5(licenseProperties.getLicensePath());
isLoad = true;
if (LicenseCheckRunner.md5 == null || "".equals(LicenseCheckRunner.md5)) {
LicenseCheckRunner.md5 = readMd5;
}
} catch (Exception e) {
}
}
}
/**
* 5秒检测一次不能太快也不能太慢
*/
protected void timer() {
if (!isLoad) {
return;
}
String readMd5 = null;
try {
readMd5 = getMd5(licenseProperties.getLicensePath());
} catch (Exception e) {
throw new RuntimeException(e);
}
// 不相等说明lic变化了
if (!readMd5.equals(LicenseCheckRunner.md5)) {
log.info("定时任务:检测到证书有变化");
install();
LicenseCheckRunner.md5 = readMd5;
}
}
/**
* 5秒检测一次不能太快也不能太慢
*/
protected void fileTimer() {
createAndVerifyTimeFile();
}
private void install() {
log.info("++++++++ 开始安装证书 ++++++++");
LicenseVerifyParam param = new LicenseVerifyParam();
param.setSubject(licenseProperties.getSubject());
param.setPublicAlias(licenseProperties.getPublicAlias());
param.setStorePass(licenseProperties.getStorePass());
// 相对路径resources资源目录
String resourcePath = getClass().getClassLoader().getResource("").getPath();
// 证书地址
// param.setLicensePath(resourcePath + "license.lic");
param.setLicensePath(licenseProperties.getLicensePath());
// 公钥地址
// param.setPublicKeysStorePath(resourcePath + "publicCerts.keystore");
param.setPublicKeysStorePath(licenseProperties.getPublicKeysStorePath());
// 安装证书
LicenseVerify licenseVerify = new LicenseVerify();
licenseVerify.install(param);
log.info("++++++++ 证书安装结束 ++++++++");
}
private void generate() {
try {
LicenseCheckModel serverInfos = AbstractServerInfos.getServer("").getServerInfos();
//对象序列化为json
String jsonString = serverInfos.toJsonString();
// System.out.println("原始数据 = " + jsonString);
//加密
String encryptedJson = LicenseUtils.encrypt(jsonString);
System.out.println("加密后 = " + encryptedJson);
// 解密
String decryptedJson = LicenseUtils.decrypt(encryptedJson);
// System.out.println("解密后 = " + decryptedJson);
// 比较解密后的字符串与原始字符串
if (jsonString.equals(decryptedJson)) {
} else {
log.info("解密后的字符串与原始字符串不同");
}
// 断言
assert jsonString.equals(decryptedJson) : "解密后的字符串与原始字符串不匹配";
// 反序列化为对象
ObjectMapper mapper = new ObjectMapper();
LicenseCheckModel licenseParam = null;
licenseParam = mapper.readValue(decryptedJson, LicenseCheckModel.class);
// 标记为null的字段需要特殊处理
// if ("null".equals(licenseParam.getRegisterAmount())) {
// licenseParam.setRegisterAmount(null);
// }
FileWriter writer = new FileWriter(licenseProperties.getCodePath());
writer.write(encryptedJson);
writer.close();
log.debug("licenseParam {}", licenseParam);
} catch (Exception e) {
log.error("生成激活码失败", e);
}
}
private void createAndVerifyTimeFile() {
boolean isCreate = false;
String decryptedJson = "";
try {
// 取出时间文件
BufferedReader reader = new BufferedReader(new FileReader(LicenseConstants.TIME_PATH + LicenseConstants.TIME_FILE_NAME));
String fileJson = reader.readLine();
reader.close();
decryptedJson = LicenseUtils.decrypt(fileJson);
} catch (Exception e) {
isCreate = true;
log.debug("first read time file error {}", e.getMessage());
}
if (StrUtil.isBlank(decryptedJson)) {
isCreate = true;
}
if (isCreate) {
// 不存在则创建
FileUtil.mkdir(LicenseConstants.TIME_PATH);
updateTimeFile();
} else {
// 存在则验证时间是否被篡改,不被篡改则更新当前时间
if (Long.parseLong(decryptedJson) < System.currentTimeMillis()) {
updateTimeFile();
}
}
}
private void updateTimeFile() {
try {
String currentTime = System.currentTimeMillis() + "";
String encryptedJson = LicenseUtils.encrypt(currentTime);
FileWriter writer = new FileWriter(LicenseConstants.TIME_PATH + LicenseConstants.TIME_FILE_NAME);
writer.write(encryptedJson);
writer.close();
} catch (Exception e) {
log.error("license create temp error", e);
}
}
/**
* <p>获取文件的md5</p>
*/
public String getMd5(String filePath) throws Exception {
File file;
String md5 = "";
try {
file = new File(filePath);
if (file.exists()) {
FileInputStream is = new FileInputStream(file);
byte[] data = new byte[is.available()];
is.read(data);
md5 = calculateMD5(data);
is.close();
}
} catch (FileNotFoundException e) {
log.error("找不到证书文件 {}", e.getMessage());
}
return md5;
}
public static String calculateMD5(byte[] data) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] hashBytes = md.digest(data);
StringBuilder hexString = new StringBuilder();
for (byte b : hashBytes) {
String hex = Integer.toHexString(0xff & b);
if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
}
return hexString.toString();
} catch (NoSuchAlgorithmException e) {
log.error("证书文件计算MD5失败 {}", e.getMessage());
return null;
}
}
@Override
public void run(ApplicationArguments args) throws Exception {
generate();
createAndVerifyTimeFile();
install();
startTimer();
}
}

View File

@@ -0,0 +1,44 @@
package org.wfc.common.license.runner;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @author: cyc
* @since: 2025-04-11
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "license")
public class LicenseProperties {
/**
* 证书subject
*/
private String subject = "license_wfc";
/**
* 公钥别称
*/
private String publicAlias = "publicCert";
/**
* 访问公钥库的密码
*/
private String storePass = "public_wfc_Admin123";
/**
* 证书生成路径
*/
private String licensePath = "/opt/wfc/license/license.lic";
/**
* 激活码生成路径
*/
private String codePath = "/opt/wfc/license/activation_code.txt";
/**
* 密钥库存储路径
*/
private String publicKeysStorePath = "publicCerts.keystore";
}

View File

@@ -0,0 +1,144 @@
package org.wfc.common.license.serverinfo;
import lombok.extern.slf4j.Slf4j;
import org.wfc.common.license.domain.LicenseCheckModel;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
/**
* 用于获取客户服务器的基本信息IP、Mac地址、CPU序列号、主板序列号等
*/
@Slf4j
public abstract class AbstractServerInfos {
/**
* 组装需要额外校验的License参数
*
* @return demo.LicenseCheckModel
* @since 1.0.0
*/
public LicenseCheckModel getServerInfos() {
LicenseCheckModel result = new LicenseCheckModel();
try {
// result.setIpAddress(this.getIpAddress());
// result.setMacAddress(this.getMacAddress());
result.setCpuSerial(this.getCPUSerial());
result.setMainBoardSerial(this.getMainBoardSerial());
} catch (Exception e) {
log.error("获取服务器硬件信息失败", e);
}
return result;
}
/**
* 获取IP地址
*
* @return java.util.List<java.lang.String>
*/
protected abstract List<String> getIpAddress() throws Exception;
/**
* 获取Mac地址
*
* @return java.util.List<java.lang.String>
*/
protected abstract List<String> getMacAddress() throws Exception;
/**
* 获取CPU序列号
*
* @return java.lang.String
*/
protected abstract String getCPUSerial() throws Exception;
/**
* 获取主板序列号
*
* @return java.lang.String
*/
protected abstract String getMainBoardSerial() throws Exception;
/**
* 获取当前服务器所有符合条件的InetAddress
*
* @return java.util.List<java.net.InetAddress>
*/
protected List<InetAddress> getLocalAllInetAddress() throws Exception {
List<InetAddress> result = new ArrayList<>(4);
// 遍历所有的网络接口
for (Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); networkInterfaces.hasMoreElements(); ) {
NetworkInterface iface = (NetworkInterface) networkInterfaces.nextElement();
// 在所有的接口下再遍历IP
for (Enumeration inetAddresses = iface.getInetAddresses(); inetAddresses.hasMoreElements(); ) {
InetAddress inetAddr = (InetAddress) inetAddresses.nextElement();
//排除LoopbackAddress、SiteLocalAddress、LinkLocalAddress、MulticastAddress类型的IP地址
if (!inetAddr.isLoopbackAddress() /*&& !inetAddr.isSiteLocalAddress()*/
&& !inetAddr.isLinkLocalAddress() && !inetAddr.isMulticastAddress()) {
result.add(inetAddr);
}
}
}
return result;
}
/**
* 获取某个网络接口的Mac地址
*
* @param
* @return void
*/
protected String getMacByInetAddress(InetAddress inetAddr) {
try {
byte[] mac = NetworkInterface.getByInetAddress(inetAddr).getHardwareAddress();
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < mac.length; i++) {
if (i != 0) {
stringBuffer.append("-");
}
//将十六进制byte转化为字符串
String temp = Integer.toHexString(mac[i] & 0xff);
if (temp.length() == 1) {
stringBuffer.append("0" + temp);
} else {
stringBuffer.append(temp);
}
}
return stringBuffer.toString().toUpperCase();
} catch (SocketException e) {
e.printStackTrace();
log.error("获取某个网络接口的Mac地址异常", e.getMessage());
}
return null;
}
/**
* <p>获取服务器信息</p>
*
* @param osName 系统类型
* @return AGxServerInfos 服务信息
*/
public static AbstractServerInfos getServer(String osName) {
if ("".equals(osName) || osName == null) {
osName = System.getProperty("os.name").toLowerCase();
}
AbstractServerInfos abstractServerInfos;
// 根据不同操作系统类型选择不同的数据获取方法
if (osName.startsWith("windows")) {
abstractServerInfos = new WindowsServerInfos();
} else if (osName.startsWith("linux")) {
abstractServerInfos = new LinuxServerInfos();
} else {// 其他服务器类型
abstractServerInfos = new LinuxServerInfos();
}
return abstractServerInfos;
}
}

View File

@@ -0,0 +1,86 @@
package org.wfc.common.license.serverinfo;
import org.apache.commons.lang3.StringUtils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.util.List;
import java.util.stream.Collectors;
/**
* 用于获取客户Linux服务器的基本信息
*/
public class LinuxServerInfos extends AbstractServerInfos {
@Override
protected List<String> getIpAddress() throws Exception {
List<String> result = null;
//获取所有网络接口
List<InetAddress> inetAddresses = getLocalAllInetAddress();
if (inetAddresses != null && inetAddresses.size() > 0) {
result = inetAddresses.stream().map(InetAddress::getHostAddress).distinct().map(String::toLowerCase).collect(Collectors.toList());
}
return result;
}
@Override
protected List<String> getMacAddress() throws Exception {
List<String> result = null;
//1. 获取所有网络接口
List<InetAddress> inetAddresses = getLocalAllInetAddress();
if (inetAddresses != null && inetAddresses.size() > 0) {
//2. 获取所有网络接口的Mac地址
result = inetAddresses.stream().map(this::getMacByInetAddress).distinct().collect(Collectors.toList());
}
return result;
}
@Override
protected String getCPUSerial() throws Exception {
//序列号
String serialNumber = "";
//使用dmidecode命令获取CPU序列号
String[] shell = {"/bin/bash", "-c", "dmidecode -t processor | grep 'ID' | awk -F ':' '{print $2}' | head -n 1"};
Process process = Runtime.getRuntime().exec(shell);
process.getOutputStream().close();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = reader.readLine().trim();
if (StringUtils.isNotBlank(line)) {
serialNumber = line;
}
reader.close();
return serialNumber;
}
@Override
protected String getMainBoardSerial() throws Exception {
//序列号
String serialNumber = "";
//使用dmidecode命令获取主板序列号
String[] shell = {"/bin/bash", "-c", "dmidecode | grep 'Serial Number' | awk -F ':' '{print $2}' | head -n 1"};
Process process = Runtime.getRuntime().exec(shell);
process.getOutputStream().close();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = reader.readLine().trim();
if (StringUtils.isNotBlank(line)) {
serialNumber = line;
}
reader.close();
return serialNumber;
}
}

View File

@@ -0,0 +1,144 @@
package org.wfc.common.license.serverinfo;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
/**
* 用于获取客户Windows服务器的基本信息
*/
public class WindowsServerInfos extends AbstractServerInfos {
@Override
protected List<String> getIpAddress() throws Exception {
List<String> result = null;
//获取所有网络接口
List<InetAddress> inetAddresses = getLocalAllInetAddress();
if (inetAddresses != null && inetAddresses.size() > 0) {
result = inetAddresses.stream().map(InetAddress::getHostAddress).distinct().map(String::toLowerCase).collect(Collectors.toList());
}
return result;
}
@Override
protected List<String> getMacAddress() throws Exception {
List<String> result = null;
//1. 获取所有网络接口
List<InetAddress> inetAddresses = getLocalAllInetAddress();
if (inetAddresses != null && inetAddresses.size() > 0) {
//2. 获取所有网络接口的Mac地址
result = inetAddresses.stream().map(this::getMacByInetAddress).distinct().collect(Collectors.toList());
}
return result;
}
private String getCPUSerial2() throws Exception {
//序列号
String serialNumber = "";
//使用WMIC获取CPU序列号
Process process = Runtime.getRuntime().exec("wmic cpu get processorid");
process.getOutputStream().close();
Scanner scanner = new Scanner(process.getInputStream());
if (scanner != null && scanner.hasNext()) {
scanner.next();
}
if (scanner.hasNext()) {
serialNumber = scanner.next().trim();
}
scanner.close();
return serialNumber;
}
@Override
protected String getCPUSerial() throws Exception {
String result = "";
try {
File file = File.createTempFile("tmp", ".vbs");
file.deleteOnExit();
FileWriter fw = new FileWriter(file);
String vbs = "Set objWMIService = GetObject(\"winmgmts:\\\\.\\root\\cimv2\")\n"
+ "Set colItems = objWMIService.ExecQuery _ \n" + " (\"Select * from Win32_Processor\") \n"
+ "For Each objItem in colItems \n" + " Wscript.Echo objItem.ProcessorId \n"
+ " exit for ' do the first cpu only! \n" + "Next \n";
fw.write(vbs);
fw.close();
Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while ((line = input.readLine()) != null) {
result += line;
}
input.close();
file.delete();
} catch (Exception e) {
return getCPUSerial2();
}
return result.trim();
}
private String getMainBoardSerial2() throws Exception {
//序列号
String serialNumber = "";
//使用WMIC获取主板序列号
Process process = Runtime.getRuntime().exec("wmic baseboard get serialnumber");
process.getOutputStream().close();
Scanner scanner = new Scanner(process.getInputStream());
if (scanner != null && scanner.hasNext()) {
scanner.next();
}
if (scanner.hasNext()) {
serialNumber = scanner.next().trim();
}
scanner.close();
return serialNumber;
}
@Override
protected String getMainBoardSerial() throws Exception {
String result = "";
try {
File file = File.createTempFile("realhowto", ".vbs");
file.deleteOnExit();
FileWriter fw = new FileWriter(file);
String vbs = "Set objWMIService = GetObject(\"winmgmts:\\\\.\\root\\cimv2\")\n"
+ "Set colItems = objWMIService.ExecQuery _ \n" + " (\"Select * from Win32_BaseBoard\") \n"
+ "For Each objItem in colItems \n" + " Wscript.Echo objItem.SerialNumber \n"
+ " exit for ' do the first cpu only! \n" + "Next \n";
fw.write(vbs);
fw.close();
Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while ((line = input.readLine()) != null) {
result += line;
}
input.close();
} catch (Exception e) {
return getMainBoardSerial2();
}
return result.trim();
}
}

View File

@@ -0,0 +1,42 @@
package org.wfc.common.license.utils;
import org.wfc.common.license.domain.LicenseConstants;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest;
import java.util.Base64;
/**
* @author: cyc
* @since: 2025-04-27
*/
public class LicenseUtils {
public static String encrypt(String json) throws Exception {
byte[] keyBytes = LicenseConstants.KEY.getBytes();
MessageDigest sha = MessageDigest.getInstance("SHA-256");
keyBytes = sha.digest(keyBytes);
keyBytes = java.util.Arrays.copyOf(keyBytes, 16);
SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
byte[] encryptedBytes = cipher.doFinal(json.getBytes());
return Base64.getEncoder().encodeToString(encryptedBytes);
}
public static String decrypt(String encryptedJson) throws Exception {
byte[] keyBytes = LicenseConstants.KEY.getBytes();
MessageDigest sha = MessageDigest.getInstance("SHA-256");
keyBytes = sha.digest(keyBytes);
keyBytes = java.util.Arrays.copyOf(keyBytes, 16);
SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
cipher.init(Cipher.DECRYPT_MODE, secretKey);
byte[] encryptedBytes = Base64.getDecoder().decode(encryptedJson);
byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
return new String(decryptedBytes);
}
}

View File

@@ -0,0 +1,2 @@
org.wfc.common.license.runner.LicenseProperties
org.wfc.common.license.runner.LicenseCheckRunner

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<artifactId>wfc-common-mail</artifactId>

View File

@@ -66,4 +66,9 @@ public class MailProperties {
* Socket连接超时值单位毫秒缺省值不超时
*/
private Long connectionTimeout;
/**
* 邮件标题
*/
private String subject;
}

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<artifactId>wfc-common-mybatis</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -112,7 +112,7 @@ public class GlobalExceptionHandler
{
String requestURI = request.getRequestURI();
log.error("Requesting address '{}', an unknown exception occurred.", requestURI, e);
return AjaxResult.error(MessageUtils.message("common.system.error"));
return AjaxResult.error(e.getMessage());
}
/**

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-common</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -88,6 +88,12 @@
<version>${springdoc.version}</version>
</dependency>
<!-- License -->
<dependency>
<groupId>org.wfc</groupId>
<artifactId>wfc-common-license</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -18,18 +18,18 @@ import org.wfc.common.core.utils.JwtUtils;
import org.wfc.common.core.utils.MessageUtils;
import org.wfc.common.core.utils.ServletUtils;
import org.wfc.common.core.utils.StringUtils;
import org.wfc.common.license.LicenseVerify;
import org.wfc.common.redis.service.RedisService;
import org.wfc.gateway.config.properties.IgnoreWhiteProperties;
import reactor.core.publisher.Mono;
/**
* 网关鉴权
*
*
* @author wfc
*/
@Component
public class AuthFilter implements GlobalFilter, Ordered
{
public class AuthFilter implements GlobalFilter, Ordered {
private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
// 排除过滤的 uri 地址nacos自行添加
@@ -40,42 +40,44 @@ public class AuthFilter implements GlobalFilter, Ordered
private RedisService redisService;
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain)
{
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
ServerHttpRequest request = exchange.getRequest();
ServerHttpRequest.Builder mutate = request.mutate();
LicenseVerify licenseVerify = new LicenseVerify();
// 校验license证书是否有效
boolean verifyResult = licenseVerify.verify();
if (!verifyResult) {
log.error("验证失败,证书无效");
return unauthorizedResponse(exchange, MessageUtils.message("Your License is invalid"));
}
String url = request.getURI().getPath();
// 跳过不需要验证的路径
if (StringUtils.matches(url, ignoreWhite.getWhites()))
{
if (StringUtils.matches(url, ignoreWhite.getWhites())) {
return chain.filter(exchange);
}
String token = getToken(request);
if (StringUtils.isEmpty(token))
{
if (StringUtils.isEmpty(token)) {
return unauthorizedResponse(exchange, MessageUtils.message("gateway.token.not.blank"));
}
Claims claims = JwtUtils.parseToken(token);
if (claims == null)
{
if (claims == null) {
return unauthorizedResponse(exchange, MessageUtils.message("gateway.token.expired"));
}
String userkey = JwtUtils.getUserKey(claims);
boolean islogin = redisService.hasKey(getTokenKey(userkey));
if (!islogin)
{
if (!islogin) {
return unauthorizedResponse(exchange, MessageUtils.message("gateway.status.expired"));
}
String userid = JwtUtils.getUserId(claims);
String username = JwtUtils.getUserName(claims);
if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username))
{
if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username)) {
return unauthorizedResponse(exchange, MessageUtils.message("gateway.token.error"));
}
String platform = JwtUtils.getUserPlatform(claims);
if ("user".equals(platform) && StringUtils.startsWith(url,"/system"))
{
if ("user".equals(platform) && StringUtils.startsWith(url, "/system")) {
return unauthorizedResponse(exchange, MessageUtils.message("gateway.user.portal.forbidden"));
}
// 设置用户信息到请求
@@ -88,10 +90,8 @@ public class AuthFilter implements GlobalFilter, Ordered
return chain.filter(exchange.mutate().request(mutate.build()).build());
}
private void addHeader(ServerHttpRequest.Builder mutate, String name, Object value)
{
if (value == null)
{
private void addHeader(ServerHttpRequest.Builder mutate, String name, Object value) {
if (value == null) {
return;
}
String valueStr = value.toString();
@@ -99,13 +99,11 @@ public class AuthFilter implements GlobalFilter, Ordered
mutate.header(name, valueEncode);
}
private void removeHeader(ServerHttpRequest.Builder mutate, String name)
{
private void removeHeader(ServerHttpRequest.Builder mutate, String name) {
mutate.headers(httpHeaders -> httpHeaders.remove(name)).build();
}
private Mono<Void> unauthorizedResponse(ServerWebExchange exchange, String msg)
{
private Mono<Void> unauthorizedResponse(ServerWebExchange exchange, String msg) {
log.error("[Authentication exception handling]Request path:{}, error message:{}", exchange.getRequest().getPath(), msg);
return ServletUtils.webFluxResponseWriter(exchange.getResponse(), msg, HttpStatus.UNAUTHORIZED);
}
@@ -113,28 +111,24 @@ public class AuthFilter implements GlobalFilter, Ordered
/**
* 获取缓存key
*/
private String getTokenKey(String token)
{
private String getTokenKey(String token) {
return CacheConstants.LOGIN_TOKEN_KEY + token;
}
/**
* 获取请求token
*/
private String getToken(ServerHttpRequest request)
{
private String getToken(ServerHttpRequest request) {
String token = request.getHeaders().getFirst(SecurityConstants.AUTHORIZATION_HEADER);
// 如果前端设置了令牌前缀,则裁剪掉前缀
if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX))
{
if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX)) {
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
}
return token;
}
@Override
public int getOrder()
{
public int getOrder() {
return -200;
}
}

Binary file not shown.

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.wfc</groupId>
<artifactId>wfc-modules</artifactId>
<version>1.0.13</version>
<version>1.0.19</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Some files were not shown because too many files have changed in this diff Show More