| | |
| | | <mapper namespace="com.lf.server.mapper.data.VerMapper"> |
| | | <!-- 统计行数 --> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_ver a inner join lf.sys_dir b |
| | | on a.dirid = b.id |
| | | select count(*) from lf.sys_ver a |
| | | <where> |
| | | 1=1 |
| | | <if test="name != null"> |
| | | and a.name = #{name} |
| | | 1 = 1 |
| | | <if test="dirid != null"> |
| | | and a.dirid = ANY(fn_rec_array(#{dirid}, 'dir')) |
| | | </if> |
| | | |
| | | <if test="depName != null"> |
| | | and b.name = #{depName} |
| | | <if test="name != null"> |
| | | and a.name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.VerEntity"> |
| | | select a.*,b.name as dep_name |
| | | from lf.sys_ver a inner join lf.sys_dir b |
| | | on a.dirid = b.id |
| | | select a.*, fn_rec_query(a.dirid, 'dir') depName, fn_uname(create_user) createName from lf.sys_ver a |
| | | <where> |
| | | 1=1 |
| | | <if test="name != null"> |
| | | and a.name = #{name} |
| | | <if test="dirid != null"> |
| | | and a.dirid = ANY(fn_rec_array(#{dirid}, 'dir')) |
| | | </if> |
| | | |
| | | <if test="depName != null"> |
| | | and b.name = #{depName} |
| | | <if test="name != null"> |
| | | and a.name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |