Commit 4954e32d by zhengxj

finish 服务商用户不做数据权限处理 on 20190320 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18741 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 418f5040
...@@ -314,23 +314,6 @@ ...@@ -314,23 +314,6 @@
</select> </select>
<select id="getDataRightTest" resultType="Integer"> <select id="getDataRightTest" resultType="Integer">
SELECT DISTINCT sys_user.id from sys_user
LEFT JOIN
sys_organization ON sys_user.org_id = sys_organization.id
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
<if test="userId !=null ">
and sys_user.id = #{userId}
</if>
WHERE
sys_organization.parent_id != 0
and sys_user.user_type =2
<if test="groupId !=null ">
and sys_user.group_id = #{groupId}
</if>
</select>
<select id="getDataRight" resultType="Integer">
SELECT sys_user.id from sys_user SELECT sys_user.id from sys_user
where user_type=2 where user_type=2
<if test="groupId !=null "> <if test="groupId !=null ">
...@@ -345,11 +328,22 @@ ...@@ -345,11 +328,22 @@
WHERE WHERE
sys_organization.parent_id != 0 sys_organization.parent_id != 0
<if test="userId !=null "> <if test="userId !=null ">
and sys_user.id = #{userId} and sys_user_org.id = #{userId}
</if> </if>
ORDER BY ORDER BY
sys_organization.id ASC sys_organization.id ASC
) )
</select> </select>
<select id="getDataRight" resultType="Integer">
SELECT DISTINCT su.id from
sys_user_org suo
LEFT JOIN sys_user su ON suo.org_id = su.org_id
WHERE su.user_type=2
<if test="userId !=null ">
and suo.user_id = #{userId}
</if>
<if test="groupId !=null ">
and group_id = #{groupId}
</if>
</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!