智慧保安后台管理-外网项目备份
guoshilong
2024-01-11 f5eb81d50b6def3ceeb10c5ded0de9661d456c69
src/main/java/org/springblade/modules/system/mapper/UserWxMapper.xml
@@ -145,6 +145,31 @@
        where bu.is_deleted = 0
          and bu.id = #{id}
    </select>
    <select id="exportUser" resultType="org.springblade.modules.system.excel.UserWxExcel">
        SELECT
        bu.id,
        bd.dept_name AS deptId,
        bu.real_name,
        bu.phone,
        bu.cardid
        FROM
        blade_user_wx bu
        LEFT JOIN blade_dept bd ON bu.dept_id = bd.id
        where bu.is_deleted = 0
        <if test="obj.account != null and obj.account != ''">
            AND bu.account LIKE CONCAT('%',#{obj.account},'%')
        </if>
        <if test="obj.realName != null and obj.realName != ''">
            AND bu.real_name LIKE CONCAT('%',#{obj.realName},'%')
        </if>
        <if test="obj.deptId != null and obj.deptId != ''">
            AND bu.dept_id = #{obj.deptId}
        </if>
        <if test="obj.cardid != null and obj.cardid != ''">
            and bu.cardid like concat('%', #{obj.cardid},'%')
        </if>
        ORDER BY bu.id desc
    </select>
</mapper>