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 sign(){ $cardId = 'p7YU46qidv5_baigH0Ds4ObP7MDg'; &...
public function image() { // $url = 'uploads/20241026/8f32aebb8be904c5c01ea80de534880...
public function alipay($pay_order_no = '20241114123331000000195475', $uid = 1, $url = '') {...
if ($list['post_content']) { $list['post_content'] = html_entity_decode($list['post_content']);...
public function getCode(){ $order_id = '95896766'; $config = confi...
$data = Db::name('about_product_list')->field('id,title,count(id) as num')->gr...