岗位配置模糊查询分页
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user