数据权限的修改
This commit is contained in:
+7
@@ -9,6 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.*
|
||||
from
|
||||
common_route a
|
||||
<if test="commonRouteDo.organizationId != null">
|
||||
LEFT JOIN "USER" u ON a.user_id = u.user_id AND u.del_flag = 0
|
||||
</if>
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
@@ -26,6 +29,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and (a.mail_name like concat('%', #{commonRouteDo.synthesize}, '%') OR a.mail_phone LIKE concat('%', #{commonRouteDo.synthesize}, '%') OR a.mail_address_plot LIKE concat('%', #{commonRouteDo.synthesize}, '%')
|
||||
OR a.addressee_name like concat('%', #{commonRouteDo.synthesize}, '%') OR a.addressee_phone LIKE concat('%', #{commonRouteDo.synthesize}, '%') OR a.addressee_address_plot LIKE concat('%', #{commonRouteDo.synthesize}, '%'))
|
||||
</if>
|
||||
<!-- 组织数据权限过滤:通过用户表关联来过滤组织数据 -->
|
||||
<if test="commonRouteDo.organizationId != null">
|
||||
and u.organization_id = #{commonRouteDo.organizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectCommonRouteByCommonRouteId" parameterType="java.lang.Long"
|
||||
|
||||
+28
-18
@@ -140,27 +140,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectAddressBookList" parameterType="com.mhd.common.core.domain.po.AddressBookPo" resultMap="AddressBookResult">
|
||||
<include refid="selectAddressBookVo"/>
|
||||
SELECT
|
||||
ab.*
|
||||
FROM
|
||||
address_book ab
|
||||
<if test="organizationId != null">
|
||||
LEFT JOIN "USER" u ON ab.user_id = u.user_id AND u.del_flag = 0
|
||||
</if>
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="synthesize != null and synthesize != ''"> and (link_man like concat('%', #{synthesize}, '%') OR link_phone LIKE concat('%', #{synthesize}, '%') OR area_name LIKE concat('%', #{synthesize}, '%') OR address LIKE concat('%', #{synthesize}, '%') OR address_plot LIKE concat('%', #{synthesize}, '%')) </if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
|
||||
<if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
|
||||
<if test="provinceCode != null "> and province_code = #{provinceCode}</if>
|
||||
<if test="cityCode != null "> and city_code = #{cityCode}</if>
|
||||
<if test="countyCode != null "> and county_code = #{countyCode}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="cityName != null and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
|
||||
<if test="countyName != null and countyName != ''"> and county_name like concat('%', #{countyName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="doorplate != null and doorplate != ''"> and doorplate = #{doorplate}</if>
|
||||
<if test="defaultStatus != null "> and default_status = #{defaultStatus}</if>
|
||||
<if test="createByName != null and createByName != ''"> and create_by_name like concat('%', #{createByName}, '%')</if>
|
||||
<if test="updateByName != null and updateByName != ''"> and update_by_name like concat('%', #{updateByName}, '%')</if>
|
||||
ab.del_flag = 1
|
||||
<if test="synthesize != null and synthesize != ''"> and (ab.link_man like concat('%', #{synthesize}, '%') OR ab.link_phone LIKE concat('%', #{synthesize}, '%') OR ab.area_name LIKE concat('%', #{synthesize}, '%') OR ab.address LIKE concat('%', #{synthesize}, '%') OR ab.address_plot LIKE concat('%', #{synthesize}, '%')) </if>
|
||||
<if test="userId != null "> and ab.user_id = #{userId}</if>
|
||||
<if test="linkMan != null and linkMan != ''"> and ab.link_man = #{linkMan}</if>
|
||||
<if test="linkPhone != null and linkPhone != ''"> and ab.link_phone = #{linkPhone}</if>
|
||||
<if test="provinceCode != null "> and ab.province_code = #{provinceCode}</if>
|
||||
<if test="cityCode != null "> and ab.city_code = #{cityCode}</if>
|
||||
<if test="countyCode != null "> and ab.county_code = #{countyCode}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and ab.province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="cityName != null and cityName != ''"> and ab.city_name like concat('%', #{cityName}, '%')</if>
|
||||
<if test="countyName != null and countyName != ''"> and ab.county_name like concat('%', #{countyName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and ab.address = #{address}</if>
|
||||
<if test="doorplate != null and doorplate != ''"> and ab.doorplate = #{doorplate}</if>
|
||||
<if test="defaultStatus != null "> and ab.default_status = #{defaultStatus}</if>
|
||||
<if test="createByName != null and createByName != ''"> and ab.create_by_name like concat('%', #{createByName}, '%')</if>
|
||||
<if test="updateByName != null and updateByName != ''"> and ab.update_by_name like concat('%', #{updateByName}, '%')</if>
|
||||
<!-- 组织数据权限过滤:通过用户表关联来过滤组织数据 -->
|
||||
<if test="organizationId != null">
|
||||
and u.organization_id = #{organizationId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
create_time DESC
|
||||
ab.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAddressBookListByManifestId" parameterType="java.lang.Long" resultMap="AddressBookResult">
|
||||
|
||||
Reference in New Issue
Block a user