This commit is contained in:
aozhiwei 2024-08-16 15:50:07 +08:00
parent ad6179b72a
commit 0b8c0874d4

View File

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