feat(pickup): 线下提号支持扩展字段店铺管理CRUD及时间筛选
- 线下提号创建表单扩展:增加「操作人」、「第三方单号」、「下单金额」、「押金金额」字段,重构弹窗布局为紧凑双列/三列金额卡片排布,消除过度垂直滚动并默认预填操作人 - 店铺管理 CRUD:新增 pickup_shops 配置表与配套 API,支持在提号页面直接管理店铺(增删改查、启用/禁用、筛选),下拉选项自动优先加载活跃配置店铺并兼顾历史店铺 - 列表时间范围筛选:增加精确到秒的「日期+时间」时间范围选择器,支持快捷时段与后端时间范围过滤 - 生产环境数据核查:只读提取线上全部 61 项历史提号店铺名称与单量分布,完整整理沉淀至实施文档供后续映射规则参考 - 验证方式:执行并通过全套端到端代码门禁(scripts/check.sh:SQL约束、go vet、go build、MySQL真实测试库单元测试及覆盖率、vue大小检查、prettier、eslint、vue-tsc及vite构建)
This commit is contained in:
@@ -25,6 +25,9 @@ const (
|
||||
FinancialAdjustmentStatusSettled = "settled"
|
||||
FinancialAdjustmentStatusPending = "pending"
|
||||
FinancialAdjustmentStatusRecovery = "recovery_pending"
|
||||
|
||||
PickupShopStatusActive = "active"
|
||||
PickupShopStatusDisabled = "disabled"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -39,6 +42,8 @@ var (
|
||||
ErrFinancialAdjustmentInvalid = errors.New("financial adjustment invalid")
|
||||
ErrFinancialAdjustmentNotFound = errors.New("financial adjustment not found")
|
||||
ErrFinancialAdjustmentCannotSettle = errors.New("financial adjustment cannot be settled")
|
||||
ErrPickupShopNotFound = errors.New("pickup shop not found")
|
||||
ErrPickupShopNameExists = errors.New("pickup shop name already exists")
|
||||
)
|
||||
|
||||
type PickupDTO struct {
|
||||
@@ -53,12 +58,16 @@ type PickupDTO struct {
|
||||
OwnerID uint64 `json:"owner_id"`
|
||||
OwnerPhone string `json:"owner_phone"`
|
||||
AdminID uint64 `json:"admin_id"`
|
||||
Operator string `json:"operator"`
|
||||
Platform string `json:"platform"`
|
||||
ThirdPartyOrderNo string `json:"third_party_order_no"`
|
||||
ShopName string `json:"shop_name"`
|
||||
AccountSource string `json:"account_source"`
|
||||
SourceChannel string `json:"source_channel"`
|
||||
SettlementMode string `json:"settlement_mode"`
|
||||
ListingPriceCent int64 `json:"listing_price_cent"`
|
||||
OrderAmountCent int64 `json:"order_amount_cent"`
|
||||
DepositAmountCent int64 `json:"deposit_amount_cent"`
|
||||
OwnerPriceCent int64 `json:"owner_price_cent"`
|
||||
WebsiteProfitCent int64 `json:"website_profit_cent"`
|
||||
ProfitAmountCent int64 `json:"profit_amount_cent"`
|
||||
@@ -98,11 +107,15 @@ type FinancialAdjustmentDTO struct {
|
||||
}
|
||||
|
||||
type CreateRequest struct {
|
||||
ListingID uint64 `json:"listing_id" binding:"required"`
|
||||
Platform string `json:"platform"`
|
||||
ShopName string `json:"shop_name" binding:"max=100"`
|
||||
ProfitAmountCent int64 `json:"profit_amount_cent"`
|
||||
Remark string `json:"remark"`
|
||||
ListingID uint64 `json:"listing_id" binding:"required"`
|
||||
Operator string `json:"operator" binding:"max=64"`
|
||||
Platform string `json:"platform"`
|
||||
ThirdPartyOrderNo string `json:"third_party_order_no" binding:"max=128"`
|
||||
ShopName string `json:"shop_name" binding:"max=100"`
|
||||
OrderAmountCent int64 `json:"order_amount_cent" binding:"min=0"`
|
||||
DepositAmountCent int64 `json:"deposit_amount_cent" binding:"min=0"`
|
||||
ProfitAmountCent int64 `json:"profit_amount_cent"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
type CompleteRequest struct {
|
||||
@@ -143,6 +156,43 @@ type AdminPickupQuery struct {
|
||||
ShopName string
|
||||
AccountSource string
|
||||
OfflineSettlementStatus string
|
||||
Operator string
|
||||
ThirdPartyOrderNo string
|
||||
StartTime *time.Time
|
||||
EndTime *time.Time
|
||||
}
|
||||
|
||||
type PickupShopDTO struct {
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Platform string `json:"platform"`
|
||||
Status string `json:"status"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
Remark string `json:"remark"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type CreatePickupShopRequest struct {
|
||||
Name string `json:"name" binding:"required,max=100"`
|
||||
Platform string `json:"platform" binding:"max=32"`
|
||||
Status string `json:"status" binding:"omitempty,oneof=active disabled"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
Remark string `json:"remark" binding:"max=255"`
|
||||
}
|
||||
|
||||
type UpdatePickupShopRequest struct {
|
||||
Name string `json:"name" binding:"required,max=100"`
|
||||
Platform string `json:"platform" binding:"max=32"`
|
||||
Status string `json:"status" binding:"required,oneof=active disabled"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
Remark string `json:"remark" binding:"max=255"`
|
||||
}
|
||||
|
||||
type PickupShopQuery struct {
|
||||
Keyword string
|
||||
Platform string
|
||||
Status string
|
||||
}
|
||||
|
||||
type SellerPickupQuery struct {
|
||||
|
||||
Reference in New Issue
Block a user