初始化代码

This commit is contained in:
2025-08-11 10:22:05 +08:00
commit ebd8d85201
4206 changed files with 753018 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use app\admin\model\ReloadDb;
use think\Db;
class AdminMsg extends Command
{
protected function configure()
{
$this->setName('admin-msg')
->setDescription('后台发布消息队列'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// set_time_limit(0);
ini_set ('memory_limit', '128M');
//循环监控队列数据
while (true) {
//超时重新链接
ReloadDb::init();
//取出队列数据
$redis = connectionRedis();
$data = $redis->lPop('admin_add_message111');
//查询到队列数据
if (!empty($data)) {
$data = explode('-61116-', $data);
if (count($data) == 3) {
$smid = (int)$data[0];
$title = $data[1];
$content = $data[2];
//获取所有会员id
$now_time = time();
for ($i=1;$i>0;$i++){
//分页查询
$uid_list = db::name('user')->order('uid','asc')->page($i,100)->column('uid');
if(empty($uid_list)){
//查询不到数据 跳出循环
break;
}
//录入成员数据
$insert_data = [];
foreach ($uid_list as $k => $v) {
$data = [];
$data['type'] = 1;
$data['id'] = $smid;
$data['uid'] = $v;
$data['title'] = $title;
$data['content'] = $content;
$data['is_read'] = 1;
$data['read_time'] = 0;
$data['add_time'] = $now_time;
$data['update_time'] = $now_time;
$insert_data[] = $data;
}
if (!empty($insert_data)) {
db::name('user_message')->insertAll($insert_data);
}
}
echo '后台系统消息发布成功'.date('Y-m-d H:i:s').PHP_EOL;;
}
}
sleep(3);
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class AsyncPushMessage extends Command
{
protected function configure()
{
$this->setName('push-message')
->setDescription('消息推送'); //消息推送
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
usleep(200000);
$reslut = model('api/AsyncPushMessage')->send_message();
// echo '监控成功!';
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class BalanceWages extends Command
{
protected function configure()
{
$this->setName('balance-wages')
->setDescription('结算工资');
}
/**
* 下单一段时间 没有人接单 自动关闭订单
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
//上周房间流水结算
model('api/RoomWages')->statistics_room_last_week_earnings(1);
model('api/RoomWages')->statistics_guild_last_week_earnings(1);
echo '结算工资监控!'.PHP_EOL;;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class BjGrade extends Command
{
protected function configure()
{
$this->setName('bj-grade')
->setDescription('爵位保级'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(10);
$reslut = model('api/UserNobility')->auto_nobility_grade();
echo '爵位保级!';
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ClearHotValue extends Command
{
protected function configure()
{
$this->setName('clear-hot-value')
->setDescription('清除房间热力值');
}
/**
* 清除房间热力值
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// $key_name = "admin:cli:clear_room_hot_value";
// redis_lock_exit($key_name);
$reslut = model('api/room')->clear_room_hot_value();
// redis_unlock($key_name);
echo date('Y-m-d H:i:s') . "清除房间当天热度 执行成功"." \r\n";
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ClearRoomRobot extends Command
{
protected function configure()
{
$this->setName('clear-room-robot')
->setDescription('清理空房间机器人');
}
/**
* 清理空房间机器人
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(60);
model('api/room')->auto_clear_robot_room();
echo '清理空房间机器人!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ClearUserCp extends Command
{
protected function configure()
{
$this->setName('clear-user-cp')
->setDescription('清理过期cp关系');
}
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(15);
$reslut = model('admin/Decorate')->clear_user_cp();
echo '清理cp成功!';
}
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ClearUserDecorate extends Command
{
protected function configure()
{
$this->setName('clear-user-decorate')
->setDescription('清理过期装扮');
}
/**
* 下单一段时间 没有人接单 自动关闭订单
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(5);
$reslut = model('admin/Decorate')->clear_user_decorate();
echo '清理成功!';
}
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ClearUserVip extends Command
{
protected function configure()
{
$this->setName('clear-user-vip')
->setDescription('到期会员清除');
}
/**
* 下单一段时间 没有人接单 自动关闭订单
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
$reslut = model('api/Vip')->close_user_vip();
echo '到期会员清除!'.PHP_EOL;;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseDateMicro extends Command
{
protected function configure()
{
$this->setName('close-date-micro')
->setDescription('酒吧房到时见掉麦'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(2);
$reslut = model('api/PubRoom')->close_room_date_micro();
echo '酒吧房掉麦监控!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomAuctionStage extends Command
{
protected function configure()
{
$this->setName('close-room-auction-stage')
->setDescription('定时清理到期拍卖活动'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://180.188.36.65:913/api/api/close_auction_pm");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
echo '定时清理到期拍卖活动监控成功'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomDatingStage extends Command
{
protected function configure()
{
$this->setName('close-room-dating-stage')
->setDescription('定时清理到期心动连线'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('api/DatingRoom')->close_room_dating_stage();
echo '定时清理到期心动连线!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomPrivacyStatus extends Command
{
protected function configure()
{
$this->setName('close-room-privacy-status')
->setDescription('定时清理到期私密小屋'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('api/DatingRoom')->close_room_privacy_status();
echo '定时清理到期私密小屋!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomSongUserStatus extends Command
{
protected function configure()
{
$this->setName('close-room-song-user-status')
->setDescription('定时结束唱歌时间'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
model('api/KtvRoom')->colse_room_song_user_status();
echo '定时结束唱歌时间!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomStatus extends Command
{
protected function configure()
{
$this->setName('close-room-status')
->setDescription('定时关闭没有主持房间'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
model('api/RoomMicro')->close_room_status();
echo '定时关闭没有主持房间!'.PHP_EOL;
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseRoomVisitor extends Command
{
protected function configure()
{
$this->setName('close-room-visitor')
->setDescription('定时更新到期游客记录'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('api/RoomVisitor')->close_room_visitor();
echo '定时更新到期游客记录!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseUserRelation extends Command
{
protected function configure()
{
$this->setName('close-user-relation')
->setDescription('定时清除用户关系'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
model('api/DatingRoom')->close_user_relation();
echo '定时清除用户关系!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseUserSignContract extends Command
{
protected function configure()
{
$this->setName('close-user-sign-contract')
->setDescription('定时查询签约是否结束进行解约'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
$reslut = model('api/UserSignContract')->close_user_sign_contract();
echo '定时查询签约是否结束进行解约!'.PHP_EOL;
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CloseUserSprite extends Command
{
protected function configure()
{
$this->setName('close-user-sprite')
->setDescription('监控仲夏夜梦曲结算用户投票'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('api/Sprite')->close_user_sprite();
echo '监控仲夏夜梦曲结算用户投票!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ControlBox extends Command
{
protected function configure()
{
$this->setName('control-box')
->setDescription('奖池监控'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(2);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('admin/box')->control_generate_box($tid, $is_reset);
echo '奖池监控成功!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ControlBoxLuck extends Command
{
protected function configure()
{
$this->setName('control-box-luck')
->setDescription('爆金币'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(2);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('admin/Multiple')->control_gift_multiple($tid, $is_reset);
echo '奖池监控成功!';
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class CreateSpriteLog extends Command
{
protected function configure()
{
$this->setName('create-sprite-log')
->setDescription('监控仲夏夜梦曲'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('api/Sprite')->create_sprite_log();
echo '监控仲夏夜梦曲!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,49 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use app\admin\model\ReloadDb;
class FenZhang extends Command
{
protected function configure()
{
$this->setName('fen-zhang')
->setDescription('分账监控'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// set_time_limit(0);
ini_set ('memory_limit', '128M');
while (true) {
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, "http://qicekj.cn/admin/cli/tian_logic_queue");
// curl_setopt($ch, CURLOPT_HEADER, 0);
// // 设置 curl 最长等待时间
// curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
// // 最长执行时间1800分钟
// curl_setopt($ch, CURLOPT_TIMEOUT, 1800);
// curl_exec($ch);
// echo '分账监控!';
// sleep(3);
ReloadDb::init();
model('admin/Capital')->tian_logic_queue();
echo '分账监控!'.date('Y-m-d H:i:s').PHP_EOL;;
sleep(3);
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class GiveUserRoomWeekEarnings extends Command
{
protected function configure()
{
$this->setName('give-user-room-week-earnings')
->setDescription('发送用户收益'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
model('api/RoomSubsidy')->give_user_room_week_earnings(0);
echo '发送用户收益!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class GivesUserGuildWeekEarnings extends Command
{
protected function configure()
{
$this->setName('gives-user-guild-week-earnings')
->setDescription('统计公会长收益'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
model('api/GuildSubsidy')->gives_user_guild_week_earnings($type);
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
model('api/GuildSubsidy')->gives_user_guild_week_earnings(0);
echo '统计公会长收益!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class GivesUserRoomWeekEarnings extends Command
{
protected function configure()
{
$this->setName('gives-user-room-week-earnings')
->setDescription('统计用户收益'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
model('api/RoomSubsidy')->gives_user_room_week_earnings(0);
echo '统计用户收益!'.PHP_EOL;
}
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use app\admin\model\ReloadDb;
class GuildWages extends Command
{
protected function configure()
{
$this->setName('guild-wages')
->setDescription('公会工资结算'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// set_time_limit(0);
ini_set ('memory_limit', '128M');
while (true) {
ReloadDb::init();
model('api/RoomWages')->batch_give_guild_subsidy();
echo '公会工资监控!'.date('Y-m-d H:i:s').PHP_EOL;;
sleep(3);
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class NobilityOverTime extends Command
{
protected function configure()
{
$this->setName('nobility-over-time')
->setDescription('爵位到期'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(1);
$reslut = model('api/Nobility')->user_nobility_over_time();
echo '爵位到期!';
}
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class RelieveUserSignContract extends Command
{
protected function configure()
{
$this->setName('relieve-user-sign-contract')
->setDescription('解约用户每天降低身价');
}
/**
* 下单一段时间 没有人接单 自动关闭订单
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
$reslut = model('admin/Decorate')->clear_user_cp();
echo '解约用户每天降低身价!';
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use app\admin\model\ReloadDb;
class RoomWages extends Command
{
protected function configure()
{
$this->setName('rooom-wages')
->setDescription('房间工资结算'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
// set_time_limit(0);
ini_set ('memory_limit', '128M');
while (true) {
ReloadDb::init();
model('api/RoomWages')->batch_give_room_subsidy();
echo '房间工资监控!'.date('Y-m-d H:i:s').PHP_EOL;;
sleep(3);
}
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class SignExec extends Command
{
protected function configure()
{
$this->setName('sign-exec')
->setDescription('每日签名删除处理'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
model("api/UserSign")->del_user_day_sign_log();
echo '签名删除处理成功!'.PHP_EOL;
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class StatisticsGuildLastWeekEarnings extends Command
{
protected function configure()
{
$this->setName('statistics-guild-last-week-earnings')
->setDescription('统计上周公会流水'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
model('api/GuildSubsidy')->statistics_guild_last_week_earnings(0);
echo '统计上周公会流水!'.PHP_EOL;
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class StatisticsRoomLastWeekEarnings extends Command
{
protected function configure()
{
$this->setName('statistics-room-last-week-earnings')
->setDescription('统计上周房间流水'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
model('api/RoomSubsidy')->statistics_room_last_week_earnings(0);
echo '统计上周房间流水!'.PHP_EOL;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ZxLastRank extends Command
{
protected function configure()
{
$this->setName('zx-last-rank')
->setDescription('上周周星榜'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://180.188.36.65:913/api/api/last_week_rank");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
echo '上周周星榜!'.PHP_EOL;
}
}