add
This commit is contained in:
@@ -326,6 +326,7 @@ type (
|
||||
SubWithdrawReward float64 `json:"sub_withdraw_reward"`
|
||||
}
|
||||
Commission {
|
||||
OrderId string `json:"order_id"` // 订单号
|
||||
ProductName string `json:"product_name"`
|
||||
Amount float64 `json:"amount"`
|
||||
CreateTime string `json:"create_time"`
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user