package cn.com.countrygarden.bi.main.dao.dmn;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.model.dmn.CostInformation;
import cn.com.countrygarden.bi.main.model.dmn.DnmDomainInformation;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @program: backEnd
 * @description:域名信息mapper
 * @author: bug大神
 * @create: 2024-07-24 17:17
 **/

@org.apache.ibatis.annotations.Mapper
public interface DnmDomainInformationMapper extends Mapper<DnmDomainInformation> {
    /**
     * 查询域名信息
     */
    List<DnmDomainInformation> queryDomainInfo(String domainName);
    //    高级搜索
    //    limit每页的条数
    //    offset第几条开始，从0开始 (pageNumber - 1) * pageSize计算
    List<DnmDomainInformation> dynamicQuery(@Param("domainName") String domainName,
                                            @Param("domainCouponNumber") String domainCouponNumber,
                                            @Param("owner") String owner,
                                            @Param("auditStatus") String auditStatus,
                                            @Param("startDate") Date startDate,
                                            @Param("endDate") Date endDate,
                                            @Param("limit") Integer limit,
                                            @Param("offset") Integer offset);
    List<DnmDomainInformation> dynamicQueryCount(@Param("domainName") String domainName,
                                            @Param("domainCouponNumber") String domainCouponNumber,
                                            @Param("owner") String owner,
                                            @Param("auditStatus") String auditStatus,
                                            @Param("startDate") Date startDate,
                                            @Param("endDate") Date endDate);

    int updateDnmDomainInformation(DnmDomainInformation domainInformation);

    int deleteDnmDomainInformation(@Param("id") Integer id);

    int insertDomainInformation(DnmDomainInformation domainInformation);

    DnmDomainInformation getDnmDomainInformationById(Integer id);
    List<DnmDomainInformation> dynamicQueryByLeader(@Param("domainName") String domainName,
                                            @Param("domainCouponNumber") String domainCouponNumber,
                                            @Param("owner") String owner,
                                            @Param("auditStatus") String auditStatus,
                                            @Param("startDate") Date startDate,
                                            @Param("endDate") Date endDate,
                                            @Param("limit") Integer limit,
                                            @Param("offset") Integer offset);
    List<DnmDomainInformation> dynamicQueryCountByLeader(@Param("domainName") String domainName,
                                                 @Param("domainCouponNumber") String domainCouponNumber,
                                                 @Param("owner") String owner,
                                                 @Param("auditStatus") String auditStatus,
                                                 @Param("startDate") Date startDate,
                                                 @Param("endDate") Date endDate);

    int updateDnmDomainInformationById(@Param("id") Integer id, @Param("auditStatus") String auditStatus);

    List<DnmDomainInformation> checkDomainName(String domainName);
}
