|
@@ -12,13 +12,16 @@ use App\Models\BaseAttachmentModel;
|
|
use App\Models\BaseSettingsModel;
|
|
use App\Models\BaseSettingsModel;
|
|
use App\Models\DreamImages;
|
|
use App\Models\DreamImages;
|
|
use App\Models\DreamInfoModel;
|
|
use App\Models\DreamInfoModel;
|
|
|
|
+use App\Models\SystemInfoModel;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Request;
|
|
use App\Repositories\Base\Criteria\OrderBy;
|
|
use App\Repositories\Base\Criteria\OrderBy;
|
|
use App\Repositories\Dream\Criteria\MultiWhere;
|
|
use App\Repositories\Dream\Criteria\MultiWhere;
|
|
use App\Repositories\Dream\InfoRepository;
|
|
use App\Repositories\Dream\InfoRepository;
|
|
|
|
+use App\Helper\JpushHelper;
|
|
|
|
|
|
class InfoController extends Controller
|
|
class InfoController extends Controller
|
|
{
|
|
{
|
|
|
|
+ use JpushHelper;
|
|
private $repository;
|
|
private $repository;
|
|
|
|
|
|
public function __construct(InfoRepository $repository) {
|
|
public function __construct(InfoRepository $repository) {
|
|
@@ -161,6 +164,17 @@ class InfoController extends Controller
|
|
DreamImages::insert($arr);
|
|
DreamImages::insert($arr);
|
|
}
|
|
}
|
|
$ok = $this->repository->update(request('id'),$data);
|
|
$ok = $this->repository->update(request('id'),$data);
|
|
|
|
+ if ($data['status'] == 1) { //审核通过
|
|
|
|
+ $message = '你的梦想《'.$data['name'].'》已被批准,离你实现梦想又更进一步啦~ ';
|
|
|
|
+ $info = [
|
|
|
|
+ 'user_id' => $data['user_id'],
|
|
|
|
+ 'message' => $message,
|
|
|
|
+ ];
|
|
|
|
+ SystemInfoModel::create($info);
|
|
|
|
+
|
|
|
|
+// 长连接
|
|
|
|
+ $this->jPush($message,'',$data['user_id']);
|
|
|
|
+ }
|
|
if($ok) {
|
|
if($ok) {
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|
|
return $this->showMessage('操作成功',urldecode(request('_referer')));
|
|
return $this->showMessage('操作成功',urldecode(request('_referer')));
|