新增需求变更:---过期脚本编写

公会如果调整了个人收益,需要再用户的系统通知哪里发送一个消息,公会调整了你的 收益 为 XX,  您是否同意  拒绝(默认24小时,24小时内 没同意,默认拒绝)在这个期间  按照他原有的进行计算,同意了就按照公会给的进行计算
This commit is contained in:
2025-12-08 16:44:55 +08:00
parent 7349789c9a
commit 6c09ba626d

View File

@@ -55,6 +55,10 @@ class PerformPerSecond
$this->system_downgrade();
echo "\n";
echo "公会会员结算比例申请过期处理:\n";
$this->user_ratio_up_apply_timeout();
echo "\n";
}
@@ -436,5 +440,21 @@ class PerformPerSecond
}
}
}
//公会会员结算比例申请过期处理
public function user_ratio_up_apply_timeout(){
//超过24小时的数据
$end_time = time() - 60 * 60 * 24;
$up_count = 0;
$guild_user_ratio_up_log = Db::name('vs_guild_user_ratio_up_log')->where(['status' => 0,'createtime' => ['<',$end_time]])->select();
if($guild_user_ratio_up_log){
foreach ($guild_user_ratio_up_log as $value){
$re = Db::name('vs_guild_user_ratio_up_log')->where('id',$value['id'])->update(['status' => 2,'updatetime' => time()]);
if($re){
$up_count++;
echo "处理成功:".$value['id']."\n";
}
}
}
echo "公会会员结算比例申请过期处理结束-共". count($guild_user_ratio_up_log) . "条数据(已处理". $up_count . "条数据`)\n";
}
}