"测试卡" AND DeleteTag=0 '; //根据用户id if (!empty($data['UserId'])) { $where1['UserId'] = $data['UserId']; } //根据用户会员号 if (!empty($data['keyWord'])) { $where1['UserCode'] = $data['keyWord']; } //根据产品 if (!empty($data['ProductIds'])) { $where1['ProductId'] = ['in', $data['ProductIds']]; } //根据套餐 if (!empty($data['PackageNames'])) { $where1['PackageName'] = ['in', $data['PackageNames']]; } //根据账号类型 if (!empty($data['accountTypes'])) { $where1['AccountType'] = ['in', $data['accountTypes']]; } //根据账号过期时间 if ($data['ExpirdDay'] > -100) { if ($data['ExpirdDay'] == 0) { $where2 .= ' AND EndTime-4) { $where2 .= ' AND TO_DAYS(EndTime) - (TO_DAYS(now()))>='.$data['ExpirdDay'].' AND EndTime < now() '; } elseif ($data['ExpirdDay']==-4) { $where2 .= ' AND TO_DAYS(EndTime) - (TO_DAYS(now()))<='.$data['ExpirdDay'].' '; } elseif ($data['ExpirdDay'] > 0){ $where2 .= ' AND TO_DAYS(EndTime) - (TO_DAYS(now()))<='.$data['ExpirdDay'].' AND EndTime>now() '; // $where2 .= ' AND EndTimegetCountConnect($where1,$where2); $count = !empty($count)?$count:0; \result($count,'',30000); } }