add
This commit is contained in:
@@ -326,9 +326,10 @@ type (
|
|||||||
SubWithdrawReward float64 `json:"sub_withdraw_reward"`
|
SubWithdrawReward float64 `json:"sub_withdraw_reward"`
|
||||||
}
|
}
|
||||||
Commission {
|
Commission {
|
||||||
ProductName string `json:"product_name"`
|
OrderId string `json:"order_id"` // 订单号
|
||||||
Amount float64 `json:"amount"`
|
ProductName string `json:"product_name"`
|
||||||
CreateTime string `json:"create_time"`
|
Amount float64 `json:"amount"`
|
||||||
|
CreateTime string `json:"create_time"`
|
||||||
QueryParams map[string]interface{} `json:"query_params,omitempty"`
|
QueryParams map[string]interface{} `json:"query_params,omitempty"`
|
||||||
}
|
}
|
||||||
GetCommissionReq {
|
GetCommissionReq {
|
||||||
|
|||||||
@@ -65,6 +65,14 @@ func (l *GetAgentCommissionLogic) GetAgentCommission(req *types.GetCommissionReq
|
|||||||
commission.CreateTime = agentCommissionModel.CreateTime.Format("2006-01-02 15:04:05")
|
commission.CreateTime = agentCommissionModel.CreateTime.Format("2006-01-02 15:04:05")
|
||||||
commission.ProductName = product.ProductName
|
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)
|
queryModel, queryErr := l.svcCtx.QueryModel.FindOneByOrderId(l.ctx, agentCommissionModel.OrderId)
|
||||||
if queryErr == nil && queryModel != nil {
|
if queryErr == nil && queryModel != nil {
|
||||||
|
|
||||||
|
|||||||
@@ -1178,6 +1178,7 @@ type BindMobileResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Commission struct {
|
type Commission struct {
|
||||||
|
OrderId string `json:"order_id"` // 订单号
|
||||||
ProductName string `json:"product_name"`
|
ProductName string `json:"product_name"`
|
||||||
Amount float64 `json:"amount"`
|
Amount float64 `json:"amount"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
|
|||||||
Reference in New Issue
Block a user