thinkphp 加cache锁
$lockKey = 'user_lock_requirement' . $this->user_id; $isLocked = Cache::get($lockKey); if ($isLocked) { $this->error('请勿重复点击'); } $expire = 3; $setLockSuccess = Cache::set($lockKey, 1, $expire);
Cache::rm($lockKey);
$lockKey = 'user_lock_requirement' . $this->user_id; $isLocked = Cache::get($lockKey); if ($isLocked) { $this->error('请勿重复点击'); } $expire = 3; $setLockSuccess = Cache::set($lockKey, 1, $expire);
Cache::rm($lockKey);
public function alipay($pay_order_no = '20241114123331000000195475', $uid = 1, $url = '') {...
public function image() { // $url = 'uploads/20241026/8f32aebb8be904c5c01ea80de534880...
$data = Db::name('about_product_list')->field('id,title,count(id) as num')->gr...
public function getCode(){ $order_id = '95896766'; $config = confi...
/* * 服务端生成带唯一标识二维码并将唯一标识返回给前端 */ public function wx_code() { $scene_str...
if ($list['post_content']) { $list['post_content'] = html_entity_decode($list['post_content']);...