1
This commit is contained in:
@@ -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)
|
msgID = utils.Int2Str(d1.AppID) + ":" + d1.AppPoiCode + ":1:" + utils.Int2Str(d1.OpenUserID)
|
||||||
}
|
}
|
||||||
if vendorID == VendorIDELM {
|
if vendorID == VendorIDELM {
|
||||||
var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
|
var ElmData = ebaiapi.ImMessageSend{}
|
||||||
msgID = elmAppID + ":" + d2.PlatformShopID + ":3:" + d2.PayLoad.GroupID
|
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
|
return msgID
|
||||||
}
|
}
|
||||||
@@ -380,8 +386,14 @@ func GenMsgListID(jxMsg *JXMsg, vendorID int, elmAppID string) (msgID string) {
|
|||||||
msgID = utils.Int2Str(d1.AppID) + ":" + d1.AppPoiCode + ":1"
|
msgID = utils.Int2Str(d1.AppID) + ":" + d1.AppPoiCode + ":1"
|
||||||
}
|
}
|
||||||
if vendorID == VendorIDELM {
|
if vendorID == VendorIDELM {
|
||||||
var d2 = jxMsg.MsgContent.(ebaiapi.ImMessageSend)
|
var ElmData = ebaiapi.ImMessageSend{}
|
||||||
msgID = elmAppID + ":" + d2.PlatformShopID + ":3"
|
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
|
return msgID
|
||||||
}
|
}
|
||||||
@@ -617,7 +629,11 @@ func CheckAndReply(req *JXMsg, elmAppID string) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tempStr, _ := json.Marshal(temp)
|
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 {
|
if err = partner.CurAPIManager.GetAPI(model.VendorIDEBAI, elmAppID).(*ebaiapi.API).BusinessSendMsg(param); err != nil {
|
||||||
apply.IsApply = false
|
apply.IsApply = false
|
||||||
@@ -625,7 +641,7 @@ func CheckAndReply(req *JXMsg, elmAppID string) (err error) {
|
|||||||
} else {
|
} else {
|
||||||
jxMsg = &JXMsg{
|
jxMsg = &JXMsg{
|
||||||
SendType: SendTypeJx,
|
SendType: SendTypeJx,
|
||||||
MsgContent: temp,
|
MsgContent: param,
|
||||||
}
|
}
|
||||||
userList = &UserMessageList{
|
userList = &UserMessageList{
|
||||||
VendorID: VendorIDELM,
|
VendorID: VendorIDELM,
|
||||||
|
|||||||
Reference in New Issue
Block a user