Commit 93ad9b89 by jinfeng.wang

fix

parent f1ab735b
......@@ -52,7 +52,7 @@ public interface ResultDao {
class ListMapperProvider {
public String list(String userId, String search) {
String sql = "SELECT * FROM tag_result WHERE ((user_id = #{userId} AND flag != 1) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
String sql = "SELECT * FROM tag_result WHERE user_id = #{userId} AND flag = 0";
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
}
......@@ -102,7 +102,7 @@ public interface ResultDao {
class CountMapperProvider {
public String count(String userId, String search) {
String sql = "SELECT COUNT(1) FROM tag_result WHERE ((user_id = #{userId} AND flag != 1) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
String sql = "SELECT COUNT(1) FROM tag_result WHERE user_id = #{userId} 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