修改bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m6s

This commit is contained in:
sexygoat
2026-04-09 16:56:30 +08:00
parent 6a46aeea15
commit 472099bf96
9 changed files with 432 additions and 170 deletions

View File

@@ -190,14 +190,16 @@ export interface ShopCommissionRecordItem {
}
/**
* 代理商佣金汇总项
* 代理商资金汇总项(原佣金汇总项
*/
export interface ShopCommissionSummaryItem {
export interface ShopFundSummaryItem {
shop_id: number // 店铺ID
shop_code: string // 店铺编码
shop_name: string // 店铺名称
username?: string // 主账号用户名
phone?: string // 主账号手机号
main_balance: number // 预充值余额(分)
main_frozen_balance: number // 预充值冻结余额(分)
total_commission: number // 总佣金(分)
available_commission: number // 可提现佣金(分)
frozen_commission: number // 冻结中佣金(分)
@@ -208,13 +210,23 @@ export interface ShopCommissionSummaryItem {
}
/**
* 代理商佣金汇总查询参数
* @deprecated 使用 ShopFundSummaryItem 代替
*/
export interface ShopCommissionSummaryQueryParams extends PaginationParams {
export type ShopCommissionSummaryItem = ShopFundSummaryItem
/**
* 代理商资金汇总查询参数(原佣金汇总查询参数)
*/
export interface ShopFundSummaryQueryParams extends PaginationParams {
shop_name?: string // 店铺名称
shop_code?: string // 店铺编码
username?: string // 用户名
}
/**
* @deprecated 使用 ShopFundSummaryQueryParams 代替
*/
export type ShopCommissionSummaryQueryParams = ShopFundSummaryQueryParams
// ==================== 响应类型 ====================
export interface WithdrawalRequestPageResult {
@@ -242,8 +254,57 @@ export interface ShopCommissionRecordPageResult {
total: number
}
export interface ShopCommissionSummaryPageResult {
items: ShopCommissionSummaryItem[] | null
export interface ShopFundSummaryPageResult {
items: ShopFundSummaryItem[] | null
page: number
size: number
total: number
}
/**
* @deprecated 使用 ShopFundSummaryPageResult 代替
*/
export type ShopCommissionSummaryPageResult = ShopFundSummaryPageResult
// ==================== 预充值钱包相关 ====================
/**
* 交易类型
*/
export enum MainWalletTransactionType {
RECHARGE = 'recharge', // 充值入账
DEDUCT = 'deduct', // 套餐扣款
REFUND = 'refund' // 退款
}
/**
* 预充值钱包交易记录项
*/
export interface MainWalletTransactionItem {
id: number // 交易记录ID
transaction_type: MainWalletTransactionType // 交易类型
transaction_subtype: string // 交易子类型
amount: number // 交易金额(分,正数为入账,负数为扣款)
balance_before: number // 交易前余额(分)
balance_after: number // 交易后余额(分)
remark: string // 备注
created_at: string // 交易时间
}
/**
* 预充值钱包交易记录查询参数
*/
export interface MainWalletTransactionQueryParams extends PaginationParams {
transaction_type?: MainWalletTransactionType // 交易类型过滤
start_date?: string // 开始日期 YYYY-MM-DD
end_date?: string // 结束日期 YYYY-MM-DD
}
/**
* 预充值钱包交易记录分页结果
*/
export interface MainWalletTransactionPageResult {
items: MainWalletTransactionItem[] | null
page: number
size: number
total: number
@@ -252,41 +313,51 @@ export interface ShopCommissionSummaryPageResult {
// ==================== 我的佣金统计相关 ====================
/**
* 我的佣金统计查询参数
* 代理商佣金统计查询参数shop_id 通过路径参数传递,不再在 query 中)
*/
export interface MyCommissionStatsQueryParams {
shop_id?: number // 店铺ID
export interface ShopCommissionStatsQueryParams {
start_time?: string // 开始时间
end_time?: string // 结束时间
}
/**
* 我的佣金统计响应
* @deprecated 使用 ShopCommissionStatsQueryParams 代替shop_id 改为路径参数
*/
export interface MyCommissionStatsResponse {
cost_diff_amount: number // 成本价差收入(分)
cost_diff_count: number // 成本价差笔数
cost_diff_percent: number // 成本价差占比(千分比)
one_time_amount: number // 一次性佣金收入(分)
one_time_count: number // 一次性佣金笔数
one_time_percent: number // 一次性佣金占比(千分比)
tier_bonus_amount: number // 梯度奖励收入(分)
tier_bonus_count: number // 梯度奖励笔数
tier_bonus_percent: number // 梯度奖励占比(千分比)
export type MyCommissionStatsQueryParams = ShopCommissionStatsQueryParams
/**
* 代理商佣金统计响应
*/
export interface CommissionStatsResponse {
total_amount: number // 总收入(分)
cost_diff_amount: number // 成本价差收入(分)
one_time_amount: number // 一次性佣金收入(分)
cost_diff_percent: number // 成本价差占比(千分比)
one_time_percent: number // 一次性佣金占比(千分比)
total_count: number // 总笔数
cost_diff_count: number // 成本价差笔数
one_time_count: number // 一次性佣金笔数
}
/**
* 我的每日佣金统计查询参数
* @deprecated 使用 CommissionStatsResponse 代替
*/
export interface MyDailyCommissionStatsQueryParams {
shop_id?: number // 店铺ID
export type MyCommissionStatsResponse = CommissionStatsResponse
/**
* 代理商每日佣金统计查询参数shop_id 通过路径参数传递)
*/
export interface DailyCommissionStatsQueryParams {
start_date?: string // 开始日期YYYY-MM-DD
end_date?: string // 结束日期YYYY-MM-DD
days?: number // 查询天数默认30天最大365天
}
/**
* @deprecated 使用 DailyCommissionStatsQueryParams 代替shop_id 改为路径参数
*/
export type MyDailyCommissionStatsQueryParams = DailyCommissionStatsQueryParams
/**
* 每日佣金统计项
*/

View File

@@ -92,27 +92,10 @@ export interface CreateOrderRequest {
iot_card_id?: number | null // IoT卡ID
device_id?: number | null // 设备ID
identifier?: string // 资产标识符ICCID 或 VirtualNo
package_ids: number[] // 套餐ID列表
package_id: number // 套餐ID(单选)
payment_method: OrderPaymentMethod // 支付方式
payment_voucher_key?: string // 线下支付凭证(仅 offline 必填)
}
// 创建订单响应 (返回订单详情)
export type CreateOrderResponse = Order
// 套餐购买预检请求
export interface PurchaseCheckRequest {
order_type: OrderType // 订单类型 (single_card:单卡购买, device:设备购买)
resource_id: number // 资源ID (IoT卡ID或设备ID)
package_ids: number[] // 套餐ID列表
}
// 套餐购买预检响应
export interface PurchaseCheckResponse {
need_force_recharge: boolean // 是否需要强充
force_recharge_amount?: number // 强充金额(分)
total_package_amount?: number // 套餐总价(分)
actual_payment?: number // 实际支付金额(分)
wallet_credit?: number // 钱包到账金额(分)
message?: string // 提示信息
}