聚推客订单返回数据结构修改
This commit is contained in:
parent
84fadc17b0
commit
cdb09a992f
@ -6,6 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
"github.com/zywaited/xcopy"
|
||||||
|
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
"gitee.com/chengdu-lenntc/third-platform-sdk/client"
|
||||||
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
"gitee.com/chengdu-lenntc/third-platform-sdk/util"
|
||||||
@ -80,6 +81,9 @@ func (a *jutuikeApiImpl) QueryOrderList(ctx context.Context, req QueryOrderListR
|
|||||||
Errorf("[jutuikeApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
Errorf("[jutuikeApiImpl][QueryOrderList] response result error: %s", response.Msg)
|
||||||
return nil, errors.New(response.Msg)
|
return nil, errors.New(response.Msg)
|
||||||
}
|
}
|
||||||
result := response.Data.(QueryOrderListData)
|
var responseData *QueryOrderListData
|
||||||
return &result, nil
|
if err := xcopy.Copy(&responseData, response.Data); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return responseData, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,8 +48,8 @@ func (a *apiClientSuite) Test_GenerateLink() {
|
|||||||
|
|
||||||
func (a *apiClientSuite) Test_QueryOrderList() {
|
func (a *apiClientSuite) Test_QueryOrderList() {
|
||||||
req := QueryOrderListRequest{
|
req := QueryOrderListRequest{
|
||||||
StartTime: time.Now().Add(-1 * time.Minute).Format(time.DateTime),
|
StartTime: time.Unix(1718726400, 0).Format(time.DateTime),
|
||||||
EndTime: time.Now().Format(time.DateTime),
|
EndTime: time.Unix(1718812799, 0).Format(time.DateTime),
|
||||||
PageSize: 1,
|
PageSize: 1,
|
||||||
}
|
}
|
||||||
result, err := a.api.QueryOrderList(context.Background(), req)
|
result, err := a.api.QueryOrderList(context.Background(), req)
|
||||||
@ -62,5 +62,5 @@ func (a *apiClientSuite) Test_QueryOrderList() {
|
|||||||
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
a.T().Errorf("========[Test_QueryOrderList] json_marshal error:%s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.T().Logf("=====[Test_QueryOrderList] result: %s", string(resultByte))
|
a.T().Logf("================[Test_QueryOrderList] result: %s", string(resultByte))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,12 @@ type OrderItem struct {
|
|||||||
PayPrice string `json:"pay_price"` // 实际付款金额
|
PayPrice string `json:"pay_price"` // 实际付款金额
|
||||||
Status int32 `json:"status"` // 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
Status int32 `json:"status"` // 订单统一状态,0:未付款 1:已付款 2:待结算 3:已结算 4:无效订单
|
||||||
StatusDesc string `json:"status_desc"` // 状态描述,如已付款
|
StatusDesc string `json:"status_desc"` // 状态描述,如已付款
|
||||||
Extension string `json:"extension"` // 扩展参数,可根据需要解析
|
Extension *OrderExtension `json:"extension"` // 扩展参数,可根据需要解析
|
||||||
BrandId int32 `json:"brand_id"` // 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
BrandId int32 `json:"brand_id"` // 品牌id 1 美团 2 饿了么 3 拼多多 4 京东 5 肯德基 6 电影 7 麦当劳 8 话费充值 9 百果园 10 奈雪的茶 11 瑞幸咖啡 12 星巴克 13 喜茶 14 唯品会 15 滴滴/花小猪 16 汉堡王 17 高德打车 18 电费充值 19 会员充值 20 特价快递 21 联联周边游 22 抖音联盟 23 必胜客 24 旅划算 25 大牌餐券 26 千千惠生活 27 流量卡 28 同程出行 29 华莱士 30 T3出行 31 景点门票 32 淘宝
|
||||||
InvalidReason string `json:"invalid_reason"` // 失效原因
|
InvalidReason string `json:"invalid_reason"` // 失效原因
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderExtension struct {
|
||||||
|
PicUrl string `json:"pic_url"` // 图片url
|
||||||
|
ShopName string `json:"shop_name"` // 店铺名
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user