<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ruili.wcp.dao.config.OperationMapper">
|
<!-- 查询带操作信息SQL -->
|
<select id="getOperationListByViewId" parameterType="Long" resultType="com.ruili.wcp.data.entity.config.Operation">
|
SELECT a.*
|
FROM cnf_operation a,
|
cnf_view_operation b
|
WHERE a.operation_id = b.operation_id
|
and b.view_id = #{viewId}
|
order by b.sort_num asc
|
</select>
|
|
<select id="getOperationListByFormId" parameterType="Long" resultType="com.ruili.wcp.data.entity.config.Operation">
|
SELECT a.*
|
FROM cnf_operation a,
|
cnf_form_operation b
|
WHERE a.operation_id = b.operation_id
|
and b.form_id = #{formId}
|
order by b.sort_num asc
|
</select>
|
|
|
<select id="selectWithOperation" parameterType="map" resultType="com.ruili.wcp.data.entity.config.Operation">
|
select *
|
from (
|
select rownum as rn,
|
a.*
|
from (select *
|
from cnf_operation
|
WHERE module_id = #{moduleId}
|
order by enable_system_operation desc, create_time desc) a
|
) tt
|
where rn between ${currIndex} and ${pageSize}
|
</select>
|
|
|
<select id="selectCountWithOperation" parameterType="map" resultType="Integer">
|
select count(1)
|
from cnf_operation
|
WHERE module_id = #{moduleId}
|
</select>
|
|
</mapper>
|