From fc9f819787f901dcc56826252f042ce38bce93f6 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 20 Apr 2026 15:39:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E7=AD=96=E7=95=A5=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E4=B8=BA=E5=85=88=E5=85=85=E5=80=BC=E5=90=8E=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=EF=BC=88after=5Forder=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- internal/model/device.go | 2 +- internal/model/device_import_task.go | 2 +- internal/model/iot_card.go | 2 +- internal/model/iot_card_import_task.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/model/device.go b/internal/model/device.go index 1da6f85..fe9167d 100644 --- a/internal/model/device.go +++ b/internal/model/device.go @@ -43,7 +43,7 @@ type Device struct { SoftwareVersion string `gorm:"column:software_version;type:varchar(100);not null;default:'';comment:固件版本号" json:"software_version"` SwitchMode string `gorm:"column:switch_mode;type:varchar(10);not null;default:'0';comment:切卡模式:0=自动 1=手动" json:"switch_mode"` LastGatewaySyncAt *time.Time `gorm:"column:last_gateway_sync_at;comment:最后一次 sync-info 同步时间" json:"last_gateway_sync_at,omitempty"` - RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'none';not null;comment:实名认证策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` + RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'after_order';not null;comment:实名认证策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` } // TableName 指定表名 diff --git a/internal/model/device_import_task.go b/internal/model/device_import_task.go index e6d1f63..01b7132 100644 --- a/internal/model/device_import_task.go +++ b/internal/model/device_import_task.go @@ -28,7 +28,7 @@ type DeviceImportTask struct { ErrorMessage string `gorm:"column:error_message;type:text;comment:错误信息" json:"error_message"` StartedAt *time.Time `gorm:"column:started_at;comment:开始处理时间" json:"started_at"` CompletedAt *time.Time `gorm:"column:completed_at;comment:完成时间" json:"completed_at"` - RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'none';not null;comment:导入批次实名策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` + RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'after_order';not null;comment:导入批次实名策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` } // TableName 指定表名 diff --git a/internal/model/iot_card.go b/internal/model/iot_card.go index 70038b6..cd675a3 100644 --- a/internal/model/iot_card.go +++ b/internal/model/iot_card.go @@ -54,7 +54,7 @@ type IotCard struct { VirtualNo string `gorm:"column:virtual_no;type:varchar(50);uniqueIndex:idx_iot_card_virtual_no,where:deleted_at IS NULL AND virtual_no IS NOT NULL AND virtual_no <> '';comment:虚拟号(可选,非空时全局唯一)" json:"virtual_no,omitempty"` DeviceVirtualNo string `gorm:"column:device_virtual_no;type:varchar(100);not null;default:'';comment:绑定设备的虚拟号快照(未绑定时为空字符串)" json:"device_virtual_no"` LastGatewayReadingMB float64 `gorm:"column:last_gateway_reading_mb;type:float;not null;default:0;comment:上次轮询时网关返回的流量读数(MB)" json:"last_gateway_reading_mb"` - RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'none';not null;comment:实名认证策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` + RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'after_order';not null;comment:实名认证策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` } // TableName 指定表名 diff --git a/internal/model/iot_card_import_task.go b/internal/model/iot_card_import_task.go index 3dc85ba..c2e42f8 100644 --- a/internal/model/iot_card_import_task.go +++ b/internal/model/iot_card_import_task.go @@ -32,7 +32,7 @@ type IotCardImportTask struct { StorageBucket string `gorm:"column:storage_bucket;type:varchar(100);comment:对象存储桶名" json:"storage_bucket,omitempty"` StorageKey string `gorm:"column:storage_key;type:varchar(500);comment:对象存储文件路径" json:"storage_key,omitempty"` CardCategory string `gorm:"column:card_category;type:varchar(20);default:normal;not null;comment:卡业务类型(normal/industry)" json:"card_category"` - RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'none';not null;comment:导入批次实名策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` + RealnamePolicy string `gorm:"column:realname_policy;type:varchar(20);default:'after_order';not null;comment:导入批次实名策略(none=无需实名,before_order=先实名后充值/购买,after_order=先充值/购买后实名)" json:"realname_policy"` } // CardItem 卡信息(ICCID + MSISDN + VirtualNo)