岗位配置模糊查询分页

This commit is contained in:
zhaokaiyao@91isoft.com
2021-10-19 16:49:48 +08:00
parent 6b914c1430
commit 4d1876b8c4
3 changed files with 26 additions and 2 deletions
@@ -31,12 +31,27 @@
<if test="name!=null">
p.name like concat(concat('%',#{name}),'%')
</if>
order by locate(#{name},p.name)
</where>
<if test=" null!= pageSize ">
limit ${(current-1) * pageSize},${pageSize}
</if>
</select>
<select id="countPositionAndRole" resultType="java.lang.Integer">
select count(1) from ts_position p
left join ts_position_role pr
on p.id=pr.position_id
left join ts_role r
on pr.role_id=r.id
<where>
<if test="name!=null">
p.name like concat(concat('%',#{name}),'%')
</if>
</where>
</select>
<select id="pageTotal" resultType="Long">
select count(1) as total from ts_position
</select>