From 4011fb0a732b42938699c5691195b9a210d00818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 16 Dec 2025 15:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BA=AC=E4=B8=9Cim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdapi/im.go | 4 +--- platformapi/jdapi/im_model.go | 23 ++++++++++++----------- platformapi/jdapi/store_test.go | 5 ----- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/platformapi/jdapi/im.go b/platformapi/jdapi/im.go index 24cddf96..e4a027df 100644 --- a/platformapi/jdapi/im.go +++ b/platformapi/jdapi/im.go @@ -76,11 +76,9 @@ func ImChatRiskMsg(request *http.Request) (back []byte, url string, err error) { } values, err := utils.HTTPBody2Values(data, false) valuesMap := utils.URLValues2Map(values) - return utils.MustMarshal(valuesMap), msgURL, err } - -func ImMsgChange(msg *ChatRisMsgCallback, msgURL string) (info *ChatRisInfo, user *UserChatMsg, read *UserMsgReadAck, err error) { +func ImMsgChange(msg *JdParamJsonObj, msgURL string) (info *ChatRisInfo, user *UserChatMsg, read *UserMsgReadAck, err error) { var msgContext *ChatRisInfo var userMsg *UserChatMsg var redMsg *UserMsgReadAck diff --git a/platformapi/jdapi/im_model.go b/platformapi/jdapi/im_model.go index e22b359e..ec264850 100644 --- a/platformapi/jdapi/im_model.go +++ b/platformapi/jdapi/im_model.go @@ -41,20 +41,21 @@ type ContextMsg struct { } type BaseInfo struct { - AppKey string `json:"app_key"` - Token string `json:"token"` - Timestamp string `json:"timestamp"` - Sign string `json:"sign"` - Format string `json:"format"` - V string `json:"v"` + AppKey string `json:"app_key"` + Token string `json:"token"` + Timestamp string `json:"timestamp"` + Sign string `json:"sign"` + Format string `json:"format"` + V string `json:"v"` + JdParamJson string `json:"jd_param_json"` } -// ChatRisMsgCallback 风控消息 -type ChatRisMsgCallback struct { - BaseInfo - StationId string `json:"stationId"` // 秒送门店ID - VenderId string `json:"venderId"` // 秒送商家ID +type JdParamJsonObj struct { + StatusId string `json:"statusId"` + BillId string `json:"billId"` ExtendJsonData string `json:"extendJsonData"` + StoreId string `json:"storeId"` + Timestamp string `json:"timestamp"` } type ChatRisInfo struct { diff --git a/platformapi/jdapi/store_test.go b/platformapi/jdapi/store_test.go index 2b0a1f67..c822719a 100644 --- a/platformapi/jdapi/store_test.go +++ b/platformapi/jdapi/store_test.go @@ -1,7 +1,6 @@ package jdapi import ( - "fmt" "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/utils" "testing" @@ -155,7 +154,3 @@ func TestQueryMerchantMemberInfo(t *testing.T) { } baseapi.SugarLogger.Debug(utils.Format4Output(result, false)) } - -func Test1111(t *testing.T) { - fmt.Println(len("我爱你 ml1")) -}