Commit f1ab735b by jinfeng.wang

fix

parent c10da4fd
......@@ -41,7 +41,7 @@ public interface TagDao {
String sql = "SELECT * FROM tag_list WHERE tag < " + tag;
if (StringUtils.isNotBlank(userId)) {
sql += " AND (((user_id NOT LIKE '%" + userId + "%' OR user_id IS NULL) AND flag = 0) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
sql += " AND (user_id NOT LIKE '%" + userId + "%' OR user_id IS NULL) AND flag = 0";
}
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
......@@ -92,7 +92,7 @@ public interface TagDao {
public String count(String search, int tag, String userId) {
String sql = "SELECT COUNT(1) FROM tag_list WHERE tag < " + tag;
if (StringUtils.isNotBlank(userId)) {
sql += " AND (((user_id NOT LIKE '%" + userId + "%' OR user_id IS NULL) AND flag = 0) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
sql += " AND (user_id NOT LIKE '%" + userId + "%' OR user_id IS NULL) AND flag = 0";
}
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
......
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