This commit is contained in:
邹宗楠
2023-04-23 15:44:48 +08:00
parent 76fb7fc028
commit 61d9da631c
8 changed files with 75 additions and 17 deletions

View File

@@ -1,5 +1,17 @@
package mtwmapi
import (
"git.rosy.net.cn/baseapi/utils"
)
type Bill struct {
AppPoiCode string `json:"app_poi_code"` // APP方门店id传商家中台系统里门店的编码。如商家在操作绑定门店至开放平台应用中时未绑定三方门店id信息则默认APP方门店id与美团门店id相同。
StartDate int64 `json:"start_date"` // 秒级时间戳
EndDate int64 `json:"end_date"` // 秒级时间戳
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
}
// GetStoreBillList 获取门店的订单账单
/*
1.金额类字段单位使用“分”
@@ -13,8 +25,17 @@ package mtwmapi
3想要实现的效果
4预计开发周期和上线时间
5商家公司授权开通日账单接口的证明。点击下载授权证明模板授权证明以附件形式提供。*/
func (a *API) GetStoreBillList() {
func (a *API) GetStoreBillList(param *Bill) (*StoreBillListRes, error) {
result, err := a.AccessAPI3("bill/list", true, utils.Struct2Map(param, "", false))
if err != nil {
return nil, err
}
var data *StoreBillListRes
if err := utils.Map2StructByJson(result, &data, false); err != nil {
return nil, err
}
return data, nil
}
// StoreBillListReq 门店结算查询条件
@@ -28,7 +49,8 @@ type StoreBillListReq struct {
// StoreBillListRes 门店结算返回值
type StoreBillListRes struct {
ExtraInfo ExtraInfoData `json:"extra_info"`
ExtraInfo ExtraInfoData `json:"extra_info"`
Data []*BillListData `json:"data"`
}
type ExtraInfoData struct {