package com.gxwebsoft.cms.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.cms.entity.CmsApp;
import com.gxwebsoft.cms.param.CmsAppParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 网站信息记录表Mapper
 *
 * @author 科技小王子
 * @since 2024-09-10 20:36:14
 */
public interface CmsAppMapper extends BaseMapper<CmsApp> {

    /**
     * 分页查询
     *
     * @param page  分页对象
     * @param param 查询参数
     * @return List<CmsApp>
     */
    List<CmsApp> selectPageRel(@Param("page") IPage<CmsApp> page,
                             @Param("param") CmsAppParam param);

    /**
     * 查询全部
     *
     * @param param 查询参数
     * @return List<User>
     */
    List<CmsApp> selectListRel(@Param("param") CmsAppParam param);

    @InterceptorIgnore(tenantLine = "true")
    List<CmsApp> selectPageRelAll(@Param("page") IPage<CmsApp> page,
                                      @Param("param") CmsAppParam param);

    @InterceptorIgnore(tenantLine = "true")
    CmsApp getByIdRelAll(@Param("appId") Integer id);

    @InterceptorIgnore(tenantLine = "true")
    boolean updateByIdAll(@Param("param") CmsApp cmsApp);

    @InterceptorIgnore(tenantLine = "true")
    boolean removeByIdAll(@Param("appId") Integer id);

    @InterceptorIgnore(tenantLine = "true")
    CmsApp getByTenantId(@Param("tenantId") Integer tenantId);
}
