| xqd
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
+use App\Models\AccountLog;
|
|
|
use App\Models\DreamInfoModel;
|
|
|
use App\Models\SupportDreamModel;
|
|
|
use App\Models\SystemInfoModel;
|
| xqd
@@ -10,10 +11,12 @@ use Illuminate\Console\Command;
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
use App\Helper\JpushHelper;
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
+use App\Helper\LogHelper;
|
|
|
+
|
|
|
|
|
|
class DreamDJS extends Command
|
|
|
{
|
|
|
- use JpushHelper;
|
|
|
+ use JpushHelper,LogHelper;
|
|
|
/**
|
|
|
* The name and signature of the console command.
|
|
|
*
|
| xqd
@@ -47,12 +50,21 @@ class DreamDJS extends Command
|
|
|
{
|
|
|
//执行逻辑
|
|
|
Log::info('------------通知消息begin-----------');
|
|
|
-
|
|
|
$end_dream_info = DreamInfoModel::with('user')->where('end_time','<',date('Y-m-d H:i:s'))->get();
|
|
|
if (count($end_dream_info)>0) {
|
|
|
foreach ($end_dream_info as $item){
|
|
|
-// (1)给梦想者发消息
|
|
|
+// (1)给梦想者发消息 梦想结束记录日志account_logs
|
|
|
$dream_user = $item->user;
|
|
|
+ $img = $item->img; //梦想图片
|
|
|
+ $arr = [
|
|
|
+ 'from_type'=>'梦想币',
|
|
|
+ 'from_id'=>$dream_user->id,
|
|
|
+ 'from_name'=>$dream_user->nickname,
|
|
|
+ 'op'=>'梦想结束',
|
|
|
+ 'from_amount'=>$item->get_coin,
|
|
|
+ 'to_type'=>'梦想币',
|
|
|
+ ];
|
|
|
+
|
|
|
if (!empty($dream_user)) {
|
|
|
$message = "你的梦想《".$item->name."》已结束,点击了解接下来的步骤";
|
|
|
$info = $dream_user->nickname.'会以你提供的微信/电话联系你约好时间地点亲自感谢你给予的支持和鼓励。如果你不希望见面或
|