This commit is contained in:
aozhiwei 2024-08-17 11:30:49 +08:00
parent 1958761e7a
commit 3d6f4d324c

View File

@ -5,18 +5,15 @@ class AnncController extends BaseController {
public function getAnnc() public function getAnnc()
{ {
// myself()->_rspData(require('../config/annc.php'));
$seconds = myself()->_getNowTime() - myself()->_getNowDaySeconds(); $seconds = myself()->_getNowTime() - myself()->_getNowDaySeconds();
$data = array(); $data = array();
$row = myself()->_getConfDbMysql()->execQueryOne( $row = myself()->_getConfDbMysql()->execQueryOne(
'SELECT * FROM t_game_annc WHERE :begin_date >= begin_date AND :end_date <= end_date AND is_open = 1 AND begin_time >= :seconds AND end_time <= :seconds', 'SELECT * FROM t_game_annc WHERE :nowtime >= begin_date AND :nowtime <= end_date AND is_open = 1 AND :seconds >= begin_time AND :seconds <= end_time',
array( array(
':begin_date' => myself()->_getNowTime(), ':nowtime' => myself()->_getNowTime(),
':end_date' => myself()->_getNowTime(),
':seconds' => $seconds, ':seconds' => $seconds,
) )
); );
error_log($seconds);
if ($row){ if ($row){
$data = array( $data = array(
'id' => $row['uniid'], 'id' => $row['uniid'],