当前位置:Gxlcms > mysql > Mybatis动态传表名(同样适用于动态传表字段)

Mybatis动态传表名(同样适用于动态传表字段)

时间:2021-07-01 10:21:17 帮助过:27人阅读

//设置map参数,innerTable,outTable对应的表名public String sendDetail(){pager = getStartPager();if( null !=msg msg.equals(succ)){map.put(innerTable,bs_sent_inner );map.put(outTable,bs_sent_out );pager = outBoxInnerService.findSendPager(pag

//设置map参数,innerTable,outTable对应的表名

public String sendDetail(){
pager = getStartPager();
if( null !=msg && msg.equals("succ")){
map.put("innerTable","bs_sent_inner" );
map.put("outTable","bs_sent_out" );
pager = outBoxInnerService.findSendPager(pager, map);
}
if(null !=msg && msg.equals("falilure")){
map.put("innerTable","bs_fail_inner" );
map.put("outTable","bs_fail_out" );
pager = outBoxInnerService.findSendPager(pager, map);
}
map.remove("innerTable");
map.remove("outTable");

return "sendDetail";
}



select * FROM ${innerTable} where 1 = 1

and ms.config_id = #{config_id}

人气教程排行