Forráskód Böngészése

未读状态修改

WH01243 3 éve
szülő
commit
6f77b7397a
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      service/message_mail_box.go

+ 1 - 1
service/message_mail_box.go

@@ -70,7 +70,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 		if data != nil {
 			customerMessageId := util.Inhandle(data)
 			//客服的用户列表
-			sqlStr = "SELECT  IF  ( b.nickname = '', CONCAT(SUBSTR( b.phone, 1, 3 ),'****',SUBSTR( b.phone, 8, 11)), b.nickname ) AS name,  b.id,  e.title,  b.headimg,  e.type,  e.link,  e.content,  a.create_time,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h  left join socialize_chat_session i ON a.own_type = 1 AND a.own_id = i.id     WHERE     h.own_type = 1    AND  i.id=f.id      AND h.isread = 0   ) AS number   FROM  socialize_message_mailbox a  LEFT JOIN base_user b ON  a.own_type=2 and b.id = a.own_id    LEFT JOIN socialize_message e ON e.id = a.messag_id  LEFT JOIN socialize_chat_session f ON a.own_type=1 and  a.own_id=f.id   WHERE  a.id IN  (" + customerMessageId + ")" + phoneSql + "   ORDER BY  a.create_time DESC"
+			sqlStr = "SELECT  IF  ( b.nickname = '', CONCAT(SUBSTR( b.phone, 1, 3 ),'****',SUBSTR( b.phone, 8, 11)), b.nickname ) AS name,  b.id,  e.title,  b.headimg,  e.type,  e.link,  e.content,  a.create_time,  (  SELECT   count( h.id )   FROM   socialize_message_mailbox h  left join socialize_chat_session i ON h.own_type = 1 AND h.own_id = i.id     WHERE     h.own_type = 1     AND i.ent_id=f.ent_id and  i.user_id=f.user_id       AND h.isread = 0   ) AS number   FROM  socialize_message_mailbox a  LEFT JOIN base_user b ON if (a.send_user_type=1 ,a.receive_user_id=b.id,a.send_user_id=b.id)   LEFT JOIN socialize_message e ON e.id = a.messag_id  LEFT JOIN socialize_chat_session f ON a.own_type=1 and  a.own_id=f.id   WHERE  a.id IN  (" + customerMessageId + ")" + phoneSql + "   ORDER BY  a.create_time DESC"
 			fmt.Println(in.EntUserId)
 			v = make([]interface{}, 0)
 		}