30 lines
633 B
PHP
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();
|
|
}
|
|
|
|
|
|
|
|
|
|
} |