old mode 100644
new mode 100755
| | |
| | | <!-- 保存属性信息 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> |
| | | |
| | |
| | | <!-- 保存属性信息 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> |
| | | |
| | |
| | | </update> |
| | | |
| | | <select id="queryPrivilegeUsers" parameterType="map" resultType="map"> |
| | | select t.user_id userId from p_privilege_user t |
| | | select t.user_id userId |
| | | from p_privilege_user t |
| | | 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 t.p_id = #{pId} |
| | | 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 |
| | | select t.user_id userId |
| | | from p_privilege_user t |
| | | inner join p_privilege_group pg on t.p_id = pg.pg_id and pg.status_cd = '0' and pg.pg_id != '600201904002' |
| | | inner join p_privilege_rel pr on pg.pg_id = pr.pg_id and pr.status_cd ='0' |
| | | 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 pr.p_id = #{pId} |
| | | 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> |