Commit 7703329d authored by tangwei's avatar tangwei

增加排序

parent 5e1ae2c4
...@@ -101,26 +101,26 @@ ...@@ -101,26 +101,26 @@
<!--返回路线信息--> <!--返回路线信息-->
<select id="getRouteInfo" resultType="java.util.HashMap"> <select id="getRouteInfo" resultType="java.util.HashMap">
SELECT SELECT
r.`name`, r.`name`,
r.id, r.id,
r.boss, r.boss,
r.tel, r.tel,
r.remark, r.remark,
r.dept_name deptName, r.dept_name deptName,
r.boss_name bossName r.boss_name bossName
FROM FROM
`p_route` r `p_route` r
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if> <if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if> <if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if> <if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if> <if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
<choose> <choose>
<when test="deptId > 0 " > AND r.dept_id = #{deptId}</when> <when test="deptId > 0 " > AND r.dept_id = #{deptId}</when>
<when test="deptId == -1 " > AND r.dept_id in(0,-1)</when> <when test="deptId == -1 " > AND r.dept_id in(0,-1)</when>
</choose> </choose>
ORDER BY id ORDER BY id DESC
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment