This commit is contained in:
liangzai
2025-12-25 12:57:16 +08:00
parent 7c32f4131a
commit 77c8435178
3 changed files with 13 additions and 3 deletions

View File

@@ -326,9 +326,10 @@ type (
SubWithdrawReward float64 `json:"sub_withdraw_reward"`
}
Commission {
ProductName string `json:"product_name"`
Amount float64 `json:"amount"`
CreateTime string `json:"create_time"`
OrderId string `json:"order_id"` // 订单号
ProductName string `json:"product_name"`
Amount float64 `json:"amount"`
CreateTime string `json:"create_time"`
QueryParams map[string]interface{} `json:"query_params,omitempty"`
}
GetCommissionReq {

View File

@@ -65,6 +65,14 @@ func (l *GetAgentCommissionLogic) GetAgentCommission(req *types.GetCommissionReq
commission.CreateTime = agentCommissionModel.CreateTime.Format("2006-01-02 15:04:05")
commission.ProductName = product.ProductName
// 从 order 表获取 platform_order_id
orderModel, findOrderErr := l.svcCtx.OrderModel.FindOne(l.ctx, agentCommissionModel.OrderId)
if findOrderErr == nil && orderModel != nil && orderModel.PlatformOrderId.Valid {
commission.OrderId = orderModel.PlatformOrderId.String
} else {
commission.OrderId = ""
}
queryModel, queryErr := l.svcCtx.QueryModel.FindOneByOrderId(l.ctx, agentCommissionModel.OrderId)
if queryErr == nil && queryModel != nil {

View File

@@ -1178,6 +1178,7 @@ type BindMobileResp struct {
}
type Commission struct {
OrderId string `json:"order_id"` // 订单号
ProductName string `json:"product_name"`
Amount float64 `json:"amount"`
CreateTime string `json:"create_time"`