|
@@ -18,6 +18,12 @@ type MessageService struct{}
|
|
|
|
|
|
// 修改消息阅读状态
|
|
// 修改消息阅读状态
|
|
func (service *MessageService) ChangeReadStatus(data *message.ChangeReadStatusReq) error {
|
|
func (service *MessageService) ChangeReadStatus(data *message.ChangeReadStatusReq) error {
|
|
|
|
+ row := entity.ClickhouseConn.QueryRow(context.Background(), fmt.Sprintf("SELECT count(*) from message_user_summary WHERE userId = '%s' ANd bitmapContains(readMsg,%d)", data.UserId, data.Id))
|
|
|
|
+ var count uint64
|
|
|
|
+ row.Scan(&count)
|
|
|
|
+ if count > 0 {
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
msg := entity.Mysql.FindOne("message_send_log", map[string]interface{}{"id": data.Id}, "group_id", "")
|
|
msg := entity.Mysql.FindOne("message_send_log", map[string]interface{}{"id": data.Id}, "group_id", "")
|
|
if msg != nil && len(*msg) > 0 {
|
|
if msg != nil && len(*msg) > 0 {
|
|
groupId := qutil.IntAll((*msg)["group_id"])
|
|
groupId := qutil.IntAll((*msg)["group_id"])
|