zhongrj
2023-12-22 c5dc6db7a22b375f2f9302260fd084953edd9068
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -29,6 +29,7 @@
    <select id="selectUserPage" resultMap="userResultMap">
        select * from blade_user where is_deleted = 0
        and id != 1123598821738675201
        <if test="tenantId!=null and tenantId != ''">
            and tenant_id = #{tenantId}
        </if>
@@ -36,10 +37,10 @@
            and tenant_id = #{user.tenantId}
        </if>
        <if test="user.account!=null and user.account != ''">
            and account = #{user.account}
            and account like concat('%', #{user.account},'%')
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and real_name = #{user.realName}
            and real_name like concat('%',#{user.realName},'%')
        </if>
        <if test="user.userType!=null and user.userType != ''">
            and user_type = #{user.userType}
@@ -73,4 +74,13 @@
        SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}
    </select>
    <!--按条件查询用户信息-->
    <select id="getUserListByParam" resultType="org.springblade.modules.system.vo.UserVO">
        SELECT id, account, name, real_name, phone, role_id, dept_id, post_id FROM blade_user
        where is_deleted = 0
        <if test="user.roleId!=null and user.roleId!=''">
            and role_id like concat('%',#{user.roleId},'%')
        </if>
    </select>
</mapper>