bug修复
This commit is contained in:
@@ -5,6 +5,7 @@ namespace app\czg\app\controller;
|
|||||||
use app\api\model\CommonInfo;
|
use app\api\model\CommonInfo;
|
||||||
use app\api\model\WithDraw;
|
use app\api\model\WithDraw;
|
||||||
use app\common\controller\Frontend;
|
use app\common\controller\Frontend;
|
||||||
|
use app\common\library\DatabaseRoute;
|
||||||
use app\exception\SysException;
|
use app\exception\SysException;
|
||||||
use app\utils\RedisUtils;
|
use app\utils\RedisUtils;
|
||||||
use support\think\Cache;
|
use support\think\Cache;
|
||||||
@@ -44,6 +45,10 @@ class CashController extends Frontend
|
|||||||
*/
|
*/
|
||||||
public function withdraw()
|
public function withdraw()
|
||||||
{
|
{
|
||||||
|
DatabaseRoute::getDb('tb_user', 25182, true)->insert([
|
||||||
|
'user_id' => 25182
|
||||||
|
]);
|
||||||
|
$this->success();
|
||||||
$amount = $this->request->get('amount');
|
$amount = $this->request->get('amount');
|
||||||
$isAlipay = $this->request->get('isAlipay');
|
$isAlipay = $this->request->get('isAlipay');
|
||||||
$userId = $this->getUserId();
|
$userId = $this->getUserId();
|
||||||
@@ -67,8 +72,8 @@ class CashController extends Frontend
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
debounce("withdraw:".$userId, 30);
|
debounce("user:withdraw:interval:limit:user:".$userId, 30);
|
||||||
runWithLock("lock:withdraw:{$userId}", 300, function () use ($userId, $amount, $isAlipay) {
|
runWithLock("user:withdraw:interval:limit:user:lock:{$userId}", 300, function () use ($userId, $amount, $isAlipay) {
|
||||||
WithDraw::goWithDraw($userId, $amount, '', false, $isAlipay == 1);
|
WithDraw::goWithDraw($userId, $amount, '', false, $isAlipay == 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ return [
|
|||||||
// Thinkphp官方没有这个参数,由于生成的tag键默认不过期,如果tag键数量很大,避免长时间占用内存,可以设置一个超过其他缓存的过期时间,0为不设置
|
// Thinkphp官方没有这个参数,由于生成的tag键默认不过期,如果tag键数量很大,避免长时间占用内存,可以设置一个超过其他缓存的过期时间,0为不设置
|
||||||
'tag_expire' => 86400 * 30,
|
'tag_expire' => 86400 * 30,
|
||||||
// 缓存标签前缀
|
// 缓存标签前缀
|
||||||
'tag_prefix' => 'tag:',
|
'tag_prefix' => '',
|
||||||
// 连接池配置
|
// 连接池配置
|
||||||
'pool' => [
|
'pool' => [
|
||||||
'max_connections' => 5, // 最大连接数
|
'max_connections' => 5, // 最大连接数
|
||||||
|
|||||||
Reference in New Issue
Block a user