代码如下:
先创建一个Provider类:
public class RptEbankFsymtTranflowingProvider {
public String select(String orgId, String startDate, String endDate, String merId) {
String sql = "select * from RPT_EBANK_FSYMT_TRANFLOWING where 1=1";
if (orgId != null) {
sql += " and ORG_ID=#{orgId}";
}
if (startDate != null) {
sql += " and DATA_DT>=#{startDate}";
}
if (endDate != null) {
sql += " and DATA_DT<=#{endDate}";
}
if (merId != null) {
sql += " and MER_ID=#{merId}";
}
return sql;
}
}public class RptEbankFs