师徒任务bug修改

This commit is contained in:
2025-12-24 20:21:54 +08:00
parent 3003b489a3
commit 136802fa48
3 changed files with 42 additions and 40 deletions

View File

@@ -25,7 +25,7 @@ class Test
// $this->xlh_gift_send();
// echo "\n";
//
$this->clean_guild_flow();
// $this->clean_guild_flow();
}
@@ -507,9 +507,9 @@ class Test
//清洗公会流水
public function clean_guild_flow()
{
{die;
echo "开始清洗公会流水: \n";
$guild = db::name('vs_guild')->where(['status' => 1, 'income' => 0])->select();
$guild = db::name('vs_guild')->where(['status' => 1])->select();
foreach ($guild as $value) {
echo "================================\n";
echo "开始清洗公会({$value['id']})流水 \n";
@@ -517,7 +517,7 @@ class Test
$transaction = 0;
foreach ($guild_user as $v) {
$week_start_time_seach = "1761554521";
$week_end_time_seach = time();
$week_end_time_seach = "1766564906";
if($v['apply_time'] && $week_start_time_seach < $v['apply_time']){
$week_start_time_seach = $v['apply_time'];
}
@@ -528,26 +528,28 @@ class Test
->where('from_id',$v['room_id'])
->where(['from'=>['in',[2,3,6]],'createtime' => ['between', [$week_start_time_seach, $week_end_time_seach]]])
->sum('total_price');
db::name('vs_guild_user')->where(['id' => $v['id']])->update([
'coin' => $transaction_one,
]);
// db::name('vs_guild_user')->where(['id' => $v['id']])->update([
// 'coin' => $transaction_one,
// ]);
// Db::name('vs_guild_user')->where(['id' => $v['id']])->setInc('coin', $transaction_one);
$data = [
'guild_id' => $value['id'],
'room_id' => $v['room_id'],
'give_gift_id' => 0,
'flow_price' => $transaction_one,
'day' => "",
'createtime' => time(),
];
$res = Db::name('vs_guild_flow')->insert($data);
// $data = [
// 'guild_id' => $value['id'],
// 'room_id' => $v['room_id'],
// 'give_gift_id' => 0,
// 'flow_price' => $transaction_one,
// 'day' => "",
// 'createtime' => time(),
// ];
// $res = Db::name('vs_guild_flow')->insert($data);
$transaction += $transaction_one;
echo " 公会房间(". $v['room_id'] .")流水:" . $transaction_one . "\n";
}
db::name('vs_guild')->where(['id' => $value['id']])->update([
'income' => $transaction,
]);
// db::name('vs_guild')->where(['id' => $value['id']])->update([
// 'income' => $transaction,
// ]);
// Db::name('vs_guild')->where(['id' => $value['id']])->setInc('income', $transaction);
echo "清洗公会房间流水完成:" . count($guild_user) . "\n";
}
echo "清洗公会流水完成: ".count($guild)."\n";