Stringsql="SELECT * FROM tag_result WHERE ((user_id = #{userId} AND flag != 1) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
Stringsql="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 {
classCountMapperProvider{
publicStringcount(StringuserId,Stringsearch){
Stringsql="SELECT COUNT(1) FROM tag_result WHERE ((user_id = #{userId} AND flag != 1) OR ('"+userId+"' IN (SELECT user_id FROM user WHERE role = 1)))";
Stringsql="SELECT COUNT(1) FROM tag_result WHERE user_id = #{userId} AND flag = 0";
if(StringUtils.isNotBlank(search)){
sql+=" AND LOWER(package_name) LIKE '%"+search+"%'";