1
This commit is contained in:
@@ -216,8 +216,6 @@ func TestStringTo(t *testing.T) {
|
||||
globals.SugarLogger.Debugf("==============err := %s", err.Error())
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("=data :=%s", utils.Format4Output(result0, false))
|
||||
|
||||
}
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,6 @@ package jdapi
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -338,8 +337,6 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
|
||||
// }
|
||||
|
||||
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
|
||||
globals.SugarLogger.Debugf("=updateParams=========: %s", utils.Format4Output(updateParams, false))
|
||||
globals.SugarLogger.Debugf("=modifyCloseStatus=========: %s", utils.Format4Output(modifyCloseStatus, false))
|
||||
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
|
||||
mapData := utils.Struct2MapByJson(updateParams)
|
||||
if !modifyCloseStatus {
|
||||
@@ -360,7 +357,6 @@ func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStat
|
||||
delete(mapData, "serviceTimeEnd1")
|
||||
}
|
||||
_, err = a.AccessAPINoPage("store/updateStoreInfo4Open", mapData, nil, nil, nullResultParser)
|
||||
globals.SugarLogger.Debugf("=err=========: %s", utils.Format4Output(err, false))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -401,6 +397,17 @@ func (a *API) OrgReplyComment(orderID int64, storeID, content, replayPin string)
|
||||
return err
|
||||
}
|
||||
|
||||
// 根据城市编码查询区域信息列表接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=cc2a3b5d49e84f3eb41ee39a0afe33c3
|
||||
func (a *API) GetNextLevelByType(areaCode int64, pin string) (interface{}, error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"areaCode": areaCode,
|
||||
"pin": pin,
|
||||
}
|
||||
result, err := a.AccessAPI("address/getNextLevelByType", jdParams)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// 根据到家门店编码修改商家自动接单接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=5df446bb5ff14413965b8d702718dc48
|
||||
func (a *API) UpdateStoreConfig4Open(stationNo string, isAutoOrder bool) (bool, error) {
|
||||
|
||||
@@ -51,26 +51,21 @@ func TestGetStoreInfoByStationNo(t *testing.T) {
|
||||
|
||||
func TestUpdateStoreInfo4Open(t *testing.T) {
|
||||
params := &OpStoreParams{
|
||||
StationNo: "12664100",
|
||||
StationName: "",
|
||||
OutSystemID: "",
|
||||
Mobile: "",
|
||||
Phone: "",
|
||||
Lat: 43.622098,
|
||||
Lng: 122.275918,
|
||||
StationAddress: "内蒙古自治区通辽市科尔沁区百花新城",
|
||||
Operator: "liulei",
|
||||
ServiceTimeEnd1: 0,
|
||||
ServiceTimeStart1: 0,
|
||||
ServiceTimeEnd2: 0,
|
||||
ServiceTimeStart2: 0,
|
||||
DeliveryRangeType: 0,
|
||||
CoordinateType: 0,
|
||||
DeliveryRangeRadius: 0,
|
||||
CoordinatePoints: "",
|
||||
CloseStatus: 0,
|
||||
StoreNotice: "",
|
||||
StandByPhone: "",
|
||||
StationNo: "12664100",
|
||||
StationName: "旺佳超市",
|
||||
OutSystemID: "668836",
|
||||
Mobile: "17751816719",
|
||||
Phone: "17751816719",
|
||||
Lat: 43.622098,
|
||||
Lng: 122.275918,
|
||||
City: 902,
|
||||
County: 32769,
|
||||
StationAddress: "内蒙古自治区通辽市科尔沁区百花新城",
|
||||
Operator: "18981810340",
|
||||
ServiceTimeEnd1: 44,
|
||||
ServiceTimeStart1: 14,
|
||||
CoordinateType: 3,
|
||||
CloseStatus: 0,
|
||||
}
|
||||
err := api.UpdateStoreInfo4Open2(params, false)
|
||||
if err != nil {
|
||||
@@ -79,6 +74,10 @@ func TestUpdateStoreInfo4Open(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestGetNextLevelByType(t *testing.T) {
|
||||
api.GetNextLevelByType(902, "18981810")
|
||||
}
|
||||
|
||||
//func TestGetCommentByOrderId(t *testing.T) {
|
||||
// testOrderID := int64(922520919000622)
|
||||
// result, err := api.GetCommentByOrderId2(testOrderID)
|
||||
|
||||
Reference in New Issue
Block a user