This commit is contained in:
richboo111
2023-09-19 10:24:12 +08:00
parent df03f21b40
commit 14ee75684e
2 changed files with 15 additions and 4 deletions

View File

@@ -757,7 +757,7 @@ func NotifyAfsOrderStatus(afsOrder *model.AfsOrder) (err error) {
"color": WX_HIGHLEVEL_TEMPLATE_COLOR2, "color": WX_HIGHLEVEL_TEMPLATE_COLOR2,
}, },
"keyword1": map[string]interface{}{ "keyword1": map[string]interface{}{
"value": afsOrder.AfsOrderID, "value": fmt.Sprintf("%s 第%d号订单", model.VendorChineseNames[afsOrder.VendorID], order.OrderSeq) + afsOrder.AfsOrderID,
"color": WX_TEMPLATE_VENDERCOLOR_JDDJ, "color": WX_TEMPLATE_VENDERCOLOR_JDDJ,
}, },
"keyword2": map[string]interface{}{ "keyword2": map[string]interface{}{

View File

@@ -6,6 +6,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"strings" "strings"
"time"
"git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner"
@@ -276,14 +277,24 @@ func GetImUserList(req []RelInfo) (map[string][]interface{}, error) {
for _, j := range keys { for _, j := range keys {
temp := rdb.LRange(j) temp := rdb.LRange(j)
for _, v := range temp { for _, v := range temp {
retVal[j] = append(retVal[j], v) //过滤过期信息
//暂时写死 if FilterUserList(v) {
//retVal["userList"] = append(retVal["userList"], v) retVal[j] = append(retVal[j], v)
}
} }
} }
return retVal, nil return retVal, nil
} }
func FilterUserList(val string) bool {
retVal := UserMessageList{}
err := json.Unmarshal([]byte(val), &retVal)
if err != nil || time.Now().Unix()-int64(retVal.LatestTime) >= 3600*6 {
return false
}
return true
}
// GetImChatDetail 获取门店用户聊天详情 // GetImChatDetail 获取门店用户聊天详情
func GetImChatDetail(req []UserRelInfo) (map[string][]interface{}, error) { func GetImChatDetail(req []UserRelInfo) (map[string][]interface{}, error) {
retVal := make(map[string][]interface{}, 0) retVal := make(map[string][]interface{}, 0)