- 线下提号创建表单扩展:增加「操作人」、「第三方单号」、「下单金额」、「押金金额」字段,重构弹窗布局为紧凑双列/三列金额卡片排布,消除过度垂直滚动并默认预填操作人 - 店铺管理 CRUD:新增 pickup_shops 配置表与配套 API,支持在提号页面直接管理店铺(增删改查、启用/禁用、筛选),下拉选项自动优先加载活跃配置店铺并兼顾历史店铺 - 列表时间范围筛选:增加精确到秒的「日期+时间」时间范围选择器,支持快捷时段与后端时间范围过滤 - 生产环境数据核查:只读提取线上全部 61 项历史提号店铺名称与单量分布,完整整理沉淀至实施文档供后续映射规则参考 - 验证方式:执行并通过全套端到端代码门禁(scripts/check.sh:SQL约束、go vet、go build、MySQL真实测试库单元测试及覆盖率、vue大小检查、prettier、eslint、vue-tsc及vite构建)
51 lines
3.3 KiB
Go
51 lines
3.3 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/datatypes"
|
|
)
|
|
|
|
// AdminPickup 管理员线下提号记录。
|
|
// 独立于 rental_orders 和正常订单状态机;完成后进入线下提号财务统计。
|
|
// 站内上传完成时入卖家钱包;平台代管完成后进入线下结算。
|
|
type AdminPickup struct {
|
|
ID uint64 `gorm:"primaryKey" json:"id"`
|
|
PickupNo string `gorm:"size:64;not null;uniqueIndex" json:"pickup_no"`
|
|
ListingID uint64 `gorm:"not null;index" json:"listing_id"`
|
|
AccountID uint64 `gorm:"not null;index" json:"account_id"`
|
|
OwnerID uint64 `gorm:"not null;index" json:"owner_id"`
|
|
AdminID uint64 `gorm:"not null" json:"admin_id"`
|
|
Operator string `gorm:"size:64;not null;default:'';index" json:"operator"`
|
|
Platform string `gorm:"size:32;not null;default:''" json:"platform"`
|
|
ThirdPartyOrderNo string `gorm:"size:128;not null;default:'';index" json:"third_party_order_no"`
|
|
ShopName string `gorm:"size:100;not null;default:'';index" json:"shop_name"`
|
|
AccountSource string `gorm:"size:32;not null;default:'internal';index" json:"account_source"`
|
|
SourceChannel string `gorm:"size:32;not null;default:''" json:"source_channel"`
|
|
SettlementMode string `gorm:"size:32;not null;default:'owner_wallet'" json:"settlement_mode"`
|
|
ListingPriceCent int64 `gorm:"not null;default:0" json:"listing_price_cent"`
|
|
OrderAmountCent int64 `gorm:"not null;default:0" json:"order_amount_cent"`
|
|
DepositAmountCent int64 `gorm:"not null;default:0" json:"deposit_amount_cent"`
|
|
OwnerPriceCent int64 `gorm:"not null;default:0" json:"owner_price_cent"`
|
|
WebsiteProfitCent int64 `gorm:"not null;default:0" json:"website_profit_cent"`
|
|
ProfitAmountCent int64 `gorm:"not null;default:0" json:"profit_amount_cent"`
|
|
SellerRatio float64 `gorm:"type:decimal(10,2);not null;default:0" json:"seller_ratio"`
|
|
BuyerRatio float64 `gorm:"type:decimal(10,2);not null;default:0" json:"buyer_ratio"`
|
|
AccountSnapshot datatypes.JSON `json:"account_snapshot,omitempty"`
|
|
SettleAmountCent int64 `gorm:"not null;default:0" json:"settle_amount_cent"`
|
|
Status string `gorm:"size:20;not null;default:'picking_up';index" json:"status"`
|
|
OfflineSettlementStatus string `gorm:"size:16;not null;default:'none';index" json:"offline_settlement_status"`
|
|
OfflineSettlementRemark string `gorm:"size:255;not null;default:''" json:"offline_settlement_remark"`
|
|
OfflineSettledBy *uint64 `json:"offline_settled_by,omitempty"`
|
|
OfflineSettledAt *time.Time `json:"offline_settled_at,omitempty"`
|
|
Remark string `gorm:"size:255;not null;default:''" json:"remark"`
|
|
CompleteRemark string `gorm:"size:255;not null;default:''" json:"complete_remark"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
|
CancelledAt *time.Time `json:"cancelled_at,omitempty"`
|
|
}
|
|
|
|
func (AdminPickup) TableName() string {
|
|
return "admin_pickups"
|
|
}
|