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
+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 {
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)
DeptView(ctx context.Context, req *v1.DeptViewReq) (res *v1.DeptViewRes, 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
}
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 {
response.PageResult
Data []*model.AgentEnterpriseCustomerModel `json:"items"`
+7
View File
@@ -12,6 +12,13 @@ type UserListReq struct {
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 {
response.PageResult
Data []*model.AgentUserListModel `json:"items"`
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tagententerprise
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tagententerprise
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tapi
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tapi
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tcustwithdrawaccount
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
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)
BatchMainList(ctx context.Context, req *v1.BatchMainListReq) (res *v1.BatchMainListRes, 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)
BatchMainExport(ctx context.Context, req *v1.BatchMainExportReq) (res *v1.BatchMainExportRes, 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)
TMessageLogEdit(ctx context.Context, req *v1.TMessageLogEditReq) (res *v1.TMessageLogEditRes, 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)
TNotifyLogExport(ctx context.Context, req *v1.TNotifyLogExportReq) (res *v1.TNotifyLogExportRes, err error)
TNotifyLogView(ctx context.Context, req *v1.TNotifyLogViewReq) (res *v1.TNotifyLogViewRes, err error)
@@ -35,3 +35,12 @@ type BatchExecutionLogDetailListRes struct {
response.PageResult
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
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //batchmain
@@ -34,6 +34,14 @@ type BatchMainSuccessListRes struct {
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 {
g.Meta `path:"/batchMain/cards" method:"get" tags:"批次主表" summary:"批次卡清单" x-check-permission:"cpm:common:batchMain:cards"`
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
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tagentbalance
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tbalancedetail
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tbalancedetail
@@ -1,7 +1,7 @@
// Package tconsumeaccountmonthbill
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tconsumeaccountmonthbill
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tcreditdetail
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tcreditdetail
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tdivisioncode
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @Autoioterate Version
package v1 //tdivisioncode
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfinanceapply
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tfinanceapply
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfinanceauditrecord
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tfinanceauditrecord
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tfincommissiondetail
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tfincommissiondetail
@@ -1,7 +1,7 @@
// Package tfinwithdrawablechange
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tfinwithdrawablechange
+29 -1
View File
@@ -1,7 +1,7 @@
// Package tmessagelog
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tmessagelog
@@ -57,3 +57,31 @@ type TMessageLogDeleteReq 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
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tnotifylog
@@ -1,7 +1,7 @@
// Package tprofitaccountmonthbill
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tprofitaccountmonthbill
+1 -1
View File
@@ -1,7 +1,7 @@
// Package twocommunication
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //twocommunication
+1 -1
View File
@@ -1,7 +1,7 @@
// Package twomain
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //twomain
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tworecord
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tworecord
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package testdemo
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //testdemo
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+7
View File
@@ -83,6 +83,13 @@ type IIotV1 interface {
TSimCardInfoSyncSimCardStatusQueue(ctx context.Context, req *v1.TSimCardInfoSyncSimCardStatusQueueReq) (res *v1.TSimCardInfoSyncSimCardStatusQueueRes, 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)
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)
TSimCardOutboundExcelSubmit(ctx context.Context, req *v1.TSimCardOutboundExcelSubmitReq) (res *v1.TSimCardOutboundExcelSubmitRes, 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
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tflowpackageconfig
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tflowpackageconfig
+1 -1
View File
@@ -1,7 +1,7 @@
// Package torder
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //torder
+2 -1
View File
@@ -18,7 +18,8 @@ type TSimCardAllocateExcelTemplateReq struct {
type TSimCardAllocateExcelTemplateRes struct{}
type TSimCardAllocateTargetListRes struct {
Items []*model.TSimCardAllocateTargetModel `json:"items" dc:"目标客户列表"`
MaxInputRows int `json:"maxInputRows" dc:"单次批量输入条数上限"`
Items []*model.TSimCardAllocateTargetModel `json:"items" dc:"目标客户列表"`
}
type TSimCardAllocateInputPrepareReq struct {
+2 -2
View File
@@ -1,7 +1,7 @@
// Package tsimcardinfo
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimcardinfo
@@ -15,7 +15,7 @@ import (
// ListReq 查询卡信息表列表
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
}
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimcardstock
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimcardstock
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimchannels
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimchannels
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimchanneltemplate
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimchanneltemplate
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimdiagnose
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimdiagnose
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpackageinfo
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimflowpackageinfo
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpackageprice
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimflowpackageprice
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimflowpool
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimflowpool
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimpackagecategory
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimpackagecategory
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimpoolwarnconfig
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimpoolwarnconfig
+1 -1
View File
@@ -1,7 +1,7 @@
// Package tsimupstreampackage
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //tsimupstreampackage
+5 -5
View File
@@ -7,21 +7,21 @@ import (
)
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"`
}
type TSimWarningConfigExcelTemplateRes 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
}
type TSimWarningConfigEmailCodeRes 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
}
@@ -30,7 +30,7 @@ type TSimWarningConfigExcelSubmitRes 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
}
@@ -39,7 +39,7 @@ type TSimWarningConfigInputSubmitRes 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
}
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package sysnoticeuser
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //sysnoticeuser
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package v1
+1 -1
View File
@@ -1,7 +1,7 @@
// Package ttplatformsetting
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package v1 //ttplatformsetting
+1 -1
View File
@@ -1,7 +1,7 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @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
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
@@ -8,7 +9,10 @@ ENV CGO_ENABLED=1
ENV GOOS=linux
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
@@ -29,7 +33,7 @@ RUN set -euxo pipefail && \
-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
@@ -39,6 +43,6 @@ EXPOSE 13100
WORKDIR /app
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"]
@@ -1,7 +1,7 @@
# config.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin
# @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
# 系统配置
system:
@@ -79,7 +79,7 @@ database:
level: "all"
stdout: true
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 #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写)
@@ -87,9 +87,9 @@ database:
maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
memorydb:
# link: "sqlite::@file(jieiotmem.db)?journal_mode=WAL"
link: "sqlite::@file(:memory:)"
# link: ""
# link: "${DB_DSN}"
link: "${DB_DSN}"
# link: "${DB_DSN}"
debug: true
maxIdle: 1
maxOpen: 1
@@ -106,9 +106,9 @@ redis:
default:
mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称
address: 172.17.0.1:6379
address: 127.0.0.1:6379
db: 0
pass: "${REDIS_PASSWORD}"
pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数
@@ -1,7 +1,7 @@
# config.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin
# @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
# 系统配置
system:
@@ -86,9 +86,9 @@ register:
email:
host: "smtp.exmail.qq.com"
port: 465
username: "iotlcm@example.com"
password: "JH8DaDFxJuzFRLyB"
from: "iotlcm@example.com"
username: "${SERVICE_USERNAME}"
password: "${SERVICE_PASSWORD}"
from: "xxx@example.com"
fromName: "物联卡管理平台"
subject: "注册验证码"
bodyTemplate: "您的注册验证码是:{code},6小时内有效。"
@@ -112,20 +112,20 @@ warning:
# 阿里云 serviceType=1,腾讯云 serviceType=2。
serviceType: ""
regionId: ""
accessKeyId: ""
accessKeySecret: ""
sdkAppId: ""
signName: ""
templateId: ""
accessKeyId: "${ACCESS_KEY_ID}"
accessKeySecret: "${ACCESS_KEY_SECRET}"
sdkAppId: "${SDK_APP_ID}"
signName: "${SMS_SIGN_NAME}"
templateId: "${TEMPLATE_ID}"
# 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。
# 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。
msgContentTemplate: ""
# 长期建议:短信平台签名、模板和密钥由短信微服务自行处理,lcm 只传手机号和聚合内容。
wechat:
enabled: false
appId: "wx9e26905702c1a372"
appSecret: ""
templateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY"
appId: "${APP_ID}"
appSecret: "${APP_SECRET}"
templateId: "${TEMPLATE_ID}"
page: "pages/message/index"
timeout: "5s"
@@ -136,7 +136,7 @@ database:
level: "all"
stdout: true
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 #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写)
@@ -144,9 +144,9 @@ database:
maxOpen: 100 #连接池最大打开的连接数
maxLifetime: 120 #(单位秒)连接对象可重复使用的时间长度
memorydb:
# link: "sqlite::@file(jieiotmem.db)?journal_mode=WAL"
link: "sqlite::@file(:memory:)"
# link: ""
# link: "${DB_DSN}"
link: "${DB_DSN}"
# link: "${DB_DSN}"
debug: true
maxIdle: 1
maxOpen: 1
@@ -163,9 +163,9 @@ redis:
default:
mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "iotlcm-master" #哨兵模式主节点名称
address: 192.0.2.29:6379
address: 127.0.0.1:6379
db: 0
pass: "${REDIS_PASSWORD}"
pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数
@@ -174,18 +174,18 @@ redis:
rabbitmq:
enabled: true
# 示例:amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/
# dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/"
dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/"
# 示例:amqp://guest:guest@127.0.0.1:5672/
# dsn: "${SERVICE_DSN}"
dsn: "${SERVICE_DSN}"
tsdb:
database: "TdEngine" #可选择 TdEngine、Influxdb
tdengine:
# type: "taosRestful" #http连接方式,端口是6041
# dsn: "root:taosdata@http(127.0.0.1:6041)/"
# dsn: "${SERVICE_DSN}"
type: "taosWS" #websocket连接方式,端口是6041
# dsn: "root:taosdata@ws(127.0.0.1:6041)/"
dsn: "root:sdyz2026__@ws(192.0.2.29:6041)/"
# dsn: "${SERVICE_DSN}"
dsn: "${SERVICE_DSN}"
dbName: "iotlcm"
maxOpenConns: 100
maxIdleConns: 10
@@ -205,8 +205,8 @@ router:
# 生成代码
alipay:
appId: "9021000165668942"
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"
appId: "${APP_ID}"
privateKey: "${PRIVATE_KEY}"
alipayPublicKey: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8Df1EPFkA2xy8NgF0UdRYxsshslUi2XSGTG01oQKsrYNB+rhAw9MJdMlunVQxSrBZsw5N7htXGdiTceaLo/n8Wuibp0cRHdErJSp9GhP4pW2IR3FoCCPYlJlyiCUR/NInI3XMai0UdjgiPX03bvYLRAKE8lLiOSgxNagQmOFLmQYRYfFhGbxDe98XMg83YdSWvZKrlM+vzgk8/aPgq7BFLpbRKqLvd8OXXBHDCaWMSSGwCN0whhdEiwbIhSVgwTgkhWXUuNDmT741/+7D46djp8wX/84SDts0fWb63/in9ATTGtNivJX7HPDyqrmcN2iUi5xFHS9XwYBdT4yu/xFQwIDAQAB"
notifyUrl: "https://evolution-starless-municipal.ngrok-free.dev/api/v1/pay/alipay/notify"
returnUrl: "http://localhost:5666/enterpriseManagement/tBalanceDetail/tAgentBalance"
+22 -16
View File
@@ -1,7 +1,7 @@
# config_default.yaml 配置文件
# @Link https://github.com/xiujiecn/xiu-admin
# @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
# 系统配置
system:
@@ -78,6 +78,12 @@ warning:
firstWarnDays: 30
secondWarnDays: 15
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:
enabled: false
# HTTP 接口地址;如果配置 grpcAddr,则优先走 gRPC。
@@ -89,11 +95,11 @@ warning:
# 阿里云 serviceType=1,腾讯云 serviceType=2。
serviceType: ""
regionId: ""
accessKeyId: ""
accessKeySecret: ""
sdkAppId: ""
signName: ""
templateId: ""
accessKeyId: "${ACCESS_KEY_ID}"
accessKeySecret: "${ACCESS_KEY_SECRET}"
sdkAppId: "${SDK_APP_ID}"
signName: "${SMS_SIGN_NAME}"
templateId: "${TEMPLATE_ID}"
# 阿里云模板参数通常需要 JSON;如果预警模板变量名是 content,可配置为 '{"content":{contentJson}}'。
# 腾讯云多参数模板可按实际顺序配置,例如 '{firstItem}|{count}'。
msgContentTemplate: ""
@@ -101,22 +107,22 @@ warning:
wechat:
enabled: false
appId: "wx9e26905702c1a372"
appSecret: ""
templateId: "DMDP2PKktdtG1ES_3Ic1JcR0LGELQmWE6LunYyerHCY"
appId: "${APP_ID}"
appSecret: "${APP_SECRET}"
templateId: "${TEMPLATE_ID}"
page: "pages/message/index"
timeout: "5s"
database:
legacyCard:
link: ""
link: "${DB_DSN}"
debug: false
logger:
path: "/app/logs/sql"
level: "all"
stdout: true
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 #开启调试模式
charset: "utf8mb4" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312),一般设置为utf8mb4。默认为utf8。
dryRun: false #ORM空跑(只读不写)
@@ -134,10 +140,10 @@ redis:
# 单实例配置
default:
mode: "single" #redis模式,支持:single|cluster|sentinel
sentinelMasterName: "${REDIS_SENTINEL_MASTER}" #哨兵模式主节点名称
address: 192.0.2.200:6379
sentinelMasterName: "xiujie-master" #哨兵模式主节点名称
address: 127.0.0.1:6379
db: 0
pass: "${REDIS_PASSWORD}"
pass: "${SERVICE_PASSWORD}"
minIdle: 5 #最小空闲连接数
maxIdle: 30 #允许闲置的最大连接数
maxActive: 5000 #最大活跃连接数
@@ -149,9 +155,9 @@ queue:
type: "asynq" # 队列类型
asynq:
redis:
address: 192.0.2.200:6379
address: 127.0.0.1:6379
db: 0
pass: "${REDIS_PASSWORD}"
pass: "${SERVICE_PASSWORD}"
user:
concurrency: 10 # 最大同时执行的任务数量
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/shirou/gopsutil/v3 v3.24.5
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/xuri/excelize/v2 v2.9.0
go.opentelemetry.io/otel v1.38.0
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
golang.org/x/net v0.40.0
golang.org/x/sync v0.14.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
)
@@ -70,8 +75,6 @@ require (
github.com/smartwalle/ngx v1.1.0 // indirect
github.com/smartwalle/nsign v1.0.9 // 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/numcpus v0.6.1 // 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/image v0.23.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/text v0.25.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/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
+2 -2
View File
@@ -4,7 +4,7 @@
gfcli:
gen:
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_*"
descriptionTag: true # 数据表字段注释
noModelComment: true
@@ -16,4 +16,4 @@ gfcli:
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:
- my.image.pub/my-app
- my.image.pub/my-app
+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
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
create_docker_iotlcmadmin:
@@ -102,6 +102,3 @@ mod:
dockerbuild: create_docker_iotlcmadmin
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
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package cmd
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package cmd
+9
View File
@@ -3,6 +3,7 @@ package cmd
import (
"context"
"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/websocket"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/router"
@@ -17,11 +18,19 @@ import (
func init() {
inithttp.RegisterHttpInitFunc("initJobTask", initJobTask)
inithttp.RegisterHttpInitFunc("exportCenter", initExportCenter)
inithttp.RegisterHttpCleanupFunc("rabbitmq", func(ctx context.Context) error {
return rabbitmq.Close()
})
}
// initExportCenter 导出中心:补偿上次进程遗留的任务,并启动过期文件清理。
func initExportCenter(ctx context.Context) error {
exportcenter.RecoverOnStart(ctx)
exportcenter.StartCleanup(ctx)
return nil
}
var Http = &gcmd.Command{
Name: "http",
Usage: "http",
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package cmd
+1 -1
View File
@@ -1,7 +1,7 @@
// Package cmd
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package cmd
+10 -4
View File
@@ -7,6 +7,7 @@ const (
BatchAsyncStatusSuccess = 3
BatchAsyncStatusFailed = 4
BatchAsyncStatusPartialSuccess = 5
BatchAsyncStatusReview = 6
)
const (
@@ -15,6 +16,7 @@ const (
BatchRunResultSuccess = 2
BatchRunResultFailed = 3
BatchRunResultPartialSuccess = 4
BatchRunResultReview = 5
)
const (
@@ -23,10 +25,12 @@ const (
)
const (
BatchDetailStatusPending = 0
BatchDetailStatusRunning = 1
BatchDetailStatusSuccess = 2
BatchDetailStatusFailed = 3
BatchDetailStatusPending = 0
BatchDetailStatusRunning = 1
BatchDetailStatusSuccess = 2
BatchDetailStatusFailed = 3
BatchDetailStatusUnknown = 4
BatchDetailStatusNotExecuted = 5
)
const (
@@ -44,6 +48,7 @@ const (
BatchTypePrepare = 4
BatchTypeCardAddPackage = 11
BatchTypePoolAddPackage = 12
BatchTypeExport = 14 // 数据导出(仅写执行日志,不出现在批次管理页)
BatchTypeSimWarningConfig = 40
BatchTypeTrafficCutoffConfig = 41
@@ -65,6 +70,7 @@ const (
BatchNoPrefixAllocate = "ALC"
BatchNoPrefixCardAddPackage = "ADP"
BatchNoPrefixPoolAddPackage = "PAP"
BatchNoPrefixExport = "EXP"
BatchNoPrefixSimWarningConfig = "SWC"
BatchNoPrefixTrafficCutoffConfig = "TCC"
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+7 -4
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
@@ -30,9 +30,12 @@ const (
QueueBalanceRechargeDelay = "iotlcm.balance.recharge.delay"
QueuePackageCustomerSync = "iotlcm.package_customer.sync"
QueueChannelRefresh = "iotlcm.channel.refresh"
QueueAgentRoleSync = "iotlcm.agent.role.sync"
QueueAgentRoleSyncRetry = "iotlcm.agent.role.sync.retry"
QueueAgentRoleSyncDeadLetter = "iotlcm.agent.role.sync.dlq"
// 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"
QueueAgentRoleSyncRetry = "iotlcm.agent.role.sync.retry"
QueueAgentRoleSyncDeadLetter = "iotlcm.agent.role.sync.dlq"
)
// 数据库变动类型
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
+1 -1
View File
@@ -1,7 +1,7 @@
// Package consts
// @Link https://github.com/xiujiecn/xiu-admin
// @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
package consts
@@ -8,12 +8,16 @@ import (
"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) {
data, total, err := service.AgentDept().DeptList(ctx, &req.AgentDeptListParam)
if err != nil {
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) {
@@ -8,6 +8,10 @@ import (
"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) {
data, total, err := service.AgentUser().UserList(ctx, &req.AgentUserListParam)
if err != nil {
@@ -51,3 +51,13 @@ func (c *ControllerV1) BatchExecutionLogDetailList(ctx context.Context, req *v1.
res.PageResult.Total = totalCount
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
}
@@ -1,7 +1,7 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package common
@@ -69,6 +69,12 @@ func (c *ControllerV1) BatchMainCards(ctx context.Context, req *v1.BatchMainCard
return
}
// ExportWarehousing 导出入库批次列表(数据与入库管理页一致)
func (c *ControllerV1) BatchMainExportWarehousing(ctx context.Context, req *v1.BatchMainExportWarehousingReq) (res *v1.BatchMainExportWarehousingRes, err error) {
err = service.CommonBatchMain().ExportWarehousing(ctx, &req.BatchMainSuccessListParam)
return
}
// Export 导出批次主表列表
func (c *ControllerV1) BatchMainExport(ctx context.Context, req *v1.BatchMainExportReq) (res *v1.BatchMainExportRes, err error) {
err = service.CommonBatchMain().Export(ctx, &req.BatchMainListParam)
@@ -0,0 +1,49 @@
package common
import (
"context"
v1 "git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/common/v1"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
)
func (c *ControllerV1) DownloadCenterList(ctx context.Context, req *v1.DownloadCenterListReq) (res *v1.DownloadCenterListRes, err error) {
list, totalCount, err := service.CommonDownloadCenter().List(ctx, &req.DownloadCenterListParam)
if err != nil {
return
}
if list == nil {
list = []*model.DownloadCenterListModel{}
}
res = new(v1.DownloadCenterListRes)
res.Items = list
res.PageResult.Page = req.Page
res.PageResult.PageSize = req.PageSize
res.PageResult.Total = totalCount
return
}
func (c *ControllerV1) DownloadCenterRecent(ctx context.Context, req *v1.DownloadCenterRecentReq) (res *v1.DownloadCenterRecentRes, err error) {
data, err := service.CommonDownloadCenter().Recent(ctx, &req.DownloadCenterRecentParam)
if err != nil {
return
}
res = new(v1.DownloadCenterRecentRes)
res.DownloadCenterRecentModel = data
return
}
func (c *ControllerV1) DownloadCenterDownload(ctx context.Context, req *v1.DownloadCenterDownloadReq) (res *v1.DownloadCenterDownloadRes, err error) {
if err = service.CommonDownloadCenter().Download(ctx, &req.DownloadCenterTaskParam); err != nil {
return nil, err
}
return nil, nil
}
func (c *ControllerV1) DownloadCenterRemove(ctx context.Context, req *v1.DownloadCenterRemoveReq) (res *v1.DownloadCenterRemoveRes, err error) {
if err = service.CommonDownloadCenter().Remove(ctx, &req.DownloadCenterTaskParam); err != nil {
return nil, err
}
return new(v1.DownloadCenterRemoveRes), nil
}
@@ -1,7 +1,7 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package common
@@ -1,7 +1,7 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package common
@@ -1,7 +1,7 @@
// Package gen
// @Link https://github.com/xiujiecn/xiu-admin
// @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
// @AutoGenerate Version
package common

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