Files
webman_duanju/app/czg/app/controller/AdController.php
2025-08-14 17:19:26 +08:00

30 lines
633 B
PHP

<?php
namespace app\czg\app\controller;
use app\common\controller\Frontend;
use app\utils\RedisUtils;
use think\facade\Db;
class AdController extends Frontend
{
public function state()
{
$params = $this->request->get();
$info = Db::name('uni_ad_callback_record')->where([
'user_id' => $this->getUserId(),
'extra' => $params['extraKey']
])->find();
if (!$info && RedisUtils::isCanCash($this->getUserId()) && str_contains($params['extraKey'], 'cash')) {
RedisUtils::setCanCashFlag($this->getUserId(), -1);
}
$this->success();
}
}