关于mysql.xml文件中 #{_parameter}的说明

  dao:    */
public List getUserTotalCountBarData(Integer orgId){
List countList=null;
try {
countList=this.getSqlSession().selectList(getMethodPath("getUserTotalCountBarData"), orgId);
} catch (Exception e) {
e.printStackTrace();
}
return countList;

}



xml:



执行:


 Preparing: SELECT o.`organizationId`,o.`organizationName`, (SELECT SUM(quantity) FROM `t_user_gdata_statistics_total_count` WHERE LOCATE(o.`organizationPath`,organizationPath)=1) quantity FROM `t_user_organization` o WHERE ( o.`organizationId` = ? OR o.`parentOrganizationId` = ? ) 
Parameters: 1(Integer), 1(Integer)
     Total: 34

#{_parameter}这个在里面是我理解成通用变量.



你可能感兴趣的:(mybatis)