MyBatis一个Mapper方法里写多个SQL

MyBatis一个Mapper方法里写多个SQL,需要配置:

<update id="rejectOrderLoan" parameterType="com.ly.fn.biz.loan.service.model.OrderLoan" >

update OrderLoan

<set>

financeEndDate = NULL,

    loanDate = NULL,

auditStatus = 0,

loanStatus = NULL,

loanProportion = NULL,

canFinanceAmount = NULL, 

advancePayment = NULL,

proFormaInterest = NULL,

maxLoanAmount = NULL,

realLoan = NULL,

rejected = 1

</set>

where id = #{id};

delete from OrderLoanAudit where loanId =  #{id};

</update>

 

JDBC配置:

url=jdbc:mysql://10.100.157.28:3306/tcbiz_loan?useUnicode=yes&characterEncoding=UTF-8&autoReconnect=true&useServerPrepStmts=true&useCursorFetch=true&allowMultiQueries=true
username=root
password=1234
maxActive=10
maxIdle=10
minIdle=1
initialSize=1

上面红色的必须配置

posted @ 2017-04-27 10:58  橙子味的小云儿  阅读(1328)  评论(0编辑  收藏  举报