public class PromotioDao extends BaseController{
   
     public PagePlus GetPromotionPromotionSearchFn(Integer page, Integer pageLimit,String search,String sortOrder,String sortPlus,String[] arr){
          QueryWrapper query =   getSearchMap(search,sortPlus,sortOrder,arr,PromotionHead__c.SObjectType);
          query.eq('recordtype.developername', 'Promotion');
          query.eq('Status__c', '有效');
          query.ne('ApplyStatus__c', '作废');
          system.debug('sql:'+query);
          PagePlus pages = DataBasePlus.page(getPage(page,pageLimit),
          query
          );
          return pages;
      }

      

      public PagePlus GetNormalProductSearchFn(Integer page, Integer pageLimit,String search,String sortOrder,String sortPlus,String[] arr){
          QueryWrapper query =  getSearchMap(search,sortPlus,sortOrder,arr,PromotionHead__c.SObjectType);
          query.eq('recordtype.developername', 'NormalProduct');
          query.ne('ApplyStatus__c', '作废');
          System.debug('soql:'+query);
          PagePlus pages = DataBasePlus.page(getPage(page,pageLimit),
          query
          );
          return pages;
      }
      
      public PagePlus GetAuthorizerSearchFn(Integer page, Integer pageLimit,String search,String sortOrder,String sortPlus,String[] arr,String Agency1c){
        QueryWrapper query =  getSearchMap(search,sortPlus,sortOrder,arr,PromotionHead__c.SObjectType);
        query.eq('recordtype.developername', 'Authorizer');
        query.eq('Status__c', '有效');
        query.ne('ApplyStatus__c', '作废');
        query.eq('Agency__c', Agency1c);
        PagePlus pages = DataBasePlus.page(getPage(page,pageLimit),
        query
        );
        return pages;
    }
}