Commit 7703329d authored by tangwei's avatar tangwei

增加排序

parent 5e1ae2c4
......@@ -101,26 +101,26 @@
<!--返回路线信息-->
<select id="getRouteInfo" resultType="java.util.HashMap">
SELECT
r.`name`,
r.id,
r.boss,
r.tel,
r.remark,
r.dept_name deptName,
r.boss_name bossName
FROM
`p_route` r
WHERE
r.is_delete = 0
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
<choose>
<when test="deptId > 0 " > AND r.dept_id = #{deptId}</when>
<when test="deptId == -1 " > AND r.dept_id in(0,-1)</when>
</choose>
ORDER BY id
r.`name`,
r.id,
r.boss,
r.tel,
r.remark,
r.dept_name deptName,
r.boss_name bossName
FROM
`p_route` r
WHERE
r.is_delete = 0
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
<choose>
<when test="deptId > 0 " > AND r.dept_id = #{deptId}</when>
<when test="deptId == -1 " > AND r.dept_id in(0,-1)</when>
</choose>
ORDER BY id DESC
<choose>
<when test="pageSize==-1"></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