Test.php 740 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\admin\controller;
  3. use crmeb\services\async\LuckyCalc;
  4. use crmeb\services\async\ClearanceCalc;
  5. use crmeb\utils\Redis;
  6. use think\facade\Log;
  7. use app\api\controller\board\UserBoardController;
  8. class Test
  9. {
  10. public function index()
  11. {
  12. $redis = Redis::instance();
  13. var_dump($redis->get(['CRMEB','TESD']));
  14. }
  15. protected function test_board() {
  16. Log::warning("board updated.");
  17. $ctl = new UserBoardController();
  18. $ctl->cache_board();
  19. }
  20. protected function test_calc() {
  21. $activities = [new ClearanceCalc(), new LuckyCalc()];
  22. foreach($activities as $activity) {
  23. $activity->calc();
  24. }
  25. }
  26. public function test()
  27. {
  28. }
  29. }