Commit 5fbf60e0 by jinfeng.wang

fix

parent 6a4c1855
......@@ -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";
String sql = "SELECT * FROM tag_result WHERE ((user_id = #{userId} AND flag != 1) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
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";
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)))";
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