|
|
@@ -69,6 +69,8 @@ class AwardLake extends BaseModel
|
|
|
return true;
|
|
|
}
|
|
|
$lakes = self::where('send_time', '<', $time)->select();
|
|
|
+ @file_put_contents('quanju.txt',$time."-1点的时间戳\r\n",8);
|
|
|
+ @file_put_contents('quanju.txt',json_encode($lakes)."-发放时间小于1点的\r\n",8);
|
|
|
foreach ($lakes as $lake) {
|
|
|
$this->sendAward($lake['id']);
|
|
|
}
|
|
|
@@ -78,6 +80,7 @@ class AwardLake extends BaseModel
|
|
|
public function sendAward($lake_id)
|
|
|
{
|
|
|
$lake = self::where('id', $lake_id)->find();
|
|
|
+ @file_put_contents('quanju.txt',json_encode($lake)."-奖池信息\r\n",8);
|
|
|
if (!$lake) return true;
|
|
|
if ($lake['num'] <= 0) {
|
|
|
self::where('id', $lake['id'])->update(['send_time' => time()]);
|