国庆更新代码

This commit is contained in:
2025-10-09 09:48:00 +08:00
parent 4ef4486ffa
commit f1e0d9b220
2 changed files with 473 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace app\api\controller;
use think\Controller;
use think\Db;
use think\Log;
use app\common\controller\BaseCom;
class Xintiao extends BaseCom
{
public function keep_xintiao()
{
$user_id = $this->uid;
$is_xintiao = db::name('vs_xintiao')->where('user_id' , $user_id)->find();
if($is_xintiao){
db::name('vs_xintiao')->where('user_id' , $user_id)->update(['updatetime' => time()]);
}else{
db::name('vs_xintiao')->insert([
'user_id' => $user_id,
'createtime' => time(),
'updatetime' => time()
]);
}
return true;
}
}