阅读背景:

Spring Boot自定义Mapper的SQL语句

来源:互联网 

代码如下:
先创建一个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



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: