feat: 技术债务清理(支付配置动态化、API文档补全、轮询常量提取、废弃代码清理)
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m13s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m13s
This commit is contained in:
@@ -43,7 +43,6 @@ const (
|
||||
// 任务类型常量
|
||||
const (
|
||||
TaskTypeEmailSend = "email:send" // 发送邮件
|
||||
TaskTypeDataSync = "data:sync" // 数据同步
|
||||
TaskTypeCommission = "commission:calculate" // 分佣计算
|
||||
TaskTypeIotCardImport = "iot_card:import" // IoT 卡批量导入
|
||||
TaskTypeDeviceImport = "device:import" // 设备批量导入
|
||||
@@ -233,3 +232,48 @@ const (
|
||||
ExchangeAssetTypeIotCard = "iot_card" // 物联网卡
|
||||
ExchangeAssetTypeDevice = "device" // 设备
|
||||
)
|
||||
|
||||
// GetStatusName 获取通用启用/禁用状态名称
|
||||
// 用于 status 字段:0=禁用, 1=启用
|
||||
func GetStatusName(status int) string {
|
||||
switch status {
|
||||
case StatusDisabled:
|
||||
return "禁用"
|
||||
case StatusEnabled:
|
||||
return "启用"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// GetShelfStatusName 获取上架状态名称
|
||||
// 用于 shelf_status 字段:1=上架, 2=下架
|
||||
func GetShelfStatusName(status int) string {
|
||||
switch status {
|
||||
case ShelfStatusOn:
|
||||
return "上架"
|
||||
case ShelfStatusOff:
|
||||
return "下架"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// GetExchangeStatusName 获取换货单状态名称
|
||||
// 用于 exchange_status 字段
|
||||
func GetExchangeStatusName(status int) string {
|
||||
switch status {
|
||||
case ExchangeStatusPendingInfo:
|
||||
return "待填写信息"
|
||||
case ExchangeStatusPendingShip:
|
||||
return "待发货"
|
||||
case ExchangeStatusShipped:
|
||||
return "已发货待确认"
|
||||
case ExchangeStatusCompleted:
|
||||
return "已完成"
|
||||
case ExchangeStatusCancelled:
|
||||
return "已取消"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user