处理mysql8查询关键字问题
This commit is contained in:
+6
-6
@@ -2328,17 +2328,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
for (String fileField : fileFieldList) {
|
||||
fieldSb.append("bdl." + fileField + ",");
|
||||
if (i == 1) {
|
||||
join.append(" on of.connect_id = bdl." + fileField);
|
||||
join.append(" on osf.connect_id = bdl." + fileField);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
join.append(" or of.connect_id = bdl." + fileField);
|
||||
join.append(" or osf.connect_id = bdl." + fileField);
|
||||
}
|
||||
}
|
||||
String fieldStr = fieldSb.substring(0, fieldSb.length() - 1);
|
||||
|
||||
String field = " of.id,bdl.serial_number,bdl.title,bdl.state,of.file_name,of.connect_id," + fieldStr
|
||||
+ " from oss_file of join buss_document_library bdl" + join.toString();
|
||||
String field = " osf.id,bdl.serial_number,bdl.title,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
+ " from oss_file osf join buss_document_library bdl" + join.toString();
|
||||
|
||||
//查询条件
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
|
||||
@@ -2346,10 +2346,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String type = parameter.get("type").toString();
|
||||
if ("pdf".equals(type)) {
|
||||
//查询条件
|
||||
conditionSb.append(" and of.file_name like '%.pdf%'");
|
||||
conditionSb.append(" and osf.file_name like '%.pdf%'");
|
||||
} else if ("doc".equals(type)) {
|
||||
//查询条件
|
||||
conditionSb.append(" and of.file_name like '%.doc%'");
|
||||
conditionSb.append(" and osf.file_name like '%.doc%'");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user