diff --git a/platformapi/autonavi/autonavi_page_test.go b/platformapi/autonavi/autonavi_page_test.go index 5687944d..96060363 100644 --- a/platformapi/autonavi/autonavi_page_test.go +++ b/platformapi/autonavi/autonavi_page_test.go @@ -7,7 +7,7 @@ import ( ) func TestGetCoordinateFromAddressByPage(t *testing.T) { - lng, lat, err := autonaviAPI.GetCoordinateFromAddressByPage("兴月宏干杂", 510100) + lng, lat, err := autonaviAPI.GetCoordinateFromAddressByPage("四川成都市武侯区望江路街道南三环五段188密苏里小城62栋3单元501", 510100) if err != nil { t.Fatal(err) } diff --git a/platformapi/ebaiapi/order_test.go b/platformapi/ebaiapi/order_test.go index 10e771e0..f43abf00 100644 --- a/platformapi/ebaiapi/order_test.go +++ b/platformapi/ebaiapi/order_test.go @@ -51,7 +51,7 @@ func TestOrderListAll(t *testing.T) { } func TestOrderPartRefundGet(t *testing.T) { - result, err := api.OrderPartRefundGet("5028611225947901495") + result, err := api.OrderPartRefundGet("115082650031169457") if err != nil { t.Fatal(err) } else { @@ -64,7 +64,7 @@ func TestOrderPartRefundGet(t *testing.T) { // if err != nil { // t.Fatal(err) // } else { -// t.Log(utils.Format4Output(result, false)) +// t.Log(utils.Format4Output(result, false))image/upload // } // } diff --git a/platformapi/mtwmapi/order.go b/platformapi/mtwmapi/order.go index b04af4d9..32e46f85 100644 --- a/platformapi/mtwmapi/order.go +++ b/platformapi/mtwmapi/order.go @@ -114,6 +114,18 @@ type RefundSkuDetail struct { Spec string `json:"spec"` } +type RefundDetail struct { + TotalFoodAmount string `json:"total_food_amount"` + BoxAmount string `json:"box_amount"` + ActivityPoiAmount string `json:"activity_poi_amount"` + ActivityMeituanAmount string `json:"activity_meituan_amount"` + ActivityAgentAmount string `json:"activity_agent_amount"` + PlatformChargeFee string `json:"platform_charge_fee"` + SettleAmount string `json:"settle_amount"` + Productpreferences string `json:"productpreferences"` + NotProductpreferences string `json:"not_productpreferences"` +} + type RefundOrderDetail struct { ApplyReason string `json:"apply_reason"` ApplyType int `json:"apply_type"` @@ -128,6 +140,7 @@ type RefundOrderDetail struct { UTime int64 `json:"utime"` WmAppRetailForOrderPartRefundList []*RefundSkuDetail `json:"wmAppRetailForOrderPartRefundList"` WmOrderIDView int64 `json:"wm_order_id_view"` + RefundPartialEstimateCharge *RefundDetail `json:"refund_partial_estimate_charge"` } type OrderExtraInfo struct { diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index 8caad71b..e16b22cf 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -97,7 +97,7 @@ func TestOrderGetRiderInfoPhoneNumber(t *testing.T) { } func TestGetOrderRefundDetail(t *testing.T) { - result, err := api.GetOrderRefundDetail(94310371440052951, 0) + result, err := api.GetOrderRefundDetail(115082650031169457, 0) if err != nil { t.Fatal(err) } diff --git a/platformapi/mtwmapi/poi_test.go b/platformapi/mtwmapi/poi_test.go index a3cfdddd..5598818c 100644 --- a/platformapi/mtwmapi/poi_test.go +++ b/platformapi/mtwmapi/poi_test.go @@ -36,16 +36,14 @@ func TestPoiMGet(t *testing.T) { } func TestPoiSave(t *testing.T) { - result, err := api.PoiMGet([]string{testPoiCode}) - if err != nil { - t.Fatal(err) - } - poiParams := utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0])) - poiParams["name"] = "中国" - err = api.PoiSave(testPoiCode, poiParams) - if err != nil { - t.Fatal(err) - } + //result, err := api.PoiMGet([]string{testPoiCode}) + //if err != nil { + // t.Fatal(err) + //} + poiParams := map[string]interface{}{} + //utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0])) + poiParams["name"] = "京西果园·果切·水果捞(宝山店)" + api.PoiSave("9202094", poiParams) } func TestPoiTagList(t *testing.T) { @@ -60,7 +58,7 @@ func TestPoiTagList(t *testing.T) { } func TestImageUploadByURL(t *testing.T) { - result, err := api.ImageUploadByURL(testPoiCode, "hello.jpg", "http://image.jxc4.com/56cd1e88ada3660f37548c2d29ea2158.jpg") + result, err := api.ImageUploadByURL("11918886", "菜市800x600.jpg", "http://image.jxc4.com/image/ff8c9443c894bfb4822f7d2f742718df.jpg") if err != nil { t.Fatal(err) } diff --git a/platformapi/weixinapi/cgibin.go b/platformapi/weixinapi/cgibin.go index 001884de..b47fcb45 100644 --- a/platformapi/weixinapi/cgibin.go +++ b/platformapi/weixinapi/cgibin.go @@ -13,6 +13,12 @@ const ( MaterialTypeVoice = "voice" MaterialTypeNews = "news" MaterialTypeThumb = "thumb" + + SNSCutLine = ` +
+
+
+ ` ) type CBUserInfo struct { diff --git a/platformapi/weixinapi/cgibin_test.go b/platformapi/weixinapi/cgibin_test.go index 65ab1067..bc3df17e 100644 --- a/platformapi/weixinapi/cgibin_test.go +++ b/platformapi/weixinapi/cgibin_test.go @@ -65,7 +65,7 @@ func TestCBGetTicketInfo(t *testing.T) { } func TestCBBatchgetMaterial(t *testing.T) { - userInfo, err := api.CBBatchgetMaterial(MaterialTypeNews, 19, 1) + userInfo, err := api.CBBatchgetMaterial(MaterialTypeThumb, 0, 1) if err != nil { t.Fatal(err) } diff --git a/platformapi/weixinapi/weixinapi_test.go b/platformapi/weixinapi/weixinapi_test.go index 3da757bc..3a1be79e 100644 --- a/platformapi/weixinapi/weixinapi_test.go +++ b/platformapi/weixinapi/weixinapi_test.go @@ -27,7 +27,7 @@ func init() { //weixinapp //api = New("wx18111a41fd17f24f", "c79ac6e1b2d6d7968e72a9658a8b6715") - api.CBSetToken("46_wVx1dpEvGz0nGoSl_4mngTxlmLMYXMkixtDpppskseIwPJCa0U9JclQWGVPRtEShpwEhZumF6SoLpwtQMwndEOWOaZnI9tbdC1nOggw594wTadHzco4Dl8qmkrvvaPDwwHuz43bBWtURKruyNCFfABAJYB") + api.CBSetToken("46_sKrKhgoeh0Om1V2_IcTERUux4-pLL5CplvhOh7civG51UCSUTt6g3WkTutvk107i2SMhdcU5q9MYGbciZ4PHyPzhlzx34yBPblf8dpRHx3VYE_a9JbE2wbtjJY93GmXc4KcRHxlEa8s_QWFVOLCgADAKHY") } func handleError(t *testing.T, err error) {