java110
2021-05-09 f42983b35c738a28ed4b9d1732d1045c5f2a19bb
java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml
old mode 100644 new mode 100755
@@ -14,7 +14,11 @@
    <!-- 保存属性信息 c_business_attrs -->
    <insert id="saveUserDefaultPrivilege" parameterType="Map">
        <![CDATA[
            INSERT INTO p_privilege_user(p_id,privilege_flag,user_id,store_id) VALUES(#{pId},'1',#{userId},#{storeId})
                            INSERT INTO p_privilege_user(p_id,privilege_flag,user_id,store_id) VALUES(#{pId},'1',#{userId},#{storeId})
        ]]>
    </insert>
@@ -149,7 +153,11 @@
    <!-- 保存属性信息 c_business_attrs -->
    <insert id="addUserPrivilege" parameterType="Map">
        <![CDATA[
            INSERT INTO p_privilege_user(p_id,privilege_flag,user_id,store_id) VALUES(#{pId},#{privilegeFlag},#{userId},#{storeId})
                            INSERT INTO p_privilege_user(p_id,privilege_flag,user_id,store_id) VALUES(#{pId},#{privilegeFlag},#{userId},#{storeId})
        ]]>
    </insert>
@@ -175,8 +183,12 @@
        INNER JOIN p_privilege p on t.p_id = p.p_id and p.status_cd = '0'
        where t.privilege_flag = '0'
        and t.status_cd = '0'
        and p.resource = #{resource}
        and t.store_id = #{storeId}
        <if test="resource != null and resource != ''">
            and p.resource = #{resource}
        </if>
        <if test="storeId != null and storeId != ''">
            and t.store_id = #{storeId}
        </if>
        union ALL
        select t.user_id userId
        from p_privilege_user t
@@ -185,8 +197,12 @@
        INNER JOIN p_privilege p on pr.p_id = p.p_id and p.status_cd = '0'
        where t.status_cd = '0'
        and t.privilege_flag = '1'
        and p.resource = #{resource}
        and t.store_id = #{storeId}
        <if test="resource != null and resource != ''">
            and p.resource = #{resource}
        </if>
        <if test="storeId != null and storeId != ''">
            and t.store_id = #{storeId}
        </if>
    </select>
</mapper>