|
@@ -57,9 +57,12 @@ public abstract class AbstractLogicMethod extends AbstractMethod {
|
|
|
true);
|
|
|
sqlScript += (StringPool.NEWLINE + table.getLogicDeleteSql(true, false) +
|
|
|
StringPool.NEWLINE);
|
|
|
+ sqlScript += SqlScriptUtils.convertIf(String.format(" AND ${%s}", Constants.WRAPPER_SQLSEGMENT),
|
|
|
+ String.format("%s != null and %s != '' and ew.notEmptyOfWhere", Constants.WRAPPER_SQLSEGMENT, Constants.WRAPPER_SQLSEGMENT),
|
|
|
+ true);
|
|
|
sqlScript += SqlScriptUtils.convertIf(String.format(" ${%s}", Constants.WRAPPER_SQLSEGMENT),
|
|
|
- String.format("%s!=null and %s!=''", Constants.WRAPPER_SQLSEGMENT, Constants.WRAPPER_SQLSEGMENT),
|
|
|
- false);
|
|
|
+ String.format("%s != null and %s != '' and ew.emptyOfWhere", Constants.WRAPPER_SQLSEGMENT, Constants.WRAPPER_SQLSEGMENT),
|
|
|
+ true);
|
|
|
sqlScript = SqlScriptUtils.convertChoose("ew!=null", sqlScript,
|
|
|
"AND " + table.getLogicDeleteSql(false, false));
|
|
|
sqlScript = SqlScriptUtils.convertTrim(sqlScript, "WHERE", null, "AND|OR",
|