- reimplement TrimBlanChar

This commit is contained in:
gazebo
2018-10-31 11:48:49 +08:00
parent e9d0a172ee
commit a69e005e31
3 changed files with 36 additions and 4 deletions

View File

@@ -105,3 +105,29 @@ func TestUpdateStoreConfig4Open(t *testing.T) {
t.Fatalf("UpdateStoreConfig4Open failed, isAutoOrder:%d", isAutoOrder)
}
}
func TestGetDeliveryRangeByStationNo(t *testing.T) {
const testStoreID = "11738152"
result, err := jdapi.GetDeliveryRangeByStationNo(testStoreID)
if err != nil {
t.Fatal(err)
}
result2, err := jdapi.GetStoreInfoByStationNo(testStoreID)
if err != nil {
t.Fatal(err)
}
baseapi.SugarLogger.Debug(utils.Format4Output(result, false))
baseapi.SugarLogger.Debug(utils.Format4Output(result2, false))
deliveryRange := result["deliveryRange"].(string)
params := map[string]interface{}{
"lng": result2["lng"],
"lat": result2["lat"],
"coordinateType": 3,
"deliveryRangeType": 2,
"coordinatePoints": deliveryRange,
}
err = jdapi.UpdateStoreInfo4Open(testStoreID, "test", params)
if err != nil {
t.Fatal(err)
}
}