复杂查询的解决方案

<sql-query name="system.perm.operperm">
select t.perm_code as permCode, 
t.module_code as moduleCode, 
t.perm_name as permName, 
t.perm_desc as permDesc, 
t.port_no as portNo, 
t.perm_type_code as permTypeCode 
from sys_perm t join sys_oper_perm o 
on t.perm_code = o.perm_code 
where o.oper_id = :operId
</sql-query>

 

Param param = Param() ;
param.getQueryConditions().put("operId", opervo.getOperId()) ; //此例设置固定参数 :operId
return dao.queryByNamedSqlQuery("system.perm.operperm", param).getDatas() ;

 

你可能感兴趣的:(DAO,sql)