chore: 初始开源发布

iotlcm-admin-svr:管理后台服务。

- Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件)
- 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、
  MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位;
  私网 IP → 文档地址段;库名 xiujie_admin → iotlcm
- 真实手机号/邮箱 → 合法 11 位编造号 / example.com
- 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、
  私有依赖 go get 行、明文 registry 登录口令
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- Dockerfile 改用公共基础镜像
- 拼错的 RADEME.md → README.md,README 重写
- 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用
- 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes

数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
This commit is contained in:
MiFaZhan
2026-10-23 14:46:05 +08:00
commit 59eb34976a
1132 changed files with 138197 additions and 0 deletions
@@ -0,0 +1,168 @@
// Package model contains SIM flow package pricing API models.
package model
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"github.com/gogf/gf/v2/os/gtime"
)
type TSimFlowPackagePriceAgentTreeParam struct{}
type TSimFlowPackagePriceAgentTreeRes struct {
Items []*SysDeptTreeModel `json:"items" dc:"代理/公司树"`
}
// TSimFlowPackagePriceAgentPackagePriceListParam 查询指定下级代理套餐生效定价参数
type TSimFlowPackagePriceAgentPackagePriceListParam struct {
request.PageInfo
TargetAgentId int64 `json:"targetAgentId" dc:"指定下级代理ID"`
PackageCode string `json:"packageCode" dc:"套餐编码(可选)"`
PackageName string `json:"packageName" dc:"套餐名称(可选)"`
}
func (in *TSimFlowPackagePriceAgentPackagePriceListParam) Filter(ctx context.Context) (err error) {
return
}
type TSimFlowPackagePriceAgentDefaultPackagePriceSaveItem struct {
PriceSource string `json:"priceSource" dc:"价格来源:system/agentDefault"`
AgentDefaultPriceId int64 `json:"agentDefaultPriceId" dc:"本级默认定价ID"`
PackageCode string `json:"packageCode" dc:"套餐编码"`
AgentCostRatio float64 `json:"agentCostRatio" dc:"渠道成本系数"`
AgentCostProfit float64 `json:"agentCostProfit" dc:"渠道利润"`
TerminalCostRatio float64 `json:"terminalCostRatio" dc:"终端成本系数"`
TerminalCostProfit float64 `json:"terminalCostProfit" dc:"终端利润"`
Remark string `json:"remark" dc:"备注"`
}
type TSimFlowPackagePriceAgentPackagePriceSaveItem struct {
PriceSource string `json:"priceSource" dc:"价格来源:system/agentDefault/target"`
TargetPriceId int64 `json:"targetPriceId" dc:"下级专属定价ID"`
AgentDefaultPriceId int64 `json:"agentDefaultPriceId" dc:"本级默认定价ID"`
PackageCode string `json:"packageCode" dc:"套餐编码"`
AgentCostRatio float64 `json:"agentCostRatio" dc:"渠道成本系数"`
AgentCostProfit float64 `json:"agentCostProfit" dc:"渠道利润"`
TerminalCostRatio float64 `json:"terminalCostRatio" dc:"终端成本系数"`
TerminalCostProfit float64 `json:"terminalCostProfit" dc:"终端利润"`
Remark string `json:"remark" dc:"备注"`
}
type TSimFlowPackagePriceAgentDefaultPackagePriceSaveParam struct {
Items []*TSimFlowPackagePriceAgentDefaultPackagePriceSaveItem `json:"items" dc:"保存项"`
}
func (in *TSimFlowPackagePriceAgentDefaultPackagePriceSaveParam) Filter(ctx context.Context) (err error) {
return
}
type TSimFlowPackagePriceAgentDefaultPackagePriceInheritItem struct {
AgentDefaultPriceId int64 `json:"agentDefaultPriceId" dc:"本级默认定价ID"`
PackageCode string `json:"packageCode" dc:"套餐编码"`
}
type TSimFlowPackagePriceAgentDefaultPackagePriceInheritParam struct {
Items []*TSimFlowPackagePriceAgentDefaultPackagePriceInheritItem `json:"items" dc:"承袭项"`
}
func (in *TSimFlowPackagePriceAgentDefaultPackagePriceInheritParam) Filter(ctx context.Context) (err error) {
return
}
type TSimFlowPackagePriceAgentPackagePriceSaveParam struct {
TargetAgentId int64 `json:"targetAgentId" dc:"指定下级代理ID"`
Items []*TSimFlowPackagePriceAgentPackagePriceSaveItem `json:"items" dc:"保存项"`
}
func (in *TSimFlowPackagePriceAgentPackagePriceSaveParam) Filter(ctx context.Context) (err error) {
return
}
type TSimFlowPackagePriceAgentPackagePriceInheritItem struct {
TargetPriceId int64 `json:"targetPriceId" dc:"下级专属定价ID"`
PackageCode string `json:"packageCode" dc:"套餐编码"`
}
type TSimFlowPackagePriceAgentPackagePriceInheritParam struct {
TargetAgentId int64 `json:"targetAgentId" dc:"指定下级代理ID"`
Items []*TSimFlowPackagePriceAgentPackagePriceInheritItem `json:"items" dc:"承袭项"`
}
func (in *TSimFlowPackagePriceAgentPackagePriceInheritParam) Filter(ctx context.Context) (err error) {
return
}
// TSimFlowPackagePriceAgentPackagePriceListItem 查询指定下级代理套餐生效定价响应项
type TSimFlowPackagePriceAgentPackagePriceListItem struct {
TargetAgentId int64 `json:"targetAgentId" dc:"目标代理ID"`
PackageCode string `json:"packageCode" dc:"套餐编码"`
PackageName string `json:"packageName" dc:"套餐名称"`
AgentDefaultPriceId int64 `json:"agentDefaultPriceId" dc:"本级默认定价ID,没有则为0"`
TargetPriceId int64 `json:"targetPriceId" dc:"本级对当前下级代理的专属定价ID,没有则为0"`
PriceSource string `json:"priceSource" dc:"价格来源:system-系统级/agentDefault-本级默认/target-下级专属"`
AgentCost float64 `json:"agentCost" dc:"代理成本"`
TerminalCost float64 `json:"terminalCost" dc:"终端成本"`
AgentCostRatio float64 `json:"agentCostRatio" dc:"代理成本系数"`
AgentCostProfit float64 `json:"agentCostProfit" dc:"渠道利润"`
AgentShipmentPrice float64 `json:"agentShipmentPrice" dc:"渠道出货价"`
TerminalCostRatio float64 `json:"terminalCostRatio" dc:"终端成本系数"`
TerminalCostProfit float64 `json:"terminalCostProfit" dc:"终端利润"`
TerminalSalePrice float64 `json:"terminalSalePrice" dc:"终端售价"`
Remark string `json:"remark" dc:"备注"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
type TSimFlowPackagePriceAgentDefaultPackagePriceListParam struct {
request.PageInfo
PackageCode string `json:"packageCode" dc:"套餐编码(可选)"`
PackageName string `json:"packageName" dc:"套餐名称(可选)"`
}
func (in *TSimFlowPackagePriceAgentDefaultPackagePriceListParam) Filter(ctx context.Context) (err error) {
return
}
// TSimFlowPackagePriceAgentDefaultPackagePriceListItem 查询本级默认套餐定价响应项
type TSimFlowPackagePriceAgentDefaultPackagePriceListItem struct {
PackageCode string `json:"packageCode" dc:"套餐编码"`
PackageName string `json:"packageName" dc:"套餐名称"`
AgentDefaultPriceId int64 `json:"agentDefaultPriceId" dc:"本级默认定价ID,没有则为0"`
PriceSource string `json:"priceSource" dc:"价格来源:system-系统级/agentDefault-本级默认"`
AgentCost float64 `json:"agentCost" dc:"代理成本"`
TerminalCost float64 `json:"terminalCost" dc:"终端成本"`
AgentCostRatio float64 `json:"agentCostRatio" dc:"渠道成本系数"`
AgentCostProfit float64 `json:"agentCostProfit" dc:"渠道利润"`
AgentShipmentPrice float64 `json:"agentShipmentPrice" dc:"渠道出货价"`
TerminalCostRatio float64 `json:"terminalCostRatio" dc:"终端成本系数"`
TerminalCostProfit float64 `json:"terminalCostProfit" dc:"终端利润"`
TerminalSalePrice float64 `json:"terminalSalePrice" dc:"终端售价"`
Remark string `json:"remark" dc:"备注"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
type TSimFlowPackagePriceAgentDefaultPackagePricePackageItem struct {
PackageCode string `json:"packageCode"`
PackageName string `json:"packageName"`
CostPrice float64 `json:"costPrice"`
TerminalCost float64 `json:"terminalCost"`
SysDefaultRatio float64 `json:"sysDefaultRatio"`
SysDefaultProfit float64 `json:"sysDefaultProfit"`
SysDefaultTerminalRatio float64 `json:"sysDefaultTerminalRatio"`
SysDefaultTerminalProfit float64 `json:"sysDefaultTerminalProfit"`
}
type TSimFlowPackagePriceAgentDefaultPackagePriceRecord struct {
Id int64 `json:"id"`
PackageCode string `json:"packageCode"`
AgentCostRatio float64 `json:"agentCostRatio"`
AgentCostProfit float64 `json:"agentCostProfit"`
UserCostRatio float64 `json:"userCostRatio"`
UserCostProfit float64 `json:"userCostProfit"`
Remark string `json:"remark"`
UpdatedAt *gtime.Time `json:"updatedAt"`
}