xuhy
2025-09-02 416e245165e1357a2ec74365bc96cbebbe98aafb
ruoyi-system/src/main/resources/mapper/system/TCrmSalespersonMapper.xml
@@ -24,5 +24,28 @@
    <sql id="Base_Column_List">
        id, user_id, salesperson_name, phone, branch_id, money_commission, points_commission, user_points, status, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TCrmSalespersonVO">
        select
            tcs.id, tcs.user_id, tcs.salesperson_name, tcs.phone, tcs.branch_id, tcs.money_commission, tcs.points_commission, tcs.user_points,
            tcs.status, tcs.create_time, tcs.update_time, tcs.create_by, tcs.update_by, tcs.disabled, tcb.branch_name
        from t_crm_salesperson tcs
        left join t_crm_branch tcb on tcs.branch_id = tcb.id
        <where>
            <if test="query.salespersonName != null and query.salespersonName != ''">
                and tcs.salesperson_name like concat('%',#{query.salespersonName},'%')
            </if>
            <if test="query.phone != null and query.phone != ''">
                and tcs.phone like concat('%',#{query.phone},'%')
            </if>
            <if test="query.branchId != null and query.branchId != ''">
                and tcs.branch_id = #{query.branchId}
            </if>
            <if test="query.status != null">
                and tcs.status = #{query.status}
            </if>
            AND tcs.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tcs.create_time DESC
    </select>
</mapper>