console.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. use AlicFeng\IdentityCard\Birthday;
  3. use Illuminate\Support\Facades\Artisan;
  4. Artisan::command('pair:account', function () {
  5. \App\Http\Controllers\Fpdx\Media::autoCpAccount();
  6. })->describe('72小时活动-结算');
  7. Artisan::command('pair:pipei', function () {
  8. $pairObj = new \App\Http\Controllers\Crontab\Pair();
  9. $pairObj->index();
  10. })->describe('72小时活动-匹配');
  11. Artisan::command('pair:prepipei', function () {
  12. $pairObj = new \App\Http\Controllers\Crontab\Pair();
  13. $pairObj->prePipei();
  14. // 恢复
  15. $pairObj->preRestore();
  16. })->describe('72小时活动-预匹配');
  17. Artisan::command('pair:rematch', function () {
  18. $ms = new \App\Services\Pair\MatchService();
  19. $ms->rematch();
  20. })->describe("72小时活动:重新匹配");
  21. Artisan::command('order:refund {order_id}', function (int $order_id) {
  22. $order = new \App\Http\Controllers\Order();
  23. $order->requestRefund($order_id);
  24. })->describe('72小时活动:订单退款');
  25. Artisan::command('fixbug:pair:nodeed', function () {
  26. $ps = new \App\Console\Commands\Upgrade\V20181205Command();
  27. $ps->addPairDeed();
  28. })->describe("bug修复:72小时报名:修复没有契约的bug");
  29. Artisan::command('goodnight:push', function () {
  30. $subObj = new App\Services\Goodnight\SubscribeService();
  31. $subObj->pushload();
  32. })->describe('晚安伴侣:订阅推送');
  33. Artisan::command('goodnight:match', function () {
  34. $ms = new App\Services\Goodnight\MatchService();
  35. $ms->run();
  36. })->describe('晚安伴侣:匹配伴侣');
  37. Artisan::command('wxkf:hourqueue:add', function () {
  38. $kfs = new \App\Services\App\KfService();
  39. $kfs->wxkfHourQueue();
  40. })->describe("运营:微信客服管理:添加每小时二维码数量");
  41. Artisan::command('clean:wxkf:daycnt', function () {
  42. $kfs = new \App\Services\App\KfService();
  43. $kfs->clearWxkf();
  44. })->describe("清理脚本:微信客服管理:每日发码和加好友数量");
  45. Artisan::command("clean:debug:feed:redis {uid}", function (int $uid) {
  46. \Illuminate\Support\Facades\Redis::del(["charge_feed_{$uid}"]);
  47. \Illuminate\Support\Facades\Redis::del(["session_msy_{$uid}"]);
  48. \Illuminate\Support\Facades\Redis::del(["fpdx:feed:recommend:{$uid}"]);
  49. })->describe("清理脚本:开发测试:信息流缓存");
  50. Artisan::command('supervip:remindexpire', function () {
  51. $vs = new \App\Services\User\VipService();
  52. $vs->remindExpire();
  53. })->describe("超级会员:过期通知");
  54. Artisan::command('partner:thumbme:notice:dely', function () {
  55. $ns = new \App\Services\User\NoticeService();
  56. $ns->thumbMeDelay();
  57. })->describe("心动通知:夜间通知延迟发送");
  58. Artisan::command('invitation:notice:dely', function () {
  59. $ns = new \App\Services\Deed\NoticeService();
  60. $ns->invitationDelay();
  61. })->describe("心动邀请通知:夜间通知延迟发送");
  62. Artisan::command('popularity:share:flower:expire', function () {
  63. $vs = new \App\Services\User\HomeService();
  64. $vs->popularityExpire();
  65. })->describe("人气值:好友助力和小fa:过期通知");
  66. Artisan::command('popularity:todaylog:save', function () {
  67. $ps = new \App\Services\User\HomeService();
  68. $ps->logTodayPopularity();
  69. })->describe("人气值:存储用户今日人气值");
  70. Artisan::command('popularity:daiyuser:load', function () {
  71. $ps = new \App\Services\Notice\PopularityService();
  72. $ps->loadPushUsers();
  73. })->describe("人气值:加载人气值日报推送用户");
  74. Artisan::command('popularity:daiyuser:push', function () {
  75. $ps = new \App\Services\Notice\PopularityService();
  76. $ps->daiyPush();
  77. })->describe("人气值:发送日报");
  78. Artisan::command('friendslist:unreadnotice:load', function () {
  79. $fs = new \App\Services\Notice\FriendsListUnreadMsgService();
  80. $fs->loadSendQueue();
  81. })->describe("好友列表:未读消息通知:加载通知用户");
  82. Artisan::command('friendslist:unreadnotice:send', function () {
  83. $fs = new \App\Services\Notice\FriendsListUnreadMsgService();
  84. $fs->push();
  85. })->describe("好友列表:未读消息通知:发送通知");
  86. Artisan::command('user:tmp', function () {
  87. \App\Models\User\UserModel::whereNotNull('age')->where('star',
  88. '')->each(function (/** @var \App\Models\User\UserModel $item */ $item) {
  89. $star = Birthday::star(strtotime($item->age));
  90. \App\Models\User\UserModel::where('uid', $item->uid)->update(['star' => $star]);
  91. if ($item->partner_id > 0) {
  92. \App\Models\PartnerModel::where('id', $item->partner_id)->update(['star' => $star]);
  93. }
  94. });
  95. })->describe("用户信息-星座");