|
@@ -1252,8 +1252,10 @@ func GroupAnnouncementReminder(in *messagecenter.GroupAnnouncementReminderReq) i
|
|
|
//查询用户所有的职位id
|
|
|
data := IC.BaseMysql.SelectBySql(fmt.Sprintf("SELECT count(1) FROM socialize_chat_group_person a INNER JOIN socialize_chat_group_notice b on a.position_id =%d AND a.chat_group_id = %d AND nottice_tip =1 AND a.chat_group_id = b.chat_group_id ", in.PositionId, in.GroupId))
|
|
|
if data != nil && len(*data) > 0 {
|
|
|
- IC.BaseMysql.Update(util.SOCIALIZE_CHAT_GROUP_PERSON, map[string]interface{}{"position_id": in.PositionId, "chat_group_id": in.GroupId}, map[string]interface{}{"nottice_tip": 0})
|
|
|
- return 1
|
|
|
+ if quitl.IntAll((*data)[0]["count"]) > 0 {
|
|
|
+ IC.BaseMysql.Update(util.SOCIALIZE_CHAT_GROUP_PERSON, map[string]interface{}{"position_id": in.PositionId, "chat_group_id": in.GroupId}, map[string]interface{}{"nottice_tip": 0})
|
|
|
+ return 1
|
|
|
+ }
|
|
|
}
|
|
|
return 0
|
|
|
}
|