1
This commit is contained in:
@@ -31,7 +31,7 @@ type BusinessSendMsgReq struct {
|
|||||||
PlatformShopId string `json:"platformShopId"` // 平台门店id
|
PlatformShopId string `json:"platformShopId"` // 平台门店id
|
||||||
BizType string `json:"bizType"` // 业务类型,IM消息。默认值:IM
|
BizType string `json:"bizType"` // 业务类型,IM消息。默认值:IM
|
||||||
SubBizType string `json:"subBizType"` // 子业务类型,发送消息。默认值:SEND_MESSAGE
|
SubBizType string `json:"subBizType"` // 子业务类型,发送消息。默认值:SEND_MESSAGE
|
||||||
Payload BusinessMsgPayload `json:"payload"`
|
PayLoad BusinessMsgPayload `json:"payLoad"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BusinessMsgPayload struct {
|
type BusinessMsgPayload struct {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func TestSendMsg(t *testing.T) {
|
|||||||
PlatformShopId: "1157916361",
|
PlatformShopId: "1157916361",
|
||||||
BizType: IMType,
|
BizType: IMType,
|
||||||
SubBizType: IMTypeSendMsg,
|
SubBizType: IMTypeSendMsg,
|
||||||
Payload: BusinessMsgPayload{
|
PayLoad: BusinessMsgPayload{
|
||||||
GroupId: "$2$13205337818$PNM",
|
GroupId: "$2$13205337818$PNM",
|
||||||
ReceiverIds: []string{"301157916361", "10154538612", "321921188187760"},
|
ReceiverIds: []string{"301157916361", "10154538612", "321921188187760"},
|
||||||
Content: "{\"text\": \"现在是20231027 10:04:44\"}",
|
Content: "{\"text\": \"现在是20231027 10:04:44\"}",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/baseapi/utils/errlist"
|
"git.rosy.net.cn/baseapi/utils/errlist"
|
||||||
"github.com/go-redis/redis"
|
"github.com/go-redis/redis"
|
||||||
@@ -150,5 +151,35 @@ func TestAPI_SetPoiIMOnlineStatus(t *testing.T) {
|
|||||||
|
|
||||||
func TestRdbSet2(t *testing.T) {
|
func TestRdbSet2(t *testing.T) {
|
||||||
|
|
||||||
rdb.Set("111", "2", 0)
|
//rdb.Set("111", "UtW1wOoLXSzMGK0u4X94jP+hkbHLdXcWHySxc1Todu1/Bi1ooOIY4wwOMIcAE6mq84gDXb7IfXJLbgjqFeQT5UQ4L+pvTJjlh1nYrWoyrm97+wGEoGONSxn7XNCfgGVzacDLNG5/0yJ7ElXthxHVXB4LcVBYV4wQAaMUYLYmALXFmAASGd8TlqNWojTSvOw6PZmB3A7aL14abJeSTil4yiWrU/RSFhnoAgijLFtaAdv0RcWQ+ipMa/BLNpxr+Qrd6HUzVO26IZaxMFQVwuTgEbmt2vQ9AILpgS2bnY2BLPk=", 0)
|
||||||
|
temp := rdb.Get("111")
|
||||||
|
fmt.Println(temp)
|
||||||
|
fmt.Println(temp.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
var rel = map[int]string{
|
||||||
|
589: "a81eb3df418d83d6a1a4b7c572156d2f",
|
||||||
|
5873: "41c479790a76f86326f89e8048964739",
|
||||||
|
4123: "df2c88338b85f830cebce2a9eab56628",
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestEncryptIm(t *testing.T) {
|
||||||
|
//msg := "您好,特殊天气或节假日可能出现骑手变少,配送延迟等情况,烦请耐心等待,售后及其他问题请联系店长,电话:"
|
||||||
|
//key := utils.LimitUTF8StringLen2(rel[589], 16)
|
||||||
|
//if data, err := utils.AESCBCEncpryt([]byte(msg), []byte(key), []byte(key)); err == nil {
|
||||||
|
// retVal := base64.StdEncoding.EncodeToString(data)
|
||||||
|
// fmt.Println(retVal)
|
||||||
|
//}
|
||||||
|
//var num = "17812345678"
|
||||||
|
//str := num[:3] + "-" + num[3:7] + "-" + num[7:]
|
||||||
|
//fmt.Println(str)
|
||||||
|
|
||||||
|
str := "\"{\\\"text\\\":\\\"\\\\\\\"您好,特殊天气或节假日可能出现骑手变少,配送延迟等情况,烦请耐心等待,售后及其他问题请联系店长,电话:136-5807-8848\\\\\\\"\\\"}\""
|
||||||
|
s1 := ebaiapi.Content{}
|
||||||
|
s2 := ""
|
||||||
|
t1 := json.Unmarshal([]byte(str), &s1)
|
||||||
|
fmt.Println(t1)
|
||||||
|
t2 := json.Unmarshal([]byte(s1.Text), &s2)
|
||||||
|
fmt.Println(t2)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user