mybaties
mybaties xml构造参数名字
<if test="seach != null and seach != ''"> <bind name="pattern" value="'%' + seach + '%'" /> </if>
函数
UUID()
LAST_INSERT_ID()
this.getBaseMapper().selectOne(newQueryWrapper<Retailer>().lambda().eq(Retailer::getDeleteFlag,FlagConstant.FALSE) .eq(Retailer::getBranchId,branchId).eq(Retailer::getStatus,DocState.ENABLED));
<trimprefix="set"suffixOverrides=","> <trimprefix="headquarters_name=case"suffix="end,">
<foreachcollection="list"item="item"index="index"> whenid=#{item.id}then#{item.headquartersName} </foreach>
</trim> </trim> IF(s7.branch_idISNULL,'',CONCAT(s7.branch_id,'_')) SELECT time_format(TIMEDIFF(NOW(), UTC_TIMESTAMP), "%h:%i"); <choose> <when test="env=='IN'"> TRIM(CONCAT_WS('',wh.address_line_1,'',wh.address_line_2,'',wh.address_line_3))ASaddress </when> <otherwise> wh.address </otherwise> </choose> CONCAT_WS('',val_china,wh.address)ASaddress
spring4通过继承这个类(AbstractRoutingDataSource)扩展方法
setTargetDataSources和determineCurrentLookupKey
动态注入数据源。在bean.xml中实例化jdbc.properties中配置的数据源属性,可以通过ThreadLocal利用面向切面设置方法调用前后的数据源类型并调用。