- 三大平台添加退款与部分退款相关的API

This commit is contained in:
gazebo
2019-04-13 18:32:39 +08:00
parent 841c63af48
commit a17d6c31ea
3 changed files with 92 additions and 2 deletions

View File

@@ -75,6 +75,12 @@ var (
orderOperationResultParser = genNoPageResultParser("code", "msg", "detail", "0")
)
type OAOSAdjustDTO struct {
SkuID int64 `json:"skuId,omitempty"`
OutSkuID string `json:"outSkuId,omitempty"`
SkuCount int `json:"skuCount"`
}
// 订单列表查询接口
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=169&apiid=ba3027848c3c4fda9674966e2a466482
func (a *API) OrderQuery(jdParams map[string]interface{}) (retVal []interface{}, totalCount int, err error) {
@@ -228,3 +234,27 @@ func (a *API) GetAfsService(orderId string) (map[string]interface{}, error) {
}
return result.(map[string]interface{}), nil
}
// 商家审核用户取消申请接口
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=906b430307764a3ca3698c05c72f33d0
func (a *API) OrderCancelOperate(orderId string, isAgreed bool, operator, remark string) (err error) {
jdParams := map[string]interface{}{
"orderId": orderId,
"isAgreed": isAgreed,
"operator": operator,
"remark": remark,
}
_, err = a.AccessAPINoPage("ocs/orderCancelOperate", jdParams, nil, nil, nullResultParser)
return err
}
func (a *API) AdjustOrder(orderId, operPin, remark string, oaosAdjustDTOList []*OAOSAdjustDTO) (err error) {
jdParams := map[string]interface{}{
"orderId": orderId,
"operPin": operPin,
"remark": remark,
"oaosAdjustDTOList": oaosAdjustDTOList,
}
_, err = a.AccessAPINoPage("orderAdjust/adjustOrder", jdParams, nil, nil, nullResultParser)
return err
}