|
|
@@ -9,14 +9,17 @@ use crmeb\utils\Redis;
|
|
|
use think\facade\Log;
|
|
|
use app\api\controller\board\UserBoardController;
|
|
|
use app\models\redis\SystemCarousel;
|
|
|
+use app\models\system\SystemPool;
|
|
|
+use app\models\user\UserSearch;
|
|
|
use app\models\user\WechatUser;
|
|
|
use crmeb\services\async\LuckyExtACalc;
|
|
|
use crmeb\services\async\LuckyExtBCalc;
|
|
|
+use crmeb\services\async\task\AsyncClass;
|
|
|
use crmeb\services\async\task\WechatNotify;
|
|
|
use think\facade\Config;
|
|
|
use RobThree\Auth\TwoFactorAuth;
|
|
|
use RobThree\Auth\TwoFactorAuthException;
|
|
|
-
|
|
|
+use tw\redis\UserRds;
|
|
|
|
|
|
class Test
|
|
|
{
|
|
|
@@ -86,8 +89,33 @@ class Test
|
|
|
echo WechatUser::routineOauth($routine);
|
|
|
}
|
|
|
|
|
|
+ protected function test_async_func()
|
|
|
+ {
|
|
|
+ AsyncClass::push('\app\admin\controller\Test', [], 'gd', []);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ protected function test_redis()
|
|
|
+ {
|
|
|
+ $ur = new UserRds();
|
|
|
+ $ur->set(1, 'streak', 3);
|
|
|
+ echo $ur->get(1, 'streak');
|
|
|
+ echo $ur->get(1, 'notexists');
|
|
|
+
|
|
|
+ $ur->sets(1, ['name'=>'didi', 'age'=>28]);
|
|
|
+ print_r($ur->gets(1, ['name', 'age']));
|
|
|
+ print_r($ur->gets(1, ['friends', 'teacher']));
|
|
|
+
|
|
|
+ print_r($ur->getAll(1));
|
|
|
+ }
|
|
|
+
|
|
|
public function test()
|
|
|
{
|
|
|
+ // $this->test_redis();
|
|
|
+ // echo UserSearch::InsertHistory(1, "good");
|
|
|
+ // print_r(UserSearch::getList(1, 20));
|
|
|
// return $this->test_routine_reg();
|
|
|
+ // echo SystemPool::incrby(1000, 1, 'clr', 2000);
|
|
|
+ // print_r(SystemPool::getList(1, 20));
|
|
|
}
|
|
|
-}
|
|
|
+}
|