This commit is contained in:
aozhiwei 2024-07-06 14:34:55 +08:00
parent 92e638b93d
commit c24050890e

View File

@ -350,7 +350,8 @@ class TempToolsController extends BaseController {
public function exportLock()
{
$type = getReqVal('type', '0');
$beginTime = getReqVal('begin_time', '0');
$endTime = getReqVal('end_time', '0');
$bceventConn = null;
$accountConn = null;
{
@ -383,14 +384,7 @@ class TempToolsController extends BaseController {
'dbname' => $mysql_conf['database'],
));
}
if ($type == 0) {
$sql = 'select lock_to, count(idx) as lock_count from t_nft_lock_event group by lock_to;';
} else {
$nowDayseconds = myself()->_getNowDaySeconds();
$beginTime = $nowDayseconds;
$endTime = $nowDayseconds + 3600 *24;
$sql = "select lock_to, count(idx) as lock_count from t_nft_lock_event where createtime>=$beginTime and createtime<=$endTime group by lock_to;";
}
$sql = "select lock_to, count(idx) as lock_count from t_nft_lock_event where createtime>=$beginTime and createtime<=$endTime group by lock_to;";
$rows = $bceventConn->execQuery($sql);
foreach ($rows as $row) {
$email = $this->getAddressEmail($accountConn, $row['lock_to']);