| xqd
@@ -53,7 +53,21 @@ class DreamDJS extends Command
|
|
|
$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)给梦想者发消息 梦想结束记录日志account_logs
|
|
|
+// (1)给梦想者发消息 梦想结束记录日志account_logs 梦想结束创建二维码
|
|
|
+ if (empty($item->code)) {
|
|
|
+ // 生成二维码
|
|
|
+ $info = [];
|
|
|
+ $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
|
|
|
+ $info['code'] = 'WECHATPAY_' . $info['transaction_id'];
|
|
|
+ $code_url = env('APP_URL').'/api/user/meet?dream_id='.$item->id;
|
|
|
+ $code_path = public_path('qrcodes/'.$info['code'].'.png');
|
|
|
+ \QrCode::format('png')->size(500)->generate($code_url,$code_path);
|
|
|
+ $code = env('APP_URL').'/qrcodes/'.$info['code'].'.png';
|
|
|
+ $item->code = $code;
|
|
|
+ $item->save();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$dream_user = $item->user;
|
|
|
if (!empty($dream_user)) {
|
|
|
$img = $item->img; //梦想图片
|