| | |
| | | FROM |
| | | sys_user_dept T1 |
| | | LEFT JOIN sys_dept T2 ON T1.dept_id = T2.dept_id |
| | | <where> |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | T1.dept_id = #{tenantId} |
| | | </if> |
| | | </where> |
| | | GROUP BY T1.user_id |
| | | ) T2 on T2.user_id = u.user_id |
| | | where u.del_flag = '0' |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | and u.tenant_id = #{tenantId} |
| | | </if> |
| | | <if test="userId != null and userId != 0"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | |
| | | <if test="loginDate != null">login_date = #{loginDate},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="tenantId != null">tenant_id = #{tenantId},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |