liujie
2025-10-13 5e120585b61ae126163cb0d676cf452c8a21822f
ruoyi-system/src/main/resources/mapper/system/TCrmBranchMapper.xml
@@ -51,5 +51,32 @@
        </where>
        ORDER BY create_time DESC
    </select>
    <select id="exportList" resultType="com.ruoyi.system.export.TCrmBranchExport">
        select id, user_id, branch_name, user_name, phone, money_commission, points_commission,
        user_points, status, create_time, update_time, create_by, update_by, disabled
        from t_crm_branch
        <where>
            <if test="query.branchName != null and query.branchName != ''">
                and branch_name like concat('%',#{query.branchName},'%')
            </if>
            <if test="query.userName != null and query.userName != ''">
                and user_name like concat('%',#{query.userName},'%')
            </if>
            <if test="query.phone != null and query.phone != ''">
                and phone like concat('%',#{query.phone},'%')
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.branchIds != null and query.branchIds.size()>0">
                and id in
                <foreach item="item" collection="query.branchIds" separator="," open="(" close=")" index="">
                    #{item}
                </foreach>
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
</mapper>