|
@ -164,11 +164,15 @@ public class Mysql2ESJob implements Job {
|
|
sqlFiledString.append(sqlFiled).append(sqlFiledCondition).append("\'"+sqlFiledValue+"\'");
|
|
sqlFiledString.append(sqlFiled).append(sqlFiledCondition).append("\'"+sqlFiledValue+"\'");
|
|
}
|
|
}
|
|
|
|
|
|
if (sql.contains("where")) {
|
|
|
|
|
|
if (sql.contains("where") && !sql.contains("$")) {
|
|
result.append(" and ").append(sqlFiledString.toString());
|
|
result.append(" and ").append(sqlFiledString.toString());
|
|
}else if (sql.contains("$")){
|
|
}else if (sql.contains("$")){
|
|
StringBuffer otherCondition = new StringBuffer();
|
|
StringBuffer otherCondition = new StringBuffer();
|
|
otherCondition.append(" where ").append(sqlFiledString.toString());
|
|
|
|
|
|
if (sql.contains("where")){
|
|
|
|
otherCondition.append(" and ").append(sqlFiledString.toString());
|
|
|
|
}else{
|
|
|
|
otherCondition.append(" where ").append(sqlFiledString.toString());
|
|
|
|
}
|
|
result.replace(result.indexOf("$"),result.indexOf("$")+1,otherCondition.toString());
|
|
result.replace(result.indexOf("$"),result.indexOf("$")+1,otherCondition.toString());
|
|
}else {
|
|
}else {
|
|
result.append(" where ").append(sqlFiledString.toString());
|
|
result.append(" where ").append(sqlFiledString.toString());
|