think-orm
This commit is contained in:
parent
dc60b38526
commit
455bfde49f
|
|
@ -8,9 +8,9 @@ use app\common\model\Common;
|
||||||
use app\common\model\SysUser;
|
use app\common\model\SysUser;
|
||||||
use ba\Exception;
|
use ba\Exception;
|
||||||
use app\exception\SysException;
|
use app\exception\SysException;
|
||||||
use ba\Random;
|
use extend\ba\Random;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\facade\Log;
|
use support\Log;
|
||||||
|
|
||||||
class TbUser extends BaseModel
|
class TbUser extends BaseModel
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -626,7 +626,7 @@ class Auth
|
||||||
*/
|
*/
|
||||||
public function getError(): string
|
public function getError(): string
|
||||||
{
|
{
|
||||||
return $this->error ? __($this->error) : '';
|
return $this->error ? $this->error : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ use app\api\model\TbUser;
|
||||||
use app\enums\ErrEnums;
|
use app\enums\ErrEnums;
|
||||||
use app\exception\SysException;
|
use app\exception\SysException;
|
||||||
use app\utils\RedisUtils;
|
use app\utils\RedisUtils;
|
||||||
use ba\Random;
|
use extend\ba\Random;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use app\exception\SysException;
|
||||||
use app\utils\RedisUtils;
|
use app\utils\RedisUtils;
|
||||||
use app\api\validate\WuyouValidate;
|
use app\api\validate\WuyouValidate;
|
||||||
use app\utils\WuYouPayUtils;
|
use app\utils\WuYouPayUtils;
|
||||||
use ba\Random;
|
use extend\ba\Random;
|
||||||
use app\api\model\Orders;
|
use app\api\model\Orders;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
@ -44,7 +44,7 @@ class WuyouController extends BaseController
|
||||||
|
|
||||||
public function payOrder()
|
public function payOrder()
|
||||||
{
|
{
|
||||||
$params = $this->request->param();
|
$params = $this->request->get();
|
||||||
(new WuyouValidate())->scene('payOrder')->check($params);
|
(new WuyouValidate())->scene('payOrder')->check($params);
|
||||||
$userId = $this->getUserId();
|
$userId = $this->getUserId();
|
||||||
// debounce('payOrder' . $params['orderId']);
|
// debounce('payOrder' . $params['orderId']);
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,7 @@ function debounce(string $key,int $waitMs = 20)
|
||||||
cache($key, 1, $ttl); // 设置一个短暂缓存用于防抖
|
cache($key, 1, $ttl); // 设置一个短暂缓存用于防抖
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
throw new SysException("操作过于频繁,请稍后再试");
|
throw new \app\exception\SysException("操作过于频繁,请稍后再试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue