- up
This commit is contained in:
@@ -242,6 +242,7 @@ func (a *API) GetStationsByVenderId() ([]string, error) {
|
||||
// 新增不带资质的门店信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=93acef27c3aa4d8286d5c8c26b493629
|
||||
func (a *API) CreateStore(createParams *OpStoreParams) (*CreateShopResult, error) {
|
||||
createParams.Operator = utils.GetAPIOperator(createParams.Operator)
|
||||
result, err := a.AccessAPINoPage("store/createStore", utils.Struct2MapByJson(createParams), nil, nil, func(data map[string]interface{}) (interface{}, error) {
|
||||
innerCode := data["code"].(string)
|
||||
if data["code"] == "0" {
|
||||
@@ -259,13 +260,13 @@ func (a *API) CreateStore(createParams *OpStoreParams) (*CreateShopResult, error
|
||||
|
||||
// 根据到家门店编码查询门店基本信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=4c48e347027146d5a103e851055cb1a7
|
||||
func (a *API) GetStoreInfoByStationNo(storeNo string) (map[string]interface{}, error) {
|
||||
result, err := a.AccessAPINoPage("storeapi/getStoreInfoByStationNo", utils.Params2Map("StoreNo", storeNo), nil, nil, nil)
|
||||
if err == nil {
|
||||
return result.(map[string]interface{}), nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
// func (a *API) GetStoreInfoByStationNo(storeNo string) (map[string]interface{}, error) {
|
||||
// result, err := a.AccessAPINoPage("storeapi/getStoreInfoByStationNo", utils.Params2Map("StoreNo", storeNo), nil, nil, nil)
|
||||
// if err == nil {
|
||||
// return result.(map[string]interface{}), nil
|
||||
// }
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail, err error) {
|
||||
result, err := a.AccessAPINoPage("storeapi/getStoreInfoByStationNo", utils.Params2Map("StoreNo", storeNo), nil, nil, nil)
|
||||
@@ -277,17 +278,18 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
|
||||
|
||||
// 修改门店基础信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=2600369a456446f0921e918f3d15e96a
|
||||
func (a *API) UpdateStoreInfo4Open(storeNo, userName string, addParams map[string]interface{}) error {
|
||||
jdParams := map[string]interface{}{
|
||||
"stationNo": storeNo,
|
||||
"operator": utils.GetAPIOperator(userName),
|
||||
}
|
||||
jdParams = utils.MergeMaps(jdParams, addParams)
|
||||
_, err := a.AccessAPINoPage("store/updateStoreInfo4Open", jdParams, nil, nil, nullResultParser)
|
||||
return err
|
||||
}
|
||||
// func (a *API) UpdateStoreInfo4Open(storeNo, userName string, addParams map[string]interface{}) error {
|
||||
// jdParams := map[string]interface{}{
|
||||
// "stationNo": storeNo,
|
||||
// "operator": utils.GetAPIOperator(userName),
|
||||
// }
|
||||
// jdParams = utils.MergeMaps(jdParams, addParams)
|
||||
// _, err := a.AccessAPINoPage("store/updateStoreInfo4Open", jdParams, nil, nil, nullResultParser)
|
||||
// return err
|
||||
// }
|
||||
|
||||
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
|
||||
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
|
||||
mapData := utils.Struct2MapByJson(updateParams)
|
||||
if !modifyCloseStatus {
|
||||
delete(mapData, "closeStatus")
|
||||
@@ -298,16 +300,16 @@ func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStat
|
||||
|
||||
// 根据订单号查询商家门店评价信息接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=bd23397725bb4e74b69e2f2fa1c88d43
|
||||
func (a *API) GetCommentByOrderId(orderId int64) (map[string]interface{}, error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"orderId": orderId,
|
||||
}
|
||||
result, err := a.AccessAPINoPage("commentOutApi/getCommentByOrderId", jdParams, nil, nil, genNoPageResultParser("code", "msg", "result", "200"))
|
||||
if err == nil {
|
||||
return result.(map[string]interface{}), nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
// func (a *API) GetCommentByOrderId(orderId int64) (map[string]interface{}, error) {
|
||||
// jdParams := map[string]interface{}{
|
||||
// "orderId": orderId,
|
||||
// }
|
||||
// result, err := a.AccessAPINoPage("commentOutApi/getCommentByOrderId", jdParams, nil, nil, genNoPageResultParser("code", "msg", "result", "200"))
|
||||
// if err == nil {
|
||||
// return result.(map[string]interface{}), nil
|
||||
// }
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
func (a *API) GetCommentByOrderId2(orderId int64) (orderComment *OrderCommentInfo, err error) {
|
||||
jdParams := map[string]interface{}{
|
||||
@@ -354,16 +356,16 @@ func (a *API) UpdateStoreConfig4Open(stationNo string, isAutoOrder bool) (bool,
|
||||
|
||||
// 获取门店配送范围接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=8f6d0ac75d734c68bf5bd2a09f376a78
|
||||
func (a *API) GetDeliveryRangeByStationNo(stationNo string) (map[string]interface{}, error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"stationNo": stationNo,
|
||||
}
|
||||
result, err := a.AccessAPINoPage("store/getDeliveryRangeByStationNo", jdParams, nil, nil, nil)
|
||||
if err == nil {
|
||||
return result.(map[string]interface{}), nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
// func (a *API) GetDeliveryRangeByStationNo(stationNo string) (map[string]interface{}, error) {
|
||||
// jdParams := map[string]interface{}{
|
||||
// "stationNo": stationNo,
|
||||
// }
|
||||
// result, err := a.AccessAPINoPage("store/getDeliveryRangeByStationNo", jdParams, nil, nil, nil)
|
||||
// if err == nil {
|
||||
// return result.(map[string]interface{}), nil
|
||||
// }
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
func (a *API) GetDeliveryRangeByStationNo2(stationNo string) (deliveryRange *StoreDeliveryRange, err error) {
|
||||
jdParams := map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user