package com.gxwebsoft.common.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.common.system.entity.TenantSubscriptionOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 租户订阅订单Mapper
 *
 * @author WebSoft
 * @since 2025-12-12
 */
@InterceptorIgnore(tenantLine = "true")
public interface TenantSubscriptionOrderMapper extends BaseMapper<TenantSubscriptionOrder> {

    /**
     * 分页查询订单
     *
     * @param page     分页对象
     * @param tenantId 租户ID
     * @return List<TenantSubscriptionOrder>
     */
    List<TenantSubscriptionOrder> selectPageByTenant(@Param("page") IPage<TenantSubscriptionOrder> page,
                                                      @Param("tenantId") Integer tenantId);

    /**
     * 根据订单号查询
     *
     * @param orderNo 订单号
     * @return TenantSubscriptionOrder
     */
    TenantSubscriptionOrder selectByOrderNo(@Param("orderNo") String orderNo);
}
