unipush
This commit is contained in:
@@ -529,3 +529,27 @@ func (a *API) InStoreCouponList(poiCode string, pageNum, pageSize int) (couponAc
|
||||
}
|
||||
return couponActList, err
|
||||
}
|
||||
|
||||
type GetByAppPoiCodeAndTypeResult struct {
|
||||
ActName string `json:"act_name"`
|
||||
ActType int `json:"act_type"`
|
||||
ActStatus int `json:"act_status"`
|
||||
ActCount int `json:"act_count"`
|
||||
ItemCount int `json:"item_count"`
|
||||
StartTime int `json:"start_time"`
|
||||
EndTime int `json:"end_time"`
|
||||
}
|
||||
|
||||
// 查询门店内活动信息
|
||||
// https://developer.waimai.meituan.com/home/docDetail/444
|
||||
func (a *API) GetByAppPoiCodeAndType(appPoiCode string, status, actType int) (getByAppPoiCodeAndTypeResult []*GetByAppPoiCodeAndTypeResult, err error) {
|
||||
result, err := a.AccessAPI("act/all/get/byAppPoiCodeAndType", true, map[string]interface{}{
|
||||
KeyAppPoiCode: appPoiCode,
|
||||
"status": status,
|
||||
"type": actType,
|
||||
})
|
||||
if err == nil {
|
||||
err = utils.Map2StructByJson(result, &getByAppPoiCodeAndTypeResult, false)
|
||||
}
|
||||
return getByAppPoiCodeAndTypeResult, err
|
||||
}
|
||||
|
||||
@@ -112,3 +112,11 @@ func TestParseErr4RetailDiscountDelete(t *testing.T) {
|
||||
failedList := ParseErr4RetailDiscountDelete(errExt)
|
||||
t.Log(utils.Format4Output(failedList, false))
|
||||
}
|
||||
|
||||
func TestGetByAppPoiCodeAndType(t *testing.T) {
|
||||
result, err := api.GetByAppPoiCodeAndType("9375120", 1, 1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user