This commit is contained in:
邹宗楠
2025-12-19 16:09:36 +08:00
parent d5c5d5fa97
commit 91c96218ba

View File

@@ -259,10 +259,6 @@ func ReadMsgFromClient(vendorID int, elmAppID string, msg interface{}, storeId i
}
}
globals.SugarLogger.Debugf("------jxmsg:= %s", utils.Format4Output(jxMsg, false))
globals.SugarLogger.Debugf("------vendorID:= %s", utils.Format4Output(vendorID, false))
globals.SugarLogger.Debugf("------elmAppID:= %s", utils.Format4Output(elmAppID, false))
globals.SugarLogger.Debugf("------userList:= %s", utils.Format4Output(userList, false))
//1 存储展示列表时单条数据
if err = SetMessageDetail(jxMsg, vendorID, elmAppID); err != nil {
errList.AddErr(fmt.Errorf("存储详细聊天记录错误:%v", err))
@@ -428,8 +424,6 @@ func SetMessageDetail(req *JXMsg, vendorID int, elmAppID string) error {
}
data, _ := json.Marshal(req)
globals.SugarLogger.Debugf("-------msgID := %s", msgID)
globals.SugarLogger.Debugf("-------data := %s", string(data))
err := rdb.RPush(msgID, string(data))
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
if err != nil || !ok {
@@ -456,8 +450,6 @@ func SetUserList(jxMsg *JXMsg, userList *UserMessageList, vendorID int, elmAppID
}
//存储当前数据
data, _ := json.Marshal(userList)
globals.SugarLogger.Debugf("-------msgID2 := %s", msgID)
globals.SugarLogger.Debugf("-------data2 := %s", string(data))
err = rdb.RPush(msgID, string(data))
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
if err != nil || !ok {
@@ -513,6 +505,9 @@ func GenMsgDetailID(jxMsg *JXMsg, vendorID int, elmAppID string) (msgID string)
case model.VendorIDJD:
var data = jxMsg.MsgContent.(*jdapi.JdParamJsonObj)
msgID = data.BillId + ":" + data.StoreId + ":0:"
if jxMsg.SendType == SendTypeJx {
elmAppID = jdapi.ImCallbackUserMsg
}
systemMsg, userMsg, readMsg, _ := jdapi.ImMsgChange(data, elmAppID)
switch elmAppID {
case jdapi.ImCallbackRisMsg: