This commit is contained in:
richboo111
2024-01-24 15:50:27 +08:00
parent ca65ccf637
commit 14a801fb46

View File

@@ -362,8 +362,14 @@ func GenMsgDetailID(jxMsg *JXMsg, vendorID int, elmAppID string) (msgID string)
msgID = utils.Int2Str(d1.AppID) + ":" + d1.AppPoiCode + ":1:" + utils.Int2Str(d1.OpenUserID)
}
if vendorID == VendorIDELM {
var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
msgID = elmAppID + ":" + d2.PlatformShopID + ":3:" + d2.PayLoad.GroupID
var ElmData = ebaiapi.ImMessageSend{}
tempMsgContent, _ := json.Marshal(jxMsg.MsgContent)
if err := json.Unmarshal(tempMsgContent, &ElmData); err != nil {
return ""
}
//var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
//msgID = elmAppID + ":" + d2.PlatformShopID + ":3:" + d2.PayLoad.GroupID
msgID = elmAppID + ":" + ElmData.PlatformShopID + ":3:" + ElmData.PayLoad.GroupID
}
return msgID
}
@@ -380,8 +386,14 @@ func GenMsgListID(jxMsg *JXMsg, vendorID int, elmAppID string) (msgID string) {
msgID = utils.Int2Str(d1.AppID) + ":" + d1.AppPoiCode + ":1"
}
if vendorID == VendorIDELM {
var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
msgID = elmAppID + ":" + d2.PlatformShopID + ":3"
var ElmData = ebaiapi.ImMessageSend{}
tempMsgContent, _ := json.Marshal(jxMsg.MsgContent)
err := json.Unmarshal(tempMsgContent, &ElmData)
fmt.Println(err)
//var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
//msgID = elmAppID + ":" + d2.PlatformShopID + ":3"
msgID = elmAppID + ":" + ElmData.PlatformShopID + ":3:" + ElmData.PayLoad.GroupID
}
return msgID
}
@@ -617,7 +629,11 @@ func CheckAndReply(req *JXMsg, elmAppID string) (err error) {
}
}
tempStr, _ := json.Marshal(temp)
param.Payload.Content = string(tempStr)
tempContent := ebaiapi.Content{
Text: string(tempStr),
}
tempContentStr, _ := json.Marshal(tempContent)
param.Payload.Content = string(tempContentStr)
if err = partner.CurAPIManager.GetAPI(model.VendorIDEBAI, elmAppID).(*ebaiapi.API).BusinessSendMsg(param); err != nil {
apply.IsApply = false
@@ -625,7 +641,7 @@ func CheckAndReply(req *JXMsg, elmAppID string) (err error) {
} else {
jxMsg = &JXMsg{
SendType: SendTypeJx,
MsgContent: temp,
MsgContent: param,
}
userList = &UserMessageList{
VendorID: VendorIDELM,