xiejun
2023-10-16 a85cb705274d8fbd9f5fba86ff1c39c13ac66de0
Source/UBCS/ubcs-service/ubcs-user/src/main/resources/mapper/UserMapper.xml
@@ -29,6 +29,7 @@
        <result column="pwd_update_time" property="pwdUpdateTime"/>
        <result column="secretgrade" property="secretGrade"/>
        <result column="strategy_update_status" property="strategyUpdateStatus"/>
        <result column="user_status" property="userStatus"/>
    </resultMap>
@@ -39,11 +40,8 @@
            LEFT JOIN PL_SYS_USER_PWDSTRATEGY plup on plup.USER_ID=pou.ID
            LEFT JOIN PL_SYS_PWDSTRATEGY pss on pss.ID=plup.PWDSTRATEGY_ID
        WHERE is_deleted = 0
        <if test="tenantId!=null and tenantId != ''">
            and tenant_id = #{tenantId}
        </if>
        <if test="user.tenantId!=null and user.tenantId != ''">
            and tenant_id = #{user.tenantId}
            and pou.tenant_id = #{user.tenantId}
        </if>
        <if test="user.account!=null and user.account != ''">
            and account = #{user.account}
@@ -77,7 +75,11 @@
            LEFT JOIN PL_SYS_USER_PWDSTRATEGY plup on plup.USER_ID=pou.ID
            LEFT JOIN PL_SYS_PWDSTRATEGY pss on pss.ID=plup.PWDSTRATEGY_ID
        WHERE
            tenant_id = #{param1} and account = #{param2} and is_deleted = 0
            pou.tenant_id = #{param1} and account = #{param2}
            <if test="param3!=null and param3 != ''">
                and name = #{param3}
            </if>
          and is_deleted = 0
    </select>
    <select id="exportUser" resultType="com.vci.ubcs.system.user.excel.UserExcel">
@@ -90,9 +92,23 @@
    </select>
    <select id="selectByIdUser" resultType="com.vci.ubcs.system.user.entity.User">
        select id, code, user_type, account, password , name, real_name, avatar, email, phone , birthday, sex, role_id, dept_id, post_id , pwd_update_time, secretgrade, strategy_update_status, tenant_id, create_user , create_dept, create_time, update_user, update_time, status , is_deleted
        select id, code, user_type, account, password , name, real_name, avatar, email, phone , birthday, sex, role_id, dept_id, post_id , pwd_update_time, secretgrade, strategy_update_status, tenant_id, create_user , create_dept, create_time, update_user, update_time, status , is_deleted,user_status,
        from pl_org_user
            where id = #{userId} and is_deleted = 0
    </select>
    <select id="getUserMap" resultType="map">
        SELECT
            PCR.ID as value,
            PCR.ACCOUNT as lable
        FROM
            PL_ORG_USER PCR
        WHERE
            instr(PCR.ROLE_ID,#{roleId}) > 0
        AND
            PCR.ID != #{userId}
        AND
            PCR.IS_DELETED = 0
    </select>
</mapper>