Commit 945a9ca1 by zhengxj

finish 订单渠道搜索 on 20190319 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18689 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent c4147846
...@@ -313,20 +313,43 @@ ...@@ -313,20 +313,43 @@
sys_organization.id ASC sys_organization.id ASC
</select> </select>
<select id="getDataRight" resultType="Integer"> <select id="getDataRightTest" resultType="Integer">
SELECT DISTINCT sys_user.id from sys_user SELECT DISTINCT sys_user.id from sys_user
LEFT JOIN LEFT JOIN
sys_organization ON sys_user.org_id = sys_organization.id sys_organization ON sys_user.org_id = sys_organization.id
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sys_organization.parent_id != 0
and sys_user.user_type =2
<if test="userId !=null "> <if test="userId !=null ">
and sys_user.id = #{userId} and sys_user.id = #{userId}
</if> </if>
WHERE
sys_organization.parent_id != 0
and sys_user.user_type =2
<if test="groupId !=null "> <if test="groupId !=null ">
and sys_user.group_id = #{groupId} and sys_user.group_id = #{groupId}
</if> </if>
</select> </select>
<select id="getDataRight" resultType="Integer">
SELECT sys_user.id from sys_user
where user_type=2
<if test="groupId !=null ">
and sys_user.group_id = #{groupId}
</if>
and sys_user.org_id in(
SELECT DISTINCT
sys_organization.id
FROM
sys_organization
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sys_organization.parent_id != 0
<if test="userId !=null ">
and sys_user.id = #{userId}
</if>
ORDER BY
sys_organization.id ASC
)
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!