<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use ModStart\Core\Exception\BizException; use Module\Member\Auth\MemberUser; use Module\Vendor\Util\AtomicUtil; class MemberAtomicUtil { public static function acquireOrFail($nXCfA, $nX0hz, $KJqKC = null, $KfcNX = 30) { if (!self::acquire($nX0hz, $KJqKC, $KfcNX)) { BizException::throws($nXCfA); } } public static function acquire($nX0hz, $KJqKC = null, $KfcNX = 30) { goto UUke4; UUke4: if (null === $KJqKC) { $KJqKC = MemberUser::id(); } goto ohBz3; ohBz3: $UtKOH = $nX0hz . '_' . $KJqKC; goto k9qY8; k9qY8: return AtomicUtil::acquire($UtKOH, $KfcNX); goto RFcFI; RFcFI: } public static function release($nX0hz, $KJqKC = null) { goto thE7q; tp05M: $UtKOH = $nX0hz . '_' . $KJqKC; goto bXAMR; bXAMR: AtomicUtil::release($UtKOH); goto xC32y; thE7q: if (null === $KJqKC) { $KJqKC = MemberUser::id(); } goto tp05M; xC32y: } }