Commit b76cffaf by Lee Munkyeong

メッセージ検索修正。

parent ac7f1409
...@@ -124,6 +124,9 @@ public class ChatMessageDao extends AbstractDao { ...@@ -124,6 +124,9 @@ public class ChatMessageDao extends AbstractDao {
sql.append(" WHERE cm.message_type = 0 "); sql.append(" WHERE cm.message_type = 0 ");
List<String> whereSqlList = new ArrayList<String>(); List<String> whereSqlList = new ArrayList<String>();
for (String keyword : keywords) { for (String keyword : keywords) {
if (StringUtil.isNullOrEmpty(keyword)) {
continue;
}
whereSqlList.add("cm.message LIKE '%" + keyword + "%'"); whereSqlList.add("cm.message LIKE '%" + keyword + "%'");
} }
String whereSql = StringUtil.join(" AND ", whereSqlList); String whereSql = StringUtil.join(" AND ", whereSqlList);
......
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