|
@@ -632,7 +632,9 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
|
|
|
"LEFT JOIN %s d on d.id=a.receive_user_id "+
|
|
|
"where a.own_id= %d and a.iswithdraw = 0"+
|
|
|
"AND ((a.send_user_id= %d AND a.receive_user_id= %d) or (a.send_user_id= %d AND a.receive_user_id= %d)) "+
|
|
|
- "AND a.type=2 %s "+
|
|
|
+ "AND a.type IN ( 2, 6 ) %s "+
|
|
|
+ "AND a.chat_group_id = 0 "+
|
|
|
+ "AND a.send_user_type = a.receive_user_type "+
|
|
|
"ORDER BY a.create_time desc,a.id asc "+
|
|
|
"limit 0 , %d ",
|
|
|
util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.BASE_USER, util.BASE_USER,
|
|
@@ -664,6 +666,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
|
|
|
"AND (a.type = 5 or a.type=4 or a.type=6 or a.type=7 or a.type=8 ) "+
|
|
|
"AND c.ent_id = %d "+
|
|
|
"AND c.user_id = %d %s "+
|
|
|
+ "AND a.send_user_type != a.receive_user_type "+
|
|
|
"ORDER BY a.create_time desc ,a.id asc "+
|
|
|
"limit 0 , %d ",
|
|
|
util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.SOCIALIZE_CHAT_SESSION,
|
|
@@ -680,6 +683,7 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
|
|
|
"AND a.own_id = %d "+
|
|
|
"AND c.ent_id = %d "+
|
|
|
"AND c.user_id = %d "+
|
|
|
+ "AND a.send_user_type != a.receive_user_type "+
|
|
|
"AND ( a.type = 4 OR a.type = 5 or a.type=6 or a.type=7 or a.type=8) %s "+
|
|
|
"ORDER BY a.create_time desc,a.id asc "+
|
|
|
"limit 0 , %d ",
|
|
@@ -701,14 +705,13 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- log.Println(in.MsgType, len(*data))
|
|
|
if (in.MsgType == 3 || in.MsgType == 2) && data != nil && len(*data) > 0 {
|
|
|
_, _, positionData := EntPerson(in.EntId, true)
|
|
|
for _, v := range *data {
|
|
|
positionId := quitl.IntAll(v["send_position_id"])
|
|
|
if positionId != 0 {
|
|
|
v["userName"] = positionData[positionId]
|
|
|
- log.Println(v["userName"], positionData[positionId])
|
|
|
+ //log.Println(v["userName"], positionData[positionId])
|
|
|
}
|
|
|
}
|
|
|
|