2ed5dfa6a1
iotlcm-app:小程序端 + 用户端服务。 - app/:uni-app 小程序前端(基于 unibest,MIT) - 微信 AppID → YOUR_WX_APPID,uni-app AppID → __UNI__YOURAPPID - 内网后端地址 → admin.iotlcm.example.com - 应用标题与 unibest 模板 README 重写(保留上游致谢与 MIT 声明) - server/:GoFrame 用户端服务(基于 XiuAdmin,Apache-2.0) - module xiuadmin → git.5iot.com/iotlcm-public/iotlcm-app(360 文件) - 支付回调地址 → app.iotlcm.example.com,商户名与应用名泛化 - 真实手机号 → 合法 11 位编造号(保留号段前 3 位 + 后 4 位) - 依赖号码尾部的断言同步更新 - 补 server/LICENSE(Apache-2.0) - 移除内部资产:CI 触发器 - 补根 README,LF 行尾 + .gitattributes 已知:TestSysDept_RefreshDeptAncestors 在源仓同一提交上同样失败,属既有缺陷。
135 lines
8.3 KiB
Go
135 lines
8.3 KiB
Go
package model
|
|
|
|
import (
|
|
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
|
|
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
)
|
|
|
|
type AppWarningConfigListParam struct {
|
|
request.PageInfo
|
|
CardValue string `json:"cardValue" form:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
}
|
|
|
|
type AppWarningConfigSaveParam struct {
|
|
CardValue string `json:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
WarnUnit int `json:"warnUnit" v:"required#请选择预警类型" dc:"预警单位:1MB"`
|
|
FirstWarn float64 `json:"firstWarn" v:"required#第一档阈值不能为空" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" dc:"第三档预警阈值"`
|
|
IsEnabled *int `json:"isEnabled" dc:"是否启用:1启用,0停用"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
type AppWarningConfigBatchSaveParam struct {
|
|
CardValues []string `json:"cardValues" v:"required#请选择需要配置预警的卡片" dc:"卡号标识列表"`
|
|
Configs []*AppWarningConfigBatchItemParam `json:"configs" v:"required#请至少填写一项预警配置" dc:"预警配置列表"`
|
|
}
|
|
|
|
type AppWarningConfigBatchItemParam struct {
|
|
WarnUnit int `json:"warnUnit" v:"required#请选择预警类型" dc:"预警单位:1MB"`
|
|
FirstWarn float64 `json:"firstWarn" v:"required#第一档阈值不能为空" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" dc:"第三档预警阈值"`
|
|
IsEnabled *int `json:"isEnabled" dc:"是否启用:1启用,0停用"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
type AppWarningConfigNotifyParam struct {
|
|
CardValue string `json:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
WarnUnit int `json:"warnUnit" dc:"预警单位:1MB"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" v:"required#请选择是否开启小程序预警通知" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
}
|
|
|
|
type AppWarningConfigBatchNotifyParam struct {
|
|
CardValues []string `json:"cardValues" v:"required#请选择需要配置预警的卡片" dc:"卡号标识列表"`
|
|
WarnUnit int `json:"warnUnit" dc:"预警单位:1MB"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" v:"required#请选择是否开启小程序预警通知" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
}
|
|
|
|
type AppWarningConfigModel struct {
|
|
Id int64 `json:"id" orm:"id" dc:"主键ID"`
|
|
ItemType int `json:"itemType" orm:"item_type" dc:"对象类型:1单卡"`
|
|
ItemId int64 `json:"itemId" orm:"item_id" dc:"对象ID"`
|
|
ItemCode string `json:"itemCode" orm:"item_code" dc:"对象编码快照"`
|
|
WarnType int `json:"warnType" dc:"运行时推导预警类型"`
|
|
WarnUnit int `json:"warnUnit" orm:"warn_unit" dc:"预警单位"`
|
|
WarnTitle string `json:"warnTitle" dc:"预警类型标题"`
|
|
UnitText string `json:"unitText" dc:"单位文本"`
|
|
FirstWarn float64 `json:"firstWarn" orm:"first_warn" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" orm:"second_warn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" orm:"third_warn" dc:"第三档预警阈值"`
|
|
AutoAction int `json:"autoAction" orm:"auto_action" dc:"自动动作"`
|
|
IsEnabled int `json:"isEnabled" orm:"is_enabled" dc:"是否启用"`
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" orm:"app_notify_enabled" dc:"是否开启小程序预警通知"`
|
|
WxTemplateId string `json:"wxTemplateId" orm:"wx_template_id" dc:"微信订阅消息模板ID"`
|
|
Remark string `json:"remark" orm:"remark" dc:"备注"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" dc:"更新时间"`
|
|
}
|
|
|
|
type AppWarningConfigListModel struct {
|
|
Card *AppCardModel `json:"card" dc:"卡片信息"`
|
|
Items []*AppWarningConfigModel `json:"items" dc:"预警配置列表"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigSaveModel struct {
|
|
Id int64 `json:"id" dc:"配置ID"`
|
|
Config *AppWarningConfigModel `json:"config" dc:"保存后的配置"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigBatchFailItem struct {
|
|
CardValue string `json:"cardValue" dc:"卡号标识"`
|
|
Reason string `json:"reason" dc:"失败原因"`
|
|
}
|
|
|
|
type AppWarningConfigMetaModel struct {
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知默认值"`
|
|
}
|
|
|
|
type AppWarningConfigBatchSaveModel struct {
|
|
BatchNo string `json:"batchNo" dc:"配置批次号"`
|
|
TotalCount int `json:"totalCount" dc:"提交卡数"`
|
|
SuccessCount int `json:"successCount" dc:"成功卡数"`
|
|
FailCount int `json:"failCount" dc:"失败卡数"`
|
|
FailItems []*AppWarningConfigBatchFailItem `json:"failItems" dc:"失败明细"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigNotifyModel struct {
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知"`
|
|
Config *AppWarningConfigModel `json:"config" dc:"更新后的预警配置"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigBatchNotifyModel struct {
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知"`
|
|
TotalCount int `json:"totalCount" dc:"提交卡数"`
|
|
SuccessCount int `json:"successCount" dc:"成功卡数"`
|
|
FailCount int `json:"failCount" dc:"失败卡数"`
|
|
FailItems []*AppWarningConfigBatchFailItem `json:"failItems" dc:"失败明细"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|