添加饿了退单,美团账单刷新
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package ebaiapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -20,29 +18,29 @@ func TestAPI_GetImOnlineStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestParseMultilayerJson(t *testing.T) {
|
||||
//var data1 = `{"subBizType": "SEND_MESSAGE","bizType": "IM","payload": {"senderId":"20235760123","receiverIds":["105872382789","30506545123","20235760456"],"createTime":1642647893901,"groupId":"$2$10514249123$PNM","msgId": "1654907240123.PNM","contentType": "1","content":"{"text":"测试消息"}"},"platformShopId": "32267818868"}`
|
||||
var data8 = `{
|
||||
"subBizType": "SEND_MESSAGE",
|
||||
"bizType": "IM",
|
||||
"payload": {
|
||||
"senderId": "102000022769889",
|
||||
"receiverIds": ["102000022769889", "30507511668"],
|
||||
"createTime": 1680579669946,
|
||||
"groupId": "$2$10996707119$PNM",
|
||||
"msgId": "1734454964456.PNM",
|
||||
"contentType": 8,
|
||||
"content": "{\"elements\":[{\"elementContent\":\"{\\\"atAll\\\":false,\\\"defaultNick\\\":\\\"\\\",\\\"uid\\\":{\\\"appUid\\\":\\\"30507511668\\\",\\\"domain\\\":\\\"eleme\\\"}}\",\"elementType\":3},{\"elementContent\":\"{\\\"extensions\\\":{},\\\"text\\\":\\\"@商家 我选的就是退一个杯子呀\\\"}\",\"elementType\":1}]}"
|
||||
},
|
||||
"platformShopId": "507511668"
|
||||
}`
|
||||
//retVal1 := ParseMultilayerJson(data1)
|
||||
//fmt.Println(utils.Format4Output(retVal1, false))
|
||||
//retVal8 := ParseMultilayerJson(data8)
|
||||
//fmt.Println(utils.Format4Output(retVal8, false))
|
||||
temp := ImMessageSent{}
|
||||
err := json.Unmarshal([]byte(data8), &temp)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
fmt.Println(temp)
|
||||
// //var data1 = `{"subBizType": "SEND_MESSAGE","bizType": "IM","payload": {"senderId":"20235760123","receiverIds":["105872382789","30506545123","20235760456"],"createTime":1642647893901,"groupId":"$2$10514249123$PNM","msgId": "1654907240123.PNM","contentType": "1","content":"{"text":"测试消息"}"},"platformShopId": "32267818868"}`
|
||||
// var data8 = `{
|
||||
// "subBizType": "SEND_MESSAGE",
|
||||
// "bizType": "IM",
|
||||
// "payload": {
|
||||
// "senderId": "102000022769889",
|
||||
// "receiverIds": ["102000022769889", "30507511668"],
|
||||
// "createTime": 1680579669946,
|
||||
// "groupId": "$2$10996707119$PNM",
|
||||
// "msgId": "1734454964456.PNM",
|
||||
// "contentType": 8,
|
||||
// "content": "{\"elements\":[{\"elementContent\":\"{\\\"atAll\\\":false,\\\"defaultNick\\\":\\\"\\\",\\\"uid\\\":{\\\"appUid\\\":\\\"30507511668\\\",\\\"domain\\\":\\\"eleme\\\"}}\",\"elementType\":3},{\"elementContent\":\"{\\\"extensions\\\":{},\\\"text\\\":\\\"@商家 我选的就是退一个杯子呀\\\"}\",\"elementType\":1}]}"
|
||||
// },
|
||||
// "platformShopId": "507511668"
|
||||
//}`
|
||||
// //retVal1 := ParseMultilayerJson(data1)
|
||||
// //fmt.Println(utils.Format4Output(retVal1, false))
|
||||
// //retVal8 := ParseMultilayerJson(data8)
|
||||
// //fmt.Println(utils.Format4Output(retVal8, false))
|
||||
// temp := ImMessageSent{}
|
||||
// err := json.Unmarshal([]byte(data8), &temp)
|
||||
// if err != nil {
|
||||
// fmt.Println(err)
|
||||
// }
|
||||
// fmt.Println(temp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user