sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
+22 -6
View File
@@ -90,27 +90,43 @@ dump.rdb
*.exe *.exe
*.exe~ *.exe~
*.yaml *.yaml
!server/config/config.example.yaml
!server/config/config_default.yaml
!server/build/config.example.yaml
!server/hack/config.yaml
test/* test/*
*test.* *test.*
!server/internal/model/t_sim_card_allocate_input_test.go
!server/internal/logic/common/batch_card_status_test.go
!server/internal/logic/system/sys_menu_document_center_test.go !server/internal/logic/system/sys_menu_document_center_test.go
!server/internal/logic/trafficusage/history_sync_test.go !server/internal/logic/trafficusage/history_sync_test.go
!server/internal/library/tdengine/config_test.go
!server/internal/logic/trafficusage/routing_test.go
!server/internal/logic/iot/t_sim_card_info_test.go !server/internal/logic/iot/t_sim_card_info_test.go
!server/internal/logic/iot/t_sim_card_renew_price_test.go !server/internal/logic/iot/t_sim_card_renew_price_test.go
!server/internal/logic/trafficcutoff/types_test.go !server/internal/logic/trafficcutoff/types_test.go
!server/utility/ip_lookup_test.go !server/utility/ip_lookup_test.go
!server/utility/external_request_test.go !server/utility/external_request_test.go
!server/internal/model/sync_scope_test.go !server/internal/model/sync_scope_test.go
!server/internal/logic/simwarning/monthly_expiry_test.go
!server/internal/tasks/monthly_expiry_test.go
!server/internal/router/message_log_unread_test.go
!server/internal/controller/iot/full_sync_monitor_channels_test.go !server/internal/controller/iot/full_sync_monitor_channels_test.go
!server/internal/logic/system/sys_qrcode_timeout_test.go !server/internal/logic/system/sys_qrcode_timeout_test.go
!server/internal/logic/system/sys_dept_test.go
!server/internal/logic/system/sys_role_template_test.go
!server/internal/logic/agent/agent_template_source_test.go
!server/internal/library/rolepolicy/assignable_test.go
!server/internal/logic/common/batch_main_channel_test.go
!server/internal/logic/common/work_order_record_test.go
server/.local-run/
!server/internal/logic/memorydb/memorydb_test.go !server/internal/logic/memorydb/memorydb_test.go
!server/internal/library/exportcenter/columns_test.go
server/*.tar server/*.tar
*.tar *.tar
vue vue
# 运行时导出产物(异步导出中心生成的 xlsx,属运行产物,勿入库)
server/resource/upload/*/user/file/*/export/
!server/internal/logic/agent/agent_dept_passrole_test.go !server/internal/logic/agent/agent_dept_passrole_test.go
!server/internal/logic/agent/agent_role_save_test.go !server/internal/logic/agent/agent_role_save_test.go
# 开源版:配置文件以占位值入库(不含真实凭据),保证 clone 后可直接 go test
!server/config/config.yaml
!server/config/config_default.yaml
!server/build/build_config.yaml
!server/hack/config.yaml
+1 -1
View File
@@ -37,7 +37,7 @@ http://127.0.0.1:8199/swagger # SwaggerUI
## 配置 ## 配置
配置文件在 `server/config/config.yaml`(运行时)与 `server/config/config_default.yaml`(默认值)。**公开版里的凭据与地址全部是占位符**: 将 `server/config/config.example.yaml` 复制为运行时的 `server/config/config.yaml`;`server/config/config_default.yaml` 保存默认值。**公开版里的凭据与地址使用环境变量占位符**:
| 配置项 | 占位 | 说明 | | 配置项 | 占位 | 说明 |
| --- | --- | --- | | --- | --- | --- |
+31 -8
View File
@@ -1,15 +1,38 @@
# 代理角色模板 # 代理角色模板与机构权限上限
使用现有 sys_config、sys_role、sys_role_menu、sys_dept、sys_user_role 表,不新增字段、索引或任务表。 ## 业务规则
平台参数:tenant_id=000000,config_key=agent.role.template.role_id,config_value 为本平台企业的模板角色 ID。开发环境使用 82。模板在企业管理的角色管理维护,正常启用、is_pass=1、数据范围为本机构及下级(4),按钮不允许全部或自定义数据范围。每个企业只能有一个下发模板。 使用现有 sys_config、sys_role、sys_role_menu、sys_dept、sys_user_role 表,不新增表、字段或前端“角色用途”。
模板修改提交后直接同步直属企业,按 sys_dept.parent_id 定位直属客户、dept_role 定位该企业实际默认角色。通过 created_dept 和上下级关系识别下发角色,不依赖 source_role_id 或 source_dept_id。平台模板切换限定同一企业,旧任务读取当前配置。下级企业维护自己的客户模板,不直接继承平台对孙级的新增授权。 平台在默认租户的系统参数 agent.role.template.role_id 中指定模板角色 ID。模板身份由参数决定,不再依赖隐藏的 is_pass=1。角色必须启用、属于有效机构、不是上级继承角色,角色数据范围为本机构及下级(4),按钮不能配置全部或自定义数据范围。
同步保留角色 ID 和账号绑定,每家企业独立事务。单家失败不阻塞其他企业,接口报告同步失败,日志记录失败企业。保存成功和同步成功分开处理;失败时模板可能已保存,修复角色关联后重新保存可幂等重试。不会凭空修复账号绑定。 ## 创建代理与维护普通角色
接口鉴权读取当前权限并与上级企业和平台模板取交集,不依赖长期用户权限缓存。没有有效角色或模板参数无效时拒绝授权。业务角色授权记录不会主动删除,模板恢复权限后仍保留授权的角色可能重新获得权限。前端按钮更新需刷新,后端执行当前鉴权。 - 平台创建一级代理时,从参数模板复制权限,为新机构创建独立默认角色和管理员绑定,不共用平台角色 ID。
- 各级代理创建下级时,从本机构有效默认角色复制权限,与上级链和平台模板取交集,不要求本机构再创建一个下发模板。
- 各级机构可新增多个普通角色。保存不再强制 is_pass=1,也不强制覆盖普通角色数据范围。
- 普通角色授权必须同时在本机构有效权限上限和当前操作账号有效角色的菜单范围内。停用角色不能提供授权依据。
- 参数模板、机构默认继承角色、普通角色分别承担平台权限来源、机构权限上限、人员实际授权,不混用。
- 未配置平台参数时,保留原有本级唯一 is_pass=1 角色的下发流程;配置平台参数后,历史本地下发标记不再触发权限覆盖。
采用提交后直接同步,不保证模板保存和全体客户同步原子完成。进程在提交后、同步完成前退出时,需要重新保存触发补偿;没有数据库持久化任务,不承诺自动恢复丢失任务。原有角色同步队列保留兼容重试和旧消息处理,不新增队列配置或定时任务。 ## 多级异步同步
正式上线前验证三级企业、参数切换、权限收回、旧登录账号、单家无效角色、重复同步和真实并发请求。同步随直属企业数量增加会延长请求耗时,需结合实际规模验证 API 超时与数据库负载。 后端保存成功提交后,通过 RabbitMQ 发布任务,由独立 Worker 执行。平台模板变更按父先子后的顺序遍历各级企业,仅更新 sys_dept.dept_role 指定、归属本机构且来源为直属上级的有效继承角色。角色 ID、人员绑定和下级自建角色勾选保持不变。
新增权限扩展各级继承默认角色的权限范围;普通角色需下级自己勾选。绑定默认继承角色的管理员随默认角色取得新增权限,需要与普通角色区分。
撤销权限时,运行时逐级交集立即限制有效权限,不等待 Worker;Worker 随后更新继承角色记录。普通角色的历史勾选不主动删除,平台未来重新开放权限后,仍保留勾选的普通角色可能恢复该权限。这是现有授权记录保留语义,不表示“新权限自动勾选”。
每机构独立事务。父机构失败时,该分支下级计入失败而不越过父级放权;其他分支继续。重试只处理失败机构及被阻断的下级,失去当前模板从属关系的重试目标明确失败。旧模板任务和历史本地下发任务不能覆盖当前参数模板的继承链。
## 安全边界及历史数据
平台有效超级管理员的登录权限加载不依赖代理模板是否有效,普通账号仍严格校验模板与机构权限。不能只凭旧令牌中的管理员标记绕过检查。
默认角色缺失、停用、归属错误明确返回可处理错误,不再静默变成空菜单 404。角色列表查询不会自动建角色、绑定当前访问者或为历史账号扩权。历史 dept_role=0 数据需要平台管理员核实后修复,代码不会猜测哪个角色应是管理员。
## 可靠性限制
本分支不使用数据库任务表。保存与 MQ 发布不是原子操作;入队失败会明确提示“角色已保存”,需修复消息队列后重新保存补偿。进程若在数据库提交后、发布前退出,也需重新保存。消费者有限重试后进入死信队列,不承诺永不丢任务或 exactly-once。
后台与 Worker 必须成套更新。仅重启后台不会加载新的 Worker 多级同步逻辑。
+12
View File
@@ -0,0 +1,12 @@
# 普通角色维护与代理模板校验边界
- 平台模板由系统参数 agent.role.template.role_id 指定,与普通角色的隐藏 is_pass 标记分离。
- 普通角色可以创建多个,保存不再强制变成下发角色。配置模板后,历史下发标记不限制普通角色数量、不触发继承链覆盖。
- 普通角色的编辑、菜单、删除和数据权限维护只识别目标是否为配置模板;无关模板失效不应锁死平台超级管理员。
- 模板停用、归属异常或记录缺失时仍保留身份及删除保护;仅平台超级管理员可修改模板,模板按钮不能授予全部或自定义数据范围。
- 非超级管理员授予菜单时,同时核对机构及平台上限与操作员当前有效角色;禁止用已停用角色、旧管理员声明扩大授权。
- 有效平台超级管理员的登录权限加载先核对数据库角色,跳过无关模板有效性校验;普通账号继续严格校验。
- 缺失默认角色返回明确错误,不隐式创建角色或把访问角色列表的用户绑定成管理员。历史数据修复需核实后显式操作。
- 多级同步仅更新默认继承角色,普通角色不自动勾选;完整流程与可靠性限制见 agent-role-template.md 和角色权限异步同步.md。
验证使用 SQLite 隔离数据库,密码修改测试固定使用独立内存库和合成用户,不使用实际配置的数据库。未执行真实账号登录及真实消息队列端到端验证时,不以接口公开健康检查代替登录或同步成功。
+30
View File
@@ -0,0 +1,30 @@
# 角色权限异步同步
当前 v1.0.4 实现采用现有 RabbitMQ 队列 iotlcm.agent.role.sync,不新增任务表或权限版本表。业务规则以《代理角色模板与机构权限上限》为准。
## 保存与消费
1. 后台在数据库事务中保存角色及菜单,事务内禁止发布消息。
2. 提交后识别系统参数指定模板;模板不要求 is_pass=1。配置模板时,非模板角色不发布覆盖下级权限的任务。
3. 消息含任务标识、来源角色、来源机构、租户、操作者及模板标记,不携带菜单旧快照。
4. 后台使用发布确认;发布失败返回明确的“角色已保存、下发失败”错误,重新保存可补偿。
提交后的入队使用保留身份上下文但不继承请求取消的独立超时,最长十五秒,发布确认仍最多等待十秒;错误附带任务 ID,便于排查。此处理不等同于事务发件箱,进程退出仍可能造成提交与发布之间的消息丢失。
5. 独立 Worker 消费时读取当前模板、菜单和机构关系。配置已切换的模板任务,以及配置模板后的历史本地下发任务标记为 superseded,不按普通角色继续传播。
6. 平台模板按父先子后同步整棵企业下级树;每家企业独立事务,锁定目标机构、默认角色、模板参数及模板角色并再次校验。
7. 只更新有效的默认继承角色;不改用户角色绑定,不替下级普通角色增加勾选,不自动补齐缺失默认角色。
## 失败与重试
单家失败不阻塞其他分支;失败父机构的下级也计入失败,不能绕过父级。消息保存失败机构 ID 和统计,重试只处理失败目标。目标离开模板机构树后不能被静默算作成功。
消费者失败后延迟重试,最多重试五次,之后发布死信。重试或死信发布失败不能确认原消息。无效 JSON 和无效来源消息隔离到死信队列,隔离发布失败则原消息不能确认。
幂等同步保留角色 ID,重复消息读取当前配置,不恢复旧快照。但没有数据库任务表、事务发件箱或分布式租约,不能保证提交与发布原子性,也不保证任务持久化查询及人工重试页面。需要通过日志、消息队列与重新保存进行排查补偿。
## 本地验证
后台回归使用 SQLite 隔离数据库,覆盖模板异常与管理员登录、普通角色保存、操作员授权边界、默认角色异常、各级代理创建权限来源及提交后入队。
Worker 回归覆盖多层新增、撤权、模板切换、普通角色和账号绑定保留、失败父子分支重试、跨租户隔离、机构循环及重试目标迁出。
不应直接运行连接实际数据库的写入测试。密码修改回归已改为独立 SQLite 内存数据库及合成用户,不使用全局默认数据库、不读写真实账号,也不再提供环境变量开启真实库写入的入口。此前被修改账号的密码仍须管理员主动重置,测试隔离不能恢复原密码。
+4
View File
@@ -0,0 +1,4 @@
# GoFrame Template For SingleRepo
Quick Start:
- https://goframe.org/quick
+2
View File
@@ -11,6 +11,8 @@ import (
) )
type IAgentV1 interface { type IAgentV1 interface {
UserExport(ctx context.Context, req *v1.UserExportReq) (res *v1.UserExportRes, err error)
DeptExport(ctx context.Context, req *v1.DeptExportReq) (res *v1.DeptExportRes, err error)
DeptList(ctx context.Context, req *v1.DeptListReq) (res *v1.DeptListRes, err error) DeptList(ctx context.Context, req *v1.DeptListReq) (res *v1.DeptListRes, err error)
DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, err error) DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, err error)
DeptSave(ctx context.Context, req *v1.DeptSaveReq) (res *v1.DeptSaveRes, err error) DeptSave(ctx context.Context, req *v1.DeptSaveReq) (res *v1.DeptSaveRes, err error)
+7
View File
@@ -12,6 +12,13 @@ type DeptListReq struct {
model.AgentDeptListParam model.AgentDeptListParam
} }
type DeptExportReq struct {
g.Meta `path:"/dept/export" method:"get" tags:"代理商组织管理" summary:"异步导出企业客户" x-check-permission:"cpm:agent:dept:export"`
model.AgentDeptListParam
}
type DeptExportRes struct{}
type DeptListRes struct { type DeptListRes struct {
response.PageResult response.PageResult
Data []*model.AgentEnterpriseCustomerModel `json:"items"` Data []*model.AgentEnterpriseCustomerModel `json:"items"`
+7
View File
@@ -12,6 +12,13 @@ type UserListReq struct {
model.AgentUserListParam model.AgentUserListParam
} }
type UserExportReq struct {
g.Meta `path:"/user/export" method:"get" tags:"代理商用户管理" summary:"异步导出用户" x-check-permission:"cpm:agent:user:export"`
model.AgentUserListParam
}
type UserExportRes struct{}
type UserListRes struct { type UserListRes struct {
response.PageResult response.PageResult
Data []*model.AgentUserListModel `json:"items"` Data []*model.AgentUserListModel `json:"items"`
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tagententerprise // Package tagententerprise
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tagententerprise package v1 //tagententerprise
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tapi // Package tapi
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tapi package v1 //tapi
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tcustwithdrawaccount // Package tcustwithdrawaccount
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tcustwithdrawaccount package v1 //tcustwithdrawaccount
+4
View File
@@ -16,6 +16,7 @@ type ICommonV1 interface {
BatchExecutionLogDetailList(ctx context.Context, req *v1.BatchExecutionLogDetailListReq) (res *v1.BatchExecutionLogDetailListRes, err error) BatchExecutionLogDetailList(ctx context.Context, req *v1.BatchExecutionLogDetailListReq) (res *v1.BatchExecutionLogDetailListRes, err error)
BatchMainList(ctx context.Context, req *v1.BatchMainListReq) (res *v1.BatchMainListRes, err error) BatchMainList(ctx context.Context, req *v1.BatchMainListReq) (res *v1.BatchMainListRes, err error)
BatchMainSuccessList(ctx context.Context, req *v1.BatchMainSuccessListReq) (res *v1.BatchMainSuccessListRes, err error) BatchMainSuccessList(ctx context.Context, req *v1.BatchMainSuccessListReq) (res *v1.BatchMainSuccessListRes, err error)
BatchMainExportWarehousing(ctx context.Context, req *v1.BatchMainExportWarehousingReq) (res *v1.BatchMainExportWarehousingRes, err error)
BatchMainCards(ctx context.Context, req *v1.BatchMainCardsReq) (res *v1.BatchMainCardsRes, err error) BatchMainCards(ctx context.Context, req *v1.BatchMainCardsReq) (res *v1.BatchMainCardsRes, err error)
BatchMainExport(ctx context.Context, req *v1.BatchMainExportReq) (res *v1.BatchMainExportRes, err error) BatchMainExport(ctx context.Context, req *v1.BatchMainExportReq) (res *v1.BatchMainExportRes, err error)
BatchMainView(ctx context.Context, req *v1.BatchMainViewReq) (res *v1.BatchMainViewRes, err error) BatchMainView(ctx context.Context, req *v1.BatchMainViewReq) (res *v1.BatchMainViewRes, err error)
@@ -82,6 +83,9 @@ type ICommonV1 interface {
TMessageLogView(ctx context.Context, req *v1.TMessageLogViewReq) (res *v1.TMessageLogViewRes, err error) TMessageLogView(ctx context.Context, req *v1.TMessageLogViewReq) (res *v1.TMessageLogViewRes, err error)
TMessageLogEdit(ctx context.Context, req *v1.TMessageLogEditReq) (res *v1.TMessageLogEditRes, err error) TMessageLogEdit(ctx context.Context, req *v1.TMessageLogEditReq) (res *v1.TMessageLogEditRes, err error)
TMessageLogDelete(ctx context.Context, req *v1.TMessageLogDeleteReq) (res *v1.TMessageLogDeleteRes, err error) TMessageLogDelete(ctx context.Context, req *v1.TMessageLogDeleteReq) (res *v1.TMessageLogDeleteRes, err error)
TMessageLogUnreadList(ctx context.Context, req *v1.TMessageLogUnreadListReq) (res *v1.TMessageLogUnreadListRes, err error)
TMessageLogRead(ctx context.Context, req *v1.TMessageLogReadReq) (res *v1.TMessageLogReadRes, err error)
TMessageLogReadAll(ctx context.Context, req *v1.TMessageLogReadAllReq) (res *v1.TMessageLogReadAllRes, err error)
TNotifyLogList(ctx context.Context, req *v1.TNotifyLogListReq) (res *v1.TNotifyLogListRes, err error) TNotifyLogList(ctx context.Context, req *v1.TNotifyLogListReq) (res *v1.TNotifyLogListRes, err error)
TNotifyLogExport(ctx context.Context, req *v1.TNotifyLogExportReq) (res *v1.TNotifyLogExportRes, err error) TNotifyLogExport(ctx context.Context, req *v1.TNotifyLogExportReq) (res *v1.TNotifyLogExportRes, err error)
TNotifyLogView(ctx context.Context, req *v1.TNotifyLogViewReq) (res *v1.TNotifyLogViewRes, err error) TNotifyLogView(ctx context.Context, req *v1.TNotifyLogViewReq) (res *v1.TNotifyLogViewRes, err error)
@@ -35,3 +35,12 @@ type BatchExecutionLogDetailListRes struct {
response.PageResult response.PageResult
Items []*model.BatchDetailListModel `json:"items" dc:"数据列表"` Items []*model.BatchDetailListModel `json:"items" dc:"数据列表"`
} }
type BatchExecutionLogSyncReviewReq struct {
g.Meta `path:"/batchExecutionLog/syncReview" method:"post" tags:"执行日志" summary:"手动同步待核查批次的上游执行结果" x-check-permission:"cpm:common:batchExecutionLog:syncReview"`
model.BatchExecutionLogSyncReviewParam
}
type BatchExecutionLogSyncReviewRes struct {
*model.BatchExecutionLogSyncReviewModel
}
+9 -1
View File
@@ -1,7 +1,7 @@
// Package batchmain // Package batchmain
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //batchmain package v1 //batchmain
@@ -34,6 +34,14 @@ type BatchMainSuccessListRes struct {
Items []*model.BatchMainSuccessListModel `json:"items" dc:"数据列表"` Items []*model.BatchMainSuccessListModel `json:"items" dc:"数据列表"`
} }
// ExportWarehousingReq 导出入库批次列表(数据来源同 successList 的入库类型)
type BatchMainExportWarehousingReq struct {
g.Meta `path:"/batchMain/exportWarehousing" method:"post" tags:"批次主表" summary:"导出入库批次列表" x-check-permission:"cpm:iot:tSimCardStock:export"`
model.BatchMainSuccessListParam
}
type BatchMainExportWarehousingRes struct{}
type BatchMainCardsReq struct { type BatchMainCardsReq struct {
g.Meta `path:"/batchMain/cards" method:"get" tags:"批次主表" summary:"批次卡清单" x-check-permission:"cpm:common:batchMain:cards"` g.Meta `path:"/batchMain/cards" method:"get" tags:"批次主表" summary:"批次卡清单" x-check-permission:"cpm:common:batchMain:cards"`
model.BatchCardListParam model.BatchCardListParam
+45
View File
@@ -0,0 +1,45 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// DownloadCenterListReq 下载中心列表
type DownloadCenterListReq struct {
g.Meta `path:"/downloadCenter/list" method:"get" tags:"下载中心" summary:"获取下载任务列表" x-check-permission:"cpm:common:downloadCenter:list"`
model.DownloadCenterListParam
}
type DownloadCenterListRes struct {
response.PageResult
Items []*model.DownloadCenterListModel `json:"items" dc:"数据列表"`
}
// DownloadCenterRecentReq 右上角全局入口:最近任务与进行中数量
type DownloadCenterRecentReq struct {
g.Meta `path:"/downloadCenter/recent" method:"get" tags:"下载中心" summary:"获取最近导出任务" x-check-permission:"cpm:common:downloadCenter:list"`
model.DownloadCenterRecentParam
}
type DownloadCenterRecentRes struct {
*model.DownloadCenterRecentModel
}
// DownloadCenterDownloadReq 下载导出文件(直接返回文件流)
type DownloadCenterDownloadReq struct {
g.Meta `path:"/downloadCenter/download" method:"get" tags:"下载中心" summary:"下载导出文件" x-check-permission:"cpm:common:downloadCenter:download"`
model.DownloadCenterTaskParam
}
type DownloadCenterDownloadRes struct{}
// DownloadCenterRemoveReq 删除文件并保留导出任务历史
type DownloadCenterRemoveReq struct {
g.Meta `path:"/downloadCenter/remove" method:"post" tags:"下载中心" summary:"删除导出任务" x-check-permission:"cpm:common:downloadCenter:remove"`
model.DownloadCenterTaskParam
}
type DownloadCenterRemoveRes struct{}
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tagentbalance // Package tagentbalance
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tagentbalance package v1 //tagentbalance
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tbalancedetail // Package tbalancedetail
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tbalancedetail package v1 //tbalancedetail
@@ -1,7 +1,7 @@
// Package tconsumeaccountmonthbill // Package tconsumeaccountmonthbill
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tconsumeaccountmonthbill package v1 //tconsumeaccountmonthbill
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tcreditdetail // Package tcreditdetail
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tcreditdetail package v1 //tcreditdetail
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tdivisioncode // Package tdivisioncode
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @Autoioterate Version // @Autoioterate Version
package v1 //tdivisioncode package v1 //tdivisioncode
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfinanceapply // Package tfinanceapply
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tfinanceapply package v1 //tfinanceapply
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfinanceauditrecord // Package tfinanceauditrecord
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tfinanceauditrecord package v1 //tfinanceauditrecord
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfincommissiondetail // Package tfincommissiondetail
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tfincommissiondetail package v1 //tfincommissiondetail
@@ -1,7 +1,7 @@
// Package tfinwithdrawablechange // Package tfinwithdrawablechange
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tfinwithdrawablechange package v1 //tfinwithdrawablechange
+29 -1
View File
@@ -1,7 +1,7 @@
// Package tmessagelog // Package tmessagelog
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tmessagelog package v1 //tmessagelog
@@ -57,3 +57,31 @@ type TMessageLogDeleteReq struct {
} }
type TMessageLogDeleteRes struct{} type TMessageLogDeleteRes struct{}
// UnreadListReq 获取当前登录用户未读消息通知
// 右上角消息提醒:任意登录用户都只能查看自己的未读消息,故仅校验登录态。
type TMessageLogUnreadListReq struct {
g.Meta `path:"/tMessageLog/unreadList" method:"get" tags:"消息日志" summary:"获取当前用户未读消息通知" x-check-permission:"cpc:current:user"`
model.TMessageLogUnreadListParam
}
type TMessageLogUnreadListRes struct {
Items []*model.TMessageLogUnreadListModel `json:"items" dc:"未读消息列表"`
Total int `json:"total" dc:"未读消息总数"`
}
// ReadReq 标记当前登录用户指定消息已读
type TMessageLogReadReq struct {
g.Meta `path:"/tMessageLog/read" method:"post" tags:"消息日志" summary:"标记当前用户指定消息已读" x-check-permission:"cpc:current:user"`
model.TMessageLogReadParam
}
type TMessageLogReadRes struct{}
// ReadAllReq 标记当前登录用户全部消息已读
type TMessageLogReadAllReq struct {
g.Meta `path:"/tMessageLog/readAll" method:"post" tags:"消息日志" summary:"标记当前用户全部消息已读" x-check-permission:"cpc:current:user"`
model.TMessageLogReadAllParam
}
type TMessageLogReadAllRes struct{}
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tnotifylog // Package tnotifylog
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tnotifylog package v1 //tnotifylog
@@ -1,7 +1,7 @@
// Package tprofitaccountmonthbill // Package tprofitaccountmonthbill
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tprofitaccountmonthbill package v1 //tprofitaccountmonthbill
+1 -1
View File
@@ -1,7 +1,7 @@
// Package twocommunication // Package twocommunication
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //twocommunication package v1 //twocommunication
+1 -1
View File
@@ -1,7 +1,7 @@
// Package twomain // Package twomain
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //twomain package v1 //twomain
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tworecord // Package tworecord
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tworecord package v1 //tworecord
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package testdemo // Package testdemo
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //testdemo package v1 //testdemo
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+7
View File
@@ -83,6 +83,13 @@ type IIotV1 interface {
TSimCardInfoSyncSimCardStatusQueue(ctx context.Context, req *v1.TSimCardInfoSyncSimCardStatusQueueReq) (res *v1.TSimCardInfoSyncSimCardStatusQueueRes, err error) TSimCardInfoSyncSimCardStatusQueue(ctx context.Context, req *v1.TSimCardInfoSyncSimCardStatusQueueReq) (res *v1.TSimCardInfoSyncSimCardStatusQueueRes, err error)
TSimCardInfoQuerySimSession(ctx context.Context, req *v1.TSimCardInfoQuerySimSessionReq) (res *v1.TSimCardInfoQuerySimSessionRes, err error) TSimCardInfoQuerySimSession(ctx context.Context, req *v1.TSimCardInfoQuerySimSessionReq) (res *v1.TSimCardInfoQuerySimSessionRes, err error)
TSimCardInfoQuerySimStatus(ctx context.Context, req *v1.TSimCardInfoQuerySimStatusReq) (res *v1.TSimCardInfoQuerySimStatusRes, err error) TSimCardInfoQuerySimStatus(ctx context.Context, req *v1.TSimCardInfoQuerySimStatusReq) (res *v1.TSimCardInfoQuerySimStatusRes, err error)
SimCardBaseQueryTemplate(ctx context.Context, req *v1.SimCardBaseQueryTemplateReq) (res *v1.SimCardBaseQueryTemplateRes, err error)
SimCardBaseQueryColumns(ctx context.Context, req *v1.SimCardBaseQueryColumnsReq) (res *v1.SimCardBaseQueryColumnsRes, err error)
SimCardBaseQueryExport(ctx context.Context, req *v1.SimCardBaseQueryExportReq) (res *v1.SimCardBaseQueryExportRes, err error)
SimCardUsageHistoryTemplate(ctx context.Context, req *v1.SimCardUsageHistoryTemplateReq) (res *v1.SimCardUsageHistoryTemplateRes, err error)
SimCardUsageHistoryColumns(ctx context.Context, req *v1.SimCardUsageHistoryColumnsReq) (res *v1.SimCardUsageHistoryColumnsRes, err error)
SimCardUsageHistoryDeptOptions(ctx context.Context, req *v1.SimCardUsageHistoryDeptOptionsReq) (res *v1.SimCardUsageHistoryDeptOptionsRes, err error)
SimCardUsageHistoryExport(ctx context.Context, req *v1.SimCardUsageHistoryExportReq) (res *v1.SimCardUsageHistoryExportRes, err error)
TSimCardOutboundExcelTemplate(ctx context.Context, req *v1.TSimCardOutboundExcelTemplateReq) (res *v1.TSimCardOutboundExcelTemplateRes, err error) TSimCardOutboundExcelTemplate(ctx context.Context, req *v1.TSimCardOutboundExcelTemplateReq) (res *v1.TSimCardOutboundExcelTemplateRes, err error)
TSimCardOutboundExcelSubmit(ctx context.Context, req *v1.TSimCardOutboundExcelSubmitReq) (res *v1.TSimCardOutboundExcelSubmitRes, err error) TSimCardOutboundExcelSubmit(ctx context.Context, req *v1.TSimCardOutboundExcelSubmitReq) (res *v1.TSimCardOutboundExcelSubmitRes, err error)
TSimCardOutboundRangeSubmit(ctx context.Context, req *v1.TSimCardOutboundRangeSubmitReq) (res *v1.TSimCardOutboundRangeSubmitRes, err error) TSimCardOutboundRangeSubmit(ctx context.Context, req *v1.TSimCardOutboundRangeSubmitReq) (res *v1.TSimCardOutboundRangeSubmitRes, err error)
+77
View File
@@ -0,0 +1,77 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
// ---------------------------------------------------------------------------
// 卡基础信息查询
// ---------------------------------------------------------------------------
type SimCardBaseQueryTemplateReq struct {
g.Meta `path:"/tSimCardBaseQuery/template" method:"get" tags:"卡基础信息查询" summary:"下载卡基础信息查询Excel模板" x-check-permission:"cpm:iot:tSimCardBaseQuery:view"`
}
type SimCardBaseQueryTemplateRes struct{}
type SimCardBaseQueryColumnsReq struct {
g.Meta `path:"/tSimCardBaseQuery/columns" method:"get" tags:"卡基础信息查询" summary:"卡基础信息查询可选导出列" x-check-permission:"cpm:iot:tSimCardBaseQuery:view"`
}
type SimCardBaseQueryColumnsRes struct {
Items []model.ExportColumn `json:"items" dc:"可选导出列"`
}
// SimCardBaseQueryExportReq 提交卡基础信息查询导出。
// Excel 模式上传 file;批量输入填 batchInput;连号填 dimension/startNum/endNum。
type SimCardBaseQueryExportReq struct {
g.Meta `path:"/tSimCardBaseQuery/export" method:"post" tags:"卡基础信息查询" summary:"提交卡基础信息查询导出" mime:"multipart/form-data" x-check-permission:"cpm:iot:tSimCardBaseQuery:view"`
model.SimCardQueryExportParam
}
type SimCardBaseQueryExportRes struct {
*model.SimCardQuerySubmitRes
}
// ---------------------------------------------------------------------------
// 月历史用量查询
// ---------------------------------------------------------------------------
type SimCardUsageHistoryTemplateReq struct {
g.Meta `path:"/tSimCardUsageHistory/template" method:"get" tags:"月历史用量查询" summary:"下载月历史用量查询Excel模板" x-check-permission:"cpm:iot:tSimCardUsageHistory:view"`
}
type SimCardUsageHistoryTemplateRes struct{}
type SimCardUsageHistoryColumnsReq struct {
g.Meta `path:"/tSimCardUsageHistory/columns" method:"get" tags:"月历史用量查询" summary:"月历史用量查询可选列与月份清单" x-check-permission:"cpm:iot:tSimCardUsageHistory:view"`
}
type SimCardUsageHistoryColumnsRes struct {
Items []model.ExportColumn `json:"items" dc:"可选固定列"`
Months []string `json:"months" dc:"近12个月月份清单,顺序即导出列顺序"`
}
// SimCardUsageHistoryDeptOptionsReq 所属公司下拉,展示范围由数据权限决定。
type SimCardUsageHistoryDeptOptionsReq struct {
g.Meta `path:"/tSimCardUsageHistory/deptOptions" method:"get" tags:"月历史用量查询" summary:"月历史用量查询可选公司" x-check-permission:"cpm:iot:tSimCardUsageHistory:view"`
}
type SimCardUsageHistoryDeptOptionsRes struct {
Items []*model.SimCardQueryDeptOption `json:"items" dc:"可选公司"`
// CurrentDeptId 当前登录用户所属部门,前端用于把公司下拉默认指向本企业。
CurrentDeptId int64 `json:"currentDeptId" dc:"当前用户所属部门ID"`
}
// SimCardUsageHistoryExportReq 提交月历史用量查询导出。
// 比卡基础信息查询多一个 dept 模式:按所属公司整批导出。
type SimCardUsageHistoryExportReq struct {
g.Meta `path:"/tSimCardUsageHistory/export" method:"post" tags:"月历史用量查询" summary:"提交月历史用量查询导出" mime:"multipart/form-data" x-check-permission:"cpm:iot:tSimCardUsageHistory:view"`
model.SimCardUsageHistoryExportParam
}
type SimCardUsageHistoryExportRes struct {
*model.SimCardQuerySubmitRes
}
+1 -1
View File
@@ -1,7 +1,7 @@
// Package torder // Package torder
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tflowpackageconfig // Package tflowpackageconfig
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tflowpackageconfig package v1 //tflowpackageconfig
+1 -1
View File
@@ -1,7 +1,7 @@
// Package torder // Package torder
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //torder package v1 //torder
+1
View File
@@ -18,6 +18,7 @@ type TSimCardAllocateExcelTemplateReq struct {
type TSimCardAllocateExcelTemplateRes struct{} type TSimCardAllocateExcelTemplateRes struct{}
type TSimCardAllocateTargetListRes struct { type TSimCardAllocateTargetListRes struct {
MaxInputRows int `json:"maxInputRows" dc:"单次批量输入条数上限"`
Items []*model.TSimCardAllocateTargetModel `json:"items" dc:"目标客户列表"` Items []*model.TSimCardAllocateTargetModel `json:"items" dc:"目标客户列表"`
} }
+2 -2
View File
@@ -1,7 +1,7 @@
// Package tsimcardinfo // Package tsimcardinfo
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimcardinfo package v1 //tsimcardinfo
@@ -15,7 +15,7 @@ import (
// ListReq 查询卡信息表列表 // ListReq 查询卡信息表列表
type TSimCardInfoListReq struct { type TSimCardInfoListReq struct {
g.Meta `path:"/tSimCardInfo/list" method:"get" tags:"卡信息表" summary:"获取卡信息表列表" x-check-permission:"cpm:iot:tSimCardInfo:list"` g.Meta `path:"/tSimCardInfo/list" method:"get,post" tags:"卡信息表" summary:"获取卡信息表列表" x-check-permission:"cpm:iot:tSimCardInfo:list"`
model.TSimCardInfoListParam model.TSimCardInfoListParam
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimcardstock // Package tsimcardstock
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimcardstock package v1 //tsimcardstock
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimchannels // Package tsimchannels
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimchannels package v1 //tsimchannels
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimchanneltemplate // Package tsimchanneltemplate
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimchanneltemplate package v1 //tsimchanneltemplate
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimdiagnose // Package tsimdiagnose
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimdiagnose package v1 //tsimdiagnose
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpackageinfo // Package tsimflowpackageinfo
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimflowpackageinfo package v1 //tsimflowpackageinfo
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpackageprice // Package tsimflowpackageprice
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimflowpackageprice package v1 //tsimflowpackageprice
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpool // Package tsimflowpool
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimflowpool package v1 //tsimflowpool
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimpackagecategory // Package tsimpackagecategory
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimpackagecategory package v1 //tsimpackagecategory
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimpoolwarnconfig // Package tsimpoolwarnconfig
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimpoolwarnconfig package v1 //tsimpoolwarnconfig
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimupstreampackage // Package tsimupstreampackage
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //tsimupstreampackage package v1 //tsimupstreampackage
+5 -5
View File
@@ -7,21 +7,21 @@ import (
) )
type TSimWarningConfigExcelTemplateReq struct { type TSimWarningConfigExcelTemplateReq struct {
g.Meta `path:"/tSimWarningConfig/excel/template" method:"get" tags:"SIM卡预警配置" summary:"下载SIM卡预警配置Excel模板" x-check-permission:"cpm:iot:tSimWarningConfig:excel:template"` g.Meta `path:"/tSimWarningConfig/excel/template" method:"get" tags:"SIM卡预警配置" summary:"下载SIM卡预警配置Excel模板" x-check-permission:"cpm:iot:tSimWarningConfig:excel:template,cpm:iot:tSimPoolWarnConfig:excel:template"`
ItemType int `json:"itemType" form:"itemType" dc:"对象类型:1单卡,2流量池;默认1"` ItemType int `json:"itemType" form:"itemType" dc:"对象类型:1单卡,2流量池;默认1"`
} }
type TSimWarningConfigExcelTemplateRes struct{} type TSimWarningConfigExcelTemplateRes struct{}
type TSimWarningConfigEmailCodeReq struct { type TSimWarningConfigEmailCodeReq struct {
g.Meta `path:"/tSimWarningConfig/email/code" method:"post" tags:"SIM卡预警配置" summary:"发送预警邮箱验证码" x-check-permission:"cpm:iot:tSimWarningConfig:input:submit"` g.Meta `path:"/tSimWarningConfig/email/code" method:"post" tags:"SIM卡预警配置" summary:"发送预警邮箱验证码" x-check-permission:"cpm:iot:tSimWarningConfig:input:submit,cpm:iot:tSimPoolWarnConfig:input:submit"`
model.TSimWarningConfigEmailCodeParam model.TSimWarningConfigEmailCodeParam
} }
type TSimWarningConfigEmailCodeRes struct{} type TSimWarningConfigEmailCodeRes struct{}
type TSimWarningConfigExcelSubmitReq struct { type TSimWarningConfigExcelSubmitReq struct {
g.Meta `path:"/tSimWarningConfig/excel/submit" method:"post" tags:"SIM卡预警配置" summary:"提交Excel批量SIM卡预警配置" mime:"multipart/form-data" x-check-permission:"cpm:iot:tSimWarningConfig:excel:submit"` g.Meta `path:"/tSimWarningConfig/excel/submit" method:"post" tags:"SIM卡预警配置" summary:"提交Excel批量SIM卡预警配置" mime:"multipart/form-data" x-check-permission:"cpm:iot:tSimWarningConfig:excel:submit,cpm:iot:tSimPoolWarnConfig:excel:submit"`
model.TSimWarningConfigExcelSubmitParam model.TSimWarningConfigExcelSubmitParam
} }
@@ -30,7 +30,7 @@ type TSimWarningConfigExcelSubmitRes struct {
} }
type TSimWarningConfigInputSubmitReq struct { type TSimWarningConfigInputSubmitReq struct {
g.Meta `path:"/tSimWarningConfig/input/submit" method:"post" tags:"SIM卡预警配置" summary:"提交批量输入SIM卡预警配置" x-check-permission:"cpm:iot:tSimWarningConfig:input:submit"` g.Meta `path:"/tSimWarningConfig/input/submit" method:"post" tags:"SIM卡预警配置" summary:"提交批量输入SIM卡预警配置" x-check-permission:"cpm:iot:tSimWarningConfig:input:submit,cpm:iot:tSimPoolWarnConfig:input:submit"`
model.TSimWarningConfigInputSubmitParam model.TSimWarningConfigInputSubmitParam
} }
@@ -39,7 +39,7 @@ type TSimWarningConfigInputSubmitRes struct {
} }
type TSimWarningConfigRangeSubmitReq struct { type TSimWarningConfigRangeSubmitReq struct {
g.Meta `path:"/tSimWarningConfig/range/submit" method:"post" tags:"SIM卡预警配置" summary:"提交连号SIM卡预警配置" x-check-permission:"cpm:iot:tSimWarningConfig:range:submit"` g.Meta `path:"/tSimWarningConfig/range/submit" method:"post" tags:"SIM卡预警配置" summary:"提交连号SIM卡预警配置" x-check-permission:"cpm:iot:tSimWarningConfig:range:submit,cpm:iot:tSimPoolWarnConfig:range:submit"`
model.TSimWarningConfigRangeSubmitParam model.TSimWarningConfigRangeSubmitParam
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package sysnoticeuser // Package sysnoticeuser
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //sysnoticeuser package v1 //sysnoticeuser
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package ttplatformsetting // Package ttplatformsetting
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie // @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version // @AutoGenerate Version
package v1 //ttplatformsetting package v1 //ttplatformsetting
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1 // Package v1
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1 package v1
+8 -4
View File
@@ -1,4 +1,5 @@
FROM golang:1.25-alpine AS builder ARG BASE_REGISTRY=docker.io/library
FROM ${BASE_REGISTRY}/golang:1.25-alpine AS builder
LABEL stage=gobuilder LABEL stage=gobuilder
@@ -8,7 +9,10 @@ ENV CGO_ENABLED=1
ENV GOOS=linux ENV GOOS=linux
ENV GOARCH=amd64 ENV GOARCH=amd64
RUN apk add --no-cache gcc musl-dev git tzdata # 基础镜像源:阿里云 Alpine 镜像站曾出现索引与实际文件不同步(APKINDEX 标 r24、
# 目录只有 r23,导致 musl/musl-dev 拉取 404)。改用清华源,可用性更稳。
RUN sed -i 's#https://dl-cdn.alpinelinux.org/alpine#https://mirrors.tuna.tsinghua.edu.cn/alpine#g' /etc/apk/repositories && \
apk add --no-cache gcc musl-dev git tzdata expect
WORKDIR /build WORKDIR /build
@@ -29,7 +33,7 @@ RUN set -euxo pipefail && \
-ldflags "-X main.BuildVersion=${BuildVersion} -X main.CommitID=${CommitID} -X main.BuildTime=${BuildTime}" \ -ldflags "-X main.BuildVersion=${BuildVersion} -X main.CommitID=${CommitID} -X main.BuildTime=${BuildTime}" \
. .
FROM alpine:3.23 FROM ${BASE_REGISTRY}/alpine:3.23 AS alpine
RUN apk add --no-cache ca-certificates tzdata RUN apk add --no-cache ca-certificates tzdata
@@ -39,6 +43,6 @@ EXPOSE 13100
WORKDIR /app WORKDIR /app
COPY --from=builder /build/iotlcmadmin_svc /app/iotlcmadmin_svc COPY --from=builder /build/iotlcmadmin_svc /app/iotlcmadmin_svc
COPY --from=builder /build/build/build_config.yaml /app/config/config.yaml COPY --from=builder /build/build/config.example.yaml /app/config/config.yaml
CMD ["./iotlcmadmin_svc"] CMD ["./iotlcmadmin_svc"]
@@ -1,7 +1,7 @@
# config.yaml 配置文件 # config.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin # @Link https://github.com/xiujiecn/xiu-admin
# @Copyright Copyright (c) 2025 LiXiujie # @Copyright Copyright (c) 2025 LiXiujie
# @Author Lxj <li@xiujie.cn> # @Author Lxj <xxx@example.com>
# @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE # @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
# 系统配置 # 系统配置
system: system:
@@ -79,7 +79,7 @@ database:
level: "all" level: "all"
stdout: true stdout: true
default: # 分组名称,可自定义,默认为default default: # 分组名称,可自定义,默认为default
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai" link: "${DB_DSN}"
debug: true #开启调试模式 debug: true #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。 charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写) dryRun: false #ORM空跑(只读不写)
@@ -87,9 +87,9 @@ database:
maxOpen: 100 #连接池最大打开的连接数 maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度 maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
memorydb: memorydb:
# link: "sqlite::@file(jieiotmem.db)?journal_mode=WAL" # link: "${DB_DSN}"
link: "sqlite::@file(:memory:)" link: "${DB_DSN}"
# link: "" # link: "${DB_DSN}"
debug: true debug: true
maxIdle: 1 maxIdle: 1
maxOpen: 1 maxOpen: 1
@@ -106,9 +106,9 @@ redis:
default: default:
mode: "single" #redis模式,支持:single|cluster|sentinel mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称 sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称
address: 172.17.0.1:6379 address: 127.0.0.1:6379
db: 0 db: 0
pass: "${REDIS_PASSWORD}" pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数 minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数 maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数 maxActive: 5000 #最大活跃连接数
@@ -1,7 +1,7 @@
# config.yaml 配置文件 # config.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin # @Link https://github.com/xiujiecn/xiu-admin
# @Copyright Copyright (c) 2025 LiXiujie # @Copyright Copyright (c) 2025 LiXiujie
# @Author Lxj <li@xiujie.cn> # @Author Lxj <xxx@example.com>
# @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE # @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
# 系统配置 # 系统配置
system: system:
@@ -86,9 +86,9 @@ register:
email: email:
host: "smtp.exmail.qq.com" host: "smtp.exmail.qq.com"
port: 465 port: 465
username: "iotlcm@example.com" username: "${SERVICE_USERNAME}"
password: "JH8DaDFxJuzFRLyB" password: "${SERVICE_PASSWORD}"
from: "iotlcm@example.com" from: "xxx@example.com"
fromName: "物联卡管理平台" fromName: "物联卡管理平台"
subject: "注册验证码" subject: "注册验证码"
bodyTemplate: "您的注册验证码是:{code},6小时内有效。" bodyTemplate: "您的注册验证码是:{code},6小时内有效。"
@@ -112,20 +112,20 @@ warning:
# 阿里云 serviceType=1,腾讯云 serviceType=2。 # 阿里云 serviceType=1,腾讯云 serviceType=2。
serviceType: "" serviceType: ""
regionId: "" regionId: ""
accessKeyId: "" accessKeyId: "${ACCESS_KEY_ID}"
accessKeySecret: "" accessKeySecret: "${ACCESS_KEY_SECRET}"
sdkAppId: "" sdkAppId: "${SDK_APP_ID}"
signName: "" signName: "${SMS_SIGN_NAME}"
templateId: "" templateId: "${TEMPLATE_ID}"
# 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。 # 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。
# 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。 # 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。
msgContentTemplate: "" msgContentTemplate: ""
# 长期建议:短信平台签名、模板和密钥由短信微服务自行处理,lcm 只传手机号和聚合内容。 # 长期建议:短信平台签名、模板和密钥由短信微服务自行处理,lcm 只传手机号和聚合内容。
wechat: wechat:
enabled: false enabled: false
appId: "wx9e26905702c1a372" appId: "${APP_ID}"
appSecret: "" appSecret: "${APP_SECRET}"
templateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY" templateId: "${TEMPLATE_ID}"
page: "pages/message/index" page: "pages/message/index"
timeout: "5s" timeout: "5s"
@@ -136,7 +136,7 @@ database:
level: "all" level: "all"
stdout: true stdout: true
default: # 分组名称,可自定义,默认为default default: # 分组名称,可自定义,默认为default
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai" link: "${DB_DSN}"
debug: true #开启调试模式 debug: true #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。 charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写) dryRun: false #ORM空跑(只读不写)
@@ -144,9 +144,9 @@ database:
maxOpen: 100 #连接池最大打开的连接数 maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度 maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
memorydb: memorydb:
# link: "sqlite::@file(jieiotmem.db)?journal_mode=WAL" # link: "${DB_DSN}"
link: "sqlite::@file(:memory:)" link: "${DB_DSN}"
# link: "" # link: "${DB_DSN}"
debug: true debug: true
maxIdle: 1 maxIdle: 1
maxOpen: 1 maxOpen: 1
@@ -163,9 +163,9 @@ redis:
default: default:
mode: "single" #redis模式,支持:single|cluster|sentinel mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称 sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称
address: 192.0.2.29:6379 address: 127.0.0.1:6379
db: 0 db: 0
pass: "${REDIS_PASSWORD}" pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数 minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数 maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数 maxActive: 5000 #最大活跃连接数
@@ -174,18 +174,18 @@ redis:
rabbitmq: rabbitmq:
enabled: true enabled: true
# 示例:amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/ # 示例:amqp://guest:guest@127.0.0.1:5672/
# dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/" # dsn: "${SERVICE_DSN}"
dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/" dsn: "${SERVICE_DSN}"
tsdb: tsdb:
database: "TdEngine" #可选择 TdEngine、Influxdb database: "TdEngine" #可选择 TdEngine、Influxdb
tdengine: tdengine:
# type: "taosRestful" #http连接方式,端口是6041 # type: "taosRestful" #http连接方式,端口是6041
# dsn: "root:taosdata@http(127.0.0.1:6041)/" # dsn: "${SERVICE_DSN}"
type: "taosWS" #websocket连接方式,端口是6041 type: "taosWS" #websocket连接方式,端口是6041
# dsn: "root:taosdata@ws(127.0.0.1:6041)/" # dsn: "${SERVICE_DSN}"
dsn: "root:sdyz2026__@ws(192.0.2.29:6041)/" dsn: "${SERVICE_DSN}"
dbName: "iotlcm" dbName: "iotlcm"
maxOpenConns: 100 maxOpenConns: 100
maxIdleConns: 10 maxIdleConns: 10
@@ -205,8 +205,8 @@ router:
# 生成代码 # 生成代码
alipay: alipay:
appId: "9021000165668942" appId: "${APP_ID}"
privateKey: "MIIEowIBAAKCAQEAg+4BpLO2Fw5GMbrihnugyQqiLBp2RhSbSsvjNyzaG10u900N1DcVlh8HNdcus5AGjfbiUwMQwv7Os+NnFrEZA3CtWLXH+uczHIpcMqJJhoVgA//4gf2TX9K4OSQ1pgJeAhTS9WWMEB7DQLb7A6xGjvBdGNbPAzucGhUmtG1tgZSVOcpWqN2h4dQxkZhfR+6m3AqWAPahpQXsNINHewetQ4mIG+b3+z/OknEll0RDRmw7OihOJ24B51Phy7lewl160LgLpLffyaQUUXcFdcNo+HvWqtIT0mH8WWHAgqfN/WVkMz/WVjE0rzbIVgmpQc7+hMbrcafTmeq0wdnVXrKS6QIDAQABAoIBAEagy1ZuMyRiqueCojTWyHv4altsCzd3Xq+LOWfXZihSGYuhP68FklPc5pJHUaQljazAp+dC891AZk5dhlnak4aI8vRT1OyYi39S/wrIYM5YZs+dYF/O7e/VsnQ800+9YrCAj3N6WqJiparmirkrqFZrjZt3nDmh1u8Ltb3P+1jr90MBEdS+BXaEQP/KGxFiKZyoWFn9B4l0aPFkPExF+hgtRpP3gxFcyljQKGVmSUIkT6V08F1oRm72NQOhcizCh9lX+5HYLTkUVQVg6FHwdZs/KeJcZu6Y829pNSNeJmPbR3VPUpTbvwb0qeEoc42T3H/C0xXUeTYizUpHmhJJqnUCgYEA3Y7Xz+MUk98zRJnlr2BDUc+Qnhv3wmSA5LCcRbxTNNBp4TXjnZknY6Ms9D+nJupL4nw6QSYkO6O+tAEmU6gaSDEHKI1uKqU0zOdbGIHNkMqka3rinQcMJNNRZ8T1FLCPFna7S1FNlxulZgWxjqxP/KvWOEpCWLCLzwZNk8fEd+MCgYEAmHBNbaMmT4WvLevY/OMv/5e5csnDFIcsNJKvFLZZMBLuKT/26YN2ryVUivY+TTyHL5zk4VybeauTdQHIvX6sNJoh2Ii6vthKfSufL4rkMob8PHiG33iHBx3VxAwiVXfu3JHVnbCPcXTOzsdRzT17X3rODK9t8319qfVjd0Gxi8MCgYEAqgNc0+ea+MXD35aAzA0AW5z9inZHruHUjqh/onubFeH//ZOOsHa/5RNoAZ1+tLwBszBEu417LFDAm/xt3rAWSuNkbNfqe8r+M2YtXybsCXmWpetMTdcEmJWX2BspPdEmW8SMgIVJFvVd/GXOFH9hebCa1+MT+l6vShO6H/ahaqUCgYAzon6nr4bPkvHWtTfH2VCt2//mIO+iaXMQz8rcUjP9s7vWXyNMz8oI47UyaNyLnwAPoa5po8vKN9L35EXR4jGEk9z5Er9m267HnVoLaZmIf+66sPzGf3YFdBavlIiguMJBFmjsRB0iijVvF1bfFX9PxTI8W8P7oTtKsaMihy8TrwKBgCgjA8DL8HJbRwZ+V/KWOh8rzO5cBUUH3ThIj6u7Wn4tMlscfi+KFKTXghjSORfIVx8v9v2aNZKwGZ547AOPRXhDF09cLAcCfl7uOrwsftziIeBQnrqtpIqcVTgRwGMIMBJEtQEks5N/E/d+dSL1YQKC76mVC8/RMf52WYKH1QCa" privateKey: "${PRIVATE_KEY}"
alipayPublicKey: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8Df1EPFkA2xy8NgF0UdRYxsshslUi2XSGTG01oQKsrYNB+rhAw9MJdMlunVQxSrBZsw5N7htXGdiTceaLo/n8Wuibp0cRHdErJSp9GhP4pW2IR3FoCCPYlJlyiCUR/NInI3XMai0UdjgiPX03bvYLRAKE8lLiOSgxNagQmOFLmQYRYfFhGbxDe98XMg83YdSWvZKrlM+vzgk8/aPgq7BFLpbRKqLvd8OXXBHDCaWMSSGwCN0whhdEiwbIhSVgwTgkhWXUuNDmT741/+7D46djp8wX/84SDts0fWb63/in9ATTGtNivJX7HPDyqrmcN2iUi5xFHS9XwYBdT4yu/xFQwIDAQAB" alipayPublicKey: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8Df1EPFkA2xy8NgF0UdRYxsshslUi2XSGTG01oQKsrYNB+rhAw9MJdMlunVQxSrBZsw5N7htXGdiTceaLo/n8Wuibp0cRHdErJSp9GhP4pW2IR3FoCCPYlJlyiCUR/NInI3XMai0UdjgiPX03bvYLRAKE8lLiOSgxNagQmOFLmQYRYfFhGbxDe98XMg83YdSWvZKrlM+vzgk8/aPgq7BFLpbRKqLvd8OXXBHDCaWMSSGwCN0whhdEiwbIhSVgwTgkhWXUuNDmT741/+7D46djp8wX/84SDts0fWb63/in9ATTGtNivJX7HPDyqrmcN2iUi5xFHS9XwYBdT4yu/xFQwIDAQAB"
notifyUrl: "https://evolution-starless-municipal.ngrok-free.dev/api/v1/pay/alipay/notify" notifyUrl: "https://evolution-starless-municipal.ngrok-free.dev/api/v1/pay/alipay/notify"
returnUrl: "http://localhost:5666/enterpriseManagement/tBalanceDetail/tAgentBalance" returnUrl: "http://localhost:5666/enterpriseManagement/tBalanceDetail/tAgentBalance"
+22 -16
View File
@@ -1,7 +1,7 @@
# config_default.yaml 配置文件 # config_default.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin # @Link https://github.com/xiujiecn/xiu-admin
# @Copyright Copyright (c) 2025 LiXiujie # @Copyright Copyright (c) 2025 LiXiujie
# @Author Lxj <li@xiujie.cn> # @Author Lxj <xxx@example.com>
# @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE # @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
# 系统配置 # 系统配置
system: system:
@@ -78,6 +78,12 @@ warning:
firstWarnDays: 30 firstWarnDays: 30
secondWarnDays: 15 secondWarnDays: 15
thirdWarnDays: 7 thirdWarnDays: 7
monthly:
# 每月15日09:00企业汇总;以下参数名已按阿里云审核通过的模板核实。
# JSON字符串值支持 {count}、{expireDate};部署时同步到实际使用的配置文件。
# 空值仍不发送短信,不影响站内系统通知;不复用验证码/通用流量预警模板。
currentMonthParamsTemplate: '{"card_num":"{count}","expire_date":"{expireDate}"}' # SMS_512596191
nextMonthParamsTemplate: '{"card_num":"{count}","expire_date":"{expireDate}"}' # SMS_512646156
sms: sms:
enabled: false enabled: false
# HTTP 接口地址;如果配置 grpcAddr,则优先走 gRPC。 # HTTP 接口地址;如果配置 grpcAddr,则优先走 gRPC。
@@ -89,11 +95,11 @@ warning:
# 阿里云 serviceType=1,腾讯云 serviceType=2。 # 阿里云 serviceType=1,腾讯云 serviceType=2。
serviceType: "" serviceType: ""
regionId: "" regionId: ""
accessKeyId: "" accessKeyId: "${ACCESS_KEY_ID}"
accessKeySecret: "" accessKeySecret: "${ACCESS_KEY_SECRET}"
sdkAppId: "" sdkAppId: "${SDK_APP_ID}"
signName: "" signName: "${SMS_SIGN_NAME}"
templateId: "" templateId: "${TEMPLATE_ID}"
# 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。 # 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。
# 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。 # 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。
msgContentTemplate: "" msgContentTemplate: ""
@@ -101,22 +107,22 @@ warning:
wechat: wechat:
enabled: false enabled: false
appId: "wx9e26905702c1a372" appId: "${APP_ID}"
appSecret: "" appSecret: "${APP_SECRET}"
templateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY" templateId: "${TEMPLATE_ID}"
page: "pages/message/index" page: "pages/message/index"
timeout: "5s" timeout: "5s"
database: database:
legacyCard: legacyCard:
link: "" link: "${DB_DSN}"
debug: false debug: false
logger: logger:
path: "/app/logs/sql" path: "/app/logs/sql"
level: "all" level: "all"
stdout: true stdout: true
default: # 分组名称,可自定义,默认为default default: # 分组名称,可自定义,默认为default
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai" link: "${DB_DSN}"
debug: true #开启调试模式 debug: true #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。 charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写) dryRun: false #ORM空跑(只读不写)
@@ -134,10 +140,10 @@ redis:
# 单实例配置 # 单实例配置
default: default:
mode: "single" #redis模式,支持:single|cluster|sentinel mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "${REDIS_SENTINEL_MASTER}" #哨兵模式主节点名称 sentinelMasterName: "xiujie-master" #哨兵模式主节点名称
address: 192.0.2.200:6379 address: 127.0.0.1:6379
db: 0 db: 0
pass: "${REDIS_PASSWORD}" pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数 minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数 maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数 maxActive: 5000 #最大活跃连接数
@@ -149,9 +155,9 @@ queue:
type: "asynq" # 队列类型 type: "asynq" # 队列类型
asynq: asynq:
redis: redis:
address: 192.0.2.200:6379 address: 127.0.0.1:6379
db: 0 db: 0
pass: "${REDIS_PASSWORD}" pass: "${SERVICE_PASSWORD}"
user: user:
concurrency: 10 # 最大同时执行的任务数量 concurrency: 10 # 最大同时执行的任务数量
logLevel: 4 # 日志级别 DebugLevel 1, InfoLevel 2, WarnLevel 3, ErrorLevel 4, FatalLevel 5 logLevel: 4 # 日志级别 DebugLevel 1, InfoLevel 2, WarnLevel 3, ErrorLevel 4, FatalLevel 5
+5 -5
View File
@@ -22,12 +22,17 @@ require (
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.24.5 github.com/shirou/gopsutil/v3 v3.24.5
github.com/smartwalle/alipay/v3 v3.2.29 github.com/smartwalle/alipay/v3 v3.2.29
github.com/taosdata/driver-go/v3 v3.8.0
github.com/tealeg/xlsx v1.0.5
github.com/xiujiecn/asynq v0.25.10 github.com/xiujiecn/asynq v0.25.10
github.com/xuri/excelize/v2 v2.9.0 github.com/xuri/excelize/v2 v2.9.0
go.opentelemetry.io/otel v1.38.0 go.opentelemetry.io/otel v1.38.0
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
golang.org/x/net v0.40.0 golang.org/x/net v0.40.0
golang.org/x/sync v0.14.0
golang.org/x/tools v0.31.0 golang.org/x/tools v0.31.0
google.golang.org/grpc v1.64.1
google.golang.org/protobuf v1.36.6
gorm.io/gorm v1.25.12 gorm.io/gorm v1.25.12
) )
@@ -70,8 +75,6 @@ require (
github.com/smartwalle/ngx v1.1.0 // indirect github.com/smartwalle/ngx v1.1.0 // indirect
github.com/smartwalle/nsign v1.0.9 // indirect github.com/smartwalle/nsign v1.0.9 // indirect
github.com/spf13/cast v1.7.0 // indirect github.com/spf13/cast v1.7.0 // indirect
github.com/taosdata/driver-go/v3 v3.8.0 // indirect
github.com/tealeg/xlsx v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect github.com/tklauser/numcpus v0.6.1 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
@@ -84,13 +87,10 @@ require (
golang.org/x/crypto v0.38.0 // indirect golang.org/x/crypto v0.38.0 // indirect
golang.org/x/image v0.23.0 // indirect golang.org/x/image v0.23.0 // indirect
golang.org/x/mod v0.24.0 // indirect golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.35.0 // indirect golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.25.0 // indirect golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.8.0 // indirect golang.org/x/time v0.8.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.22.5 // indirect modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect modernc.org/mathutil v1.5.0 // indirect
+1 -1
View File
@@ -4,7 +4,7 @@
gfcli: gfcli:
gen: gen:
dao: dao:
- link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai" - link: "mysql:root:sdyz2026@tcp(127.0.0.1:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
tables: "sys_*" tables: "sys_*"
descriptionTag: true # 数据表字段注释 descriptionTag: true # 数据表字段注释
noModelComment: true noModelComment: true
+1 -4
View File
@@ -89,7 +89,7 @@ export NOWTIME=$(shell date "+%Y%m%d%H%M%S")
.PHONY: clean_docker_iotlcmadmin create_docker_iotlcmadmin .PHONY: clean_docker_iotlcmadmin create_docker_iotlcmadmin
clean_docker_iotlcmadmin: clean_docker_iotlcmadmin:
docker tag docker_iotlcmadmin:v0 ${REGISTRY}/docker_iotlcmadmin:v0 docker tag docker_iotlcmadmin:v0 docker_iotlcmadmin:v0.${NOWTIME}.bak
docker rmi docker_iotlcmadmin:v0 docker rmi docker_iotlcmadmin:v0
create_docker_iotlcmadmin: create_docker_iotlcmadmin:
@@ -102,6 +102,3 @@ mod:
dockerbuild: create_docker_iotlcmadmin dockerbuild: create_docker_iotlcmadmin
echo "docker build success" echo "docker build success"
dockerpush:
docker tag docker_iotlcmadmin:v0 ${REGISTRY}/docker_iotlcmadmin:v0
docker push ${REGISTRY}/$1:$2
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd // Package cmd
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd package cmd
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd // Package cmd
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd package cmd
+9
View File
@@ -3,6 +3,7 @@ package cmd
import ( import (
"context" "context"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/cmd/inithttp" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/cmd/inithttp"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/exportcenter"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/rabbitmq" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/rabbitmq"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/websocket" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/websocket"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/router" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/router"
@@ -17,11 +18,19 @@ import (
func init() { func init() {
inithttp.RegisterHttpInitFunc("initJobTask", initJobTask) inithttp.RegisterHttpInitFunc("initJobTask", initJobTask)
inithttp.RegisterHttpInitFunc("exportCenter", initExportCenter)
inithttp.RegisterHttpCleanupFunc("rabbitmq", func(ctx context.Context) error { inithttp.RegisterHttpCleanupFunc("rabbitmq", func(ctx context.Context) error {
return rabbitmq.Close() return rabbitmq.Close()
}) })
} }
// initExportCenter 导出中心:补偿上次进程遗留的任务,并启动过期文件清理。
func initExportCenter(ctx context.Context) error {
exportcenter.RecoverOnStart(ctx)
exportcenter.StartCleanup(ctx)
return nil
}
var Http = &gcmd.Command{ var Http = &gcmd.Command{
Name: "http", Name: "http",
Usage: "http", Usage: "http",
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd // Package cmd
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd package cmd
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd // Package cmd
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package cmd package cmd
+6
View File
@@ -7,6 +7,7 @@ const (
BatchAsyncStatusSuccess = 3 BatchAsyncStatusSuccess = 3
BatchAsyncStatusFailed = 4 BatchAsyncStatusFailed = 4
BatchAsyncStatusPartialSuccess = 5 BatchAsyncStatusPartialSuccess = 5
BatchAsyncStatusReview = 6
) )
const ( const (
@@ -15,6 +16,7 @@ const (
BatchRunResultSuccess = 2 BatchRunResultSuccess = 2
BatchRunResultFailed = 3 BatchRunResultFailed = 3
BatchRunResultPartialSuccess = 4 BatchRunResultPartialSuccess = 4
BatchRunResultReview = 5
) )
const ( const (
@@ -27,6 +29,8 @@ const (
BatchDetailStatusRunning = 1 BatchDetailStatusRunning = 1
BatchDetailStatusSuccess = 2 BatchDetailStatusSuccess = 2
BatchDetailStatusFailed = 3 BatchDetailStatusFailed = 3
BatchDetailStatusUnknown = 4
BatchDetailStatusNotExecuted = 5
) )
const ( const (
@@ -44,6 +48,7 @@ const (
BatchTypePrepare = 4 BatchTypePrepare = 4
BatchTypeCardAddPackage = 11 BatchTypeCardAddPackage = 11
BatchTypePoolAddPackage = 12 BatchTypePoolAddPackage = 12
BatchTypeExport = 14 // 数据导出(仅写执行日志,不出现在批次管理页)
BatchTypeSimWarningConfig = 40 BatchTypeSimWarningConfig = 40
BatchTypeTrafficCutoffConfig = 41 BatchTypeTrafficCutoffConfig = 41
@@ -65,6 +70,7 @@ const (
BatchNoPrefixAllocate = "ALC" BatchNoPrefixAllocate = "ALC"
BatchNoPrefixCardAddPackage = "ADP" BatchNoPrefixCardAddPackage = "ADP"
BatchNoPrefixPoolAddPackage = "PAP" BatchNoPrefixPoolAddPackage = "PAP"
BatchNoPrefixExport = "EXP"
BatchNoPrefixSimWarningConfig = "SWC" BatchNoPrefixSimWarningConfig = "SWC"
BatchNoPrefixTrafficCutoffConfig = "TCC" BatchNoPrefixTrafficCutoffConfig = "TCC"
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+4 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
@@ -30,6 +30,9 @@ const (
QueueBalanceRechargeDelay = "iotlcm.balance.recharge.delay" QueueBalanceRechargeDelay = "iotlcm.balance.recharge.delay"
QueuePackageCustomerSync = "iotlcm.package_customer.sync" QueuePackageCustomerSync = "iotlcm.package_customer.sync"
QueueChannelRefresh = "iotlcm.channel.refresh" QueueChannelRefresh = "iotlcm.channel.refresh"
// QueueDataReviewQuery carries the manual "sync upstream result" command.
// Worker only re-reads existing operationIds/jobIds, never resubmits.
QueueDataReviewQuery = "iotlcm.data.review.query"
QueueAgentRoleSync = "iotlcm.agent.role.sync" QueueAgentRoleSync = "iotlcm.agent.role.sync"
QueueAgentRoleSyncRetry = "iotlcm.agent.role.sync.retry" QueueAgentRoleSyncRetry = "iotlcm.agent.role.sync.retry"
QueueAgentRoleSyncDeadLetter = "iotlcm.agent.role.sync.dlq" QueueAgentRoleSyncDeadLetter = "iotlcm.agent.role.sync.dlq"
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts // Package consts
// @Link https://github.com/xiujiecn/xiu-admin // @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie // @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn> // @Author Lxj <xxx@example.com>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE // @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package consts package consts
@@ -8,12 +8,16 @@ import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
) )
func (c *ControllerV1) DeptExport(ctx context.Context, req *v1.DeptExportReq) (*v1.DeptExportRes, error) {
return &v1.DeptExportRes{}, service.AgentDept().DeptExport(ctx, &req.AgentDeptListParam)
}
func (c *ControllerV1) DeptList(ctx context.Context, req *v1.DeptListReq) (res *v1.DeptListRes, err error) { func (c *ControllerV1) DeptList(ctx context.Context, req *v1.DeptListReq) (res *v1.DeptListRes, err error) {
data, total, err := service.AgentDept().DeptList(ctx, &req.AgentDeptListParam) data, total, err := service.AgentDept().DeptList(ctx, &req.AgentDeptListParam)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &v1.DeptListRes{PageResult: response.PageResult{Page: 1, PageSize: 5000, Total: total}, Data: data}, nil return &v1.DeptListRes{PageResult: response.PageResult{Page: req.Page, PageSize: req.PageSize, Total: total}, Data: data}, nil
} }
func (c *ControllerV1) DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, err error) { func (c *ControllerV1) DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, err error) {
@@ -8,6 +8,10 @@ import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
) )
func (c *ControllerV1) UserExport(ctx context.Context, req *v1.UserExportReq) (*v1.UserExportRes, error) {
return &v1.UserExportRes{}, service.AgentUser().UserExport(ctx, &req.AgentUserListParam)
}
func (c *ControllerV1) UserList(ctx context.Context, req *v1.UserListReq) (res *v1.UserListRes, err error) { func (c *ControllerV1) UserList(ctx context.Context, req *v1.UserListReq) (res *v1.UserListRes, err error) {
data, total, err := service.AgentUser().UserList(ctx, &req.AgentUserListParam) data, total, err := service.AgentUser().UserList(ctx, &req.AgentUserListParam)
if err != nil { if err != nil {
@@ -51,3 +51,13 @@ func (c *ControllerV1) BatchExecutionLogDetailList(ctx context.Context, req *v1.
res.PageResult.Total = totalCount res.PageResult.Total = totalCount
return return
} }
func (c *ControllerV1) BatchExecutionLogSyncReview(ctx context.Context, req *v1.BatchExecutionLogSyncReviewReq) (res *v1.BatchExecutionLogSyncReviewRes, err error) {
data, err := service.CommonBatchExecutionLog().SyncReview(ctx, &req.BatchExecutionLogSyncReviewParam)
if err != nil {
return
}
res = new(v1.BatchExecutionLogSyncReviewRes)
res.BatchExecutionLogSyncReviewModel = data
return
}

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