Commit 65c5c529 authored by liwei's avatar liwei

修改了bug

parent 62de1974
...@@ -107,8 +107,10 @@ public class UserUtil { ...@@ -107,8 +107,10 @@ public class UserUtil {
} else if (redisOneHourCount == null && redisTwoHourCount != null){ } else if (redisOneHourCount == null && redisTwoHourCount != null){
// 2小时内被自动驳回过 // 2小时内被自动驳回过
if ((int)redisTwoHourCount >= twoHourCount){ if ((int)redisTwoHourCount >= twoHourCount){
// 2小时内被驳回数大于限制数 禁言一天 // 2小时内被驳回数大于限制数 禁言一天 设置过期时间为2天
cyRedisServiceImpl.hset("user:forbidSpeech:" + date + ":timeFlag",userId, currentTime + twoHourTime*1000); cyRedisServiceImpl.hset("user:forbidSpeech:" + date + ":timeFlag",userId, currentTime + twoHourTime*1000);
// 设置键的过期时间为2天,单位是秒,所以2天等于172800秒
cyRedisServiceImpl.expire("user:forbidSpeech:" + date + ":timeFlag", 172800L);
} else { } else {
cyRedisServiceImpl.set("user:forbidSpeech:" + date + ":oneHourCount:" + userId,1, 1*60*60L); cyRedisServiceImpl.set("user:forbidSpeech:" + date + ":oneHourCount:" + userId,1, 1*60*60L);
cyRedisServiceImpl.incr("user:forbidSpeech:" + date + ":twoHourCount:" + userId, 1L); cyRedisServiceImpl.incr("user:forbidSpeech:" + date + ":twoHourCount:" + userId, 1L);
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
and oacme.article_id = #{entity.articleId} and oacme.article_id = #{entity.articleId}
</if> </if>
<if test="entity.eventType !=null and entity.eventType != '' "> <if test="entity.eventType !=null and entity.eventType != '' ">
and oacme.eventType = #{entity.eventType} and oacme.event_type = #{entity.eventType}
</if> </if>
<if test="entity.content !=null and entity.content != '' "> <if test="entity.content !=null and entity.content != '' ">
and oacme.content like concat('%',#{entity.content},'%') and oacme.content like concat('%',#{entity.content},'%')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment