+ QueryPromotionSku

This commit is contained in:
gazebo
2019-08-08 22:03:28 +08:00
parent 6840508339
commit c81c9110bb
4 changed files with 83 additions and 46 deletions

View File

@@ -106,3 +106,18 @@ func (a *API) QueryPromotionInfo(promotionInfoId int64) (promotionInfo *Promotio
}
return promotionInfo, err
}
// 根据到家商品ID查询单品级优惠活动列表接口
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=196&apiid=d73baba02c484109a3c3c1b1236ca13d
func (a *API) QueryPromotionSku(promotionType int, skuID int64, promotionState int /*, pageNo int64, pageSize int*/) (skuResultList []*PromotionLspQuerySkuResult, err error) {
jdParams := map[string]interface{}{
"promotionType": promotionType,
"skuId": skuID,
"promotionState": promotionState,
}
result, _, err := a.AccessAPIHavePage("singlePromote/queryPromotionSku", jdParams, nil, nil, genNormalHavePageResultParser("data"))
if err != nil {
err = utils.Map2StructByJson(result, &skuResultList, false)
}
return skuResultList, err
}