- 新增 000070 数据库迁移:支持 chat_conversations、wallet_accounts、wallet_ledger、withdrawal_requests 按 distribution_site_id 隔离 - 消息中心:会话列表、未读数统计、站点专属客服及订单群聊与主站实现双向完全隔离 - 资金账户与提现:独立按 (user_id, distribution_site_id) 建账,分销订单自动结算至对应分站钱包,提现与流水相互独立 - 前台界面:Axios 自动透传 X-Distribution-Site-Code,钱包、提现与消息页面呈现分站专属标牌与独立说明
65 lines
2.1 KiB
Go
65 lines
2.1 KiB
Go
package wallet
|
|
|
|
import "time"
|
|
|
|
type AccountDTO struct {
|
|
UserID uint64 `json:"user_id"`
|
|
DistributionSiteID uint64 `json:"distribution_site_id"`
|
|
AvailableBalanceCent int64 `json:"available_balance_cent"`
|
|
FrozenBalanceCent int64 `json:"frozen_balance_cent"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type WithdrawRequest struct {
|
|
AmountCent int64 `json:"amount_cent" binding:"required"`
|
|
}
|
|
|
|
type LedgerDTO struct {
|
|
ID uint64 `json:"id"`
|
|
LedgerNo string `json:"ledger_no"`
|
|
UserID uint64 `json:"user_id"`
|
|
DistributionSiteID uint64 `json:"distribution_site_id"`
|
|
OrderID *uint64 `json:"order_id"`
|
|
Direction string `json:"direction"`
|
|
AmountCent int64 `json:"amount_cent"`
|
|
BalanceAfterCent int64 `json:"balance_after_cent"`
|
|
BalanceType string `json:"balance_type"`
|
|
BizType string `json:"biz_type"`
|
|
BizNo string `json:"biz_no"`
|
|
Remark string `json:"remark"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type AdminLedgerQuery struct {
|
|
UserID uint64
|
|
OrderID uint64
|
|
BizType string
|
|
Page int
|
|
PageSize int
|
|
}
|
|
|
|
type PaginatedResult struct {
|
|
Items interface{} `json:"items"`
|
|
Total int64 `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|
|
|
|
type AdminLedgerDTO struct {
|
|
ID uint64 `json:"id"`
|
|
LedgerNo string `json:"ledger_no"`
|
|
UserID uint64 `json:"user_id"`
|
|
UserPhone string `json:"user_phone"`
|
|
UserNickname string `json:"user_nickname"`
|
|
OrderID *uint64 `json:"order_id"`
|
|
OrderNo string `json:"order_no"`
|
|
Direction string `json:"direction"`
|
|
AmountCent int64 `json:"amount_cent"`
|
|
BalanceAfterCent int64 `json:"balance_after_cent"`
|
|
BalanceType string `json:"balance_type"`
|
|
BizType string `json:"biz_type"`
|
|
BizNo string `json:"biz_no"`
|
|
Remark string `json:"remark"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|