|
|
|
@ -39,10 +39,11 @@ public class FileLibrayListPlugin extends ListPlugin { |
|
|
|
// return super.getSql(objectValue);
|
|
|
|
// return super.getSql(objectValue);
|
|
|
|
String sql = "select * from file_library "; |
|
|
|
String sql = "select * from file_library "; |
|
|
|
//阅读权限
|
|
|
|
//阅读权限
|
|
|
|
sql += "where read_auth = 1"; |
|
|
|
sql += "where (read_auth = 1"; |
|
|
|
if (!filterDtoList.isEmpty()) { |
|
|
|
if (!filterDtoList.isEmpty()) { |
|
|
|
OnlineFilterDto onlineFilterDto = filterDtoList.get(0); |
|
|
|
OnlineFilterDto onlineFilterDto = filterDtoList.get(0); |
|
|
|
Object filterFile = onlineFilterDto.getColumnValue(); |
|
|
|
Object filterFile = onlineFilterDto.getColumnValue(); |
|
|
|
|
|
|
|
//上线
|
|
|
|
sql += " and classification = "+filterFile.toString(); |
|
|
|
sql += " and classification = "+filterFile.toString(); |
|
|
|
} |
|
|
|
} |
|
|
|
System.out.println(sql); |
|
|
|
System.out.println(sql); |
|
|
|
@ -56,7 +57,19 @@ public class FileLibrayListPlugin extends ListPlugin { |
|
|
|
if (userType.equals("0")) { |
|
|
|
if (userType.equals("0")) { |
|
|
|
sql += " or read_auth = 2"; |
|
|
|
sql += " or read_auth = 2"; |
|
|
|
} |
|
|
|
} |
|
|
|
sql += " or (create_user_id = "+userId.toString()+" and read_auth = 3)"; |
|
|
|
sql += " and publish_status = 1"; |
|
|
|
|
|
|
|
sql += " or (create_user_id = "+userId.toString()+" and read_auth = 3))"; |
|
|
|
|
|
|
|
//下线
|
|
|
|
|
|
|
|
sql += " or (publish_status = 2"; |
|
|
|
|
|
|
|
if (!filterDtoList.isEmpty()) { |
|
|
|
|
|
|
|
OnlineFilterDto onlineFilterDto = filterDtoList.get(0); |
|
|
|
|
|
|
|
Object filterFile = onlineFilterDto.getColumnValue(); |
|
|
|
|
|
|
|
sql += " and classification = "+filterFile.toString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (userType.equals("0")) { |
|
|
|
|
|
|
|
sql += " or read_auth = 2"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sql += " or (create_user_id = "+userId.toString()+" and read_auth = 3))"; |
|
|
|
|
|
|
|
|
|
|
|
return sql; |
|
|
|
return sql; |
|
|
|
} |
|
|
|
} |
|
|
|
|