| | |
| | | LEFT JOIN t_user_role ur ON (u.user_id = ur.user_id) |
| | | LEFT JOIN t_role r ON r.role_id = ur.role_id |
| | | WHERE 1 = 1 |
| | | and u.dept_id is not null |
| | | <if test="user.username != null and user.username != ''"> |
| | | AND u.username = #{user.username} |
| | | </if> |
| | |
| | | select user_id userId, dept_id deptId from t_user_data_permission |
| | | where user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="selectDappUserInPage" resultType="user"> |
| | | select a.*, b.invite_id |
| | | from t_user a |
| | | inner join dapp_user_member_relate b on a.user_id=b.user_id |
| | | <where> |
| | | <if test="user.username != null and user.username != ''"> |
| | | AND (a.username = #{user.username} or b.invite_id = #{user.username}) |
| | | </if> |
| | | <if test="user.createBy != null and user.createBy != ''"> |
| | | AND b.create_user = #{user.createBy} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |