|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace Modules\Video\Http\Controllers;
|
|
|
|
|
|
+use App\Jobs\Video\WechatCheck;
|
|
|
use Catch\Base\CatchController;
|
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
|
use Illuminate\Http\Request;
|
|
@@ -86,4 +87,33 @@ class WechatCheckController extends CatchController
|
|
|
->paginate($request->input('limit', 10));
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信提审
|
|
|
+ * @param Request $request
|
|
|
+ */
|
|
|
+ public function wechatCheck(Request $request) {
|
|
|
+ $this->validate($request, [
|
|
|
+ 'ids' => 'required|array'
|
|
|
+ ]);
|
|
|
+ $ids = $request->input('ids');
|
|
|
+ $now = date('Y-m-d H:i:s');
|
|
|
+ DB::table('video_wechat_check')
|
|
|
+ ->whereIn('id', $ids)
|
|
|
+ ->whereIn('status', [0, 4])
|
|
|
+ ->update([
|
|
|
+ 'status' => 5,
|
|
|
+ 'updated_at' => $now,
|
|
|
+ 'apply_at' => $now,
|
|
|
+ ]);
|
|
|
+ $traceContext = getTraceContext();
|
|
|
+ foreach ($ids as $id) {
|
|
|
+ WechatCheck::dispatch([
|
|
|
+ 'id' => $id,
|
|
|
+ 'traceInfo' => $traceContext->getTraceInfo()
|
|
|
+ ])->onQueue('{duanju_manage}.video.wechatCheck')->onConnection('queue-redis');
|
|
|
+ }
|
|
|
+
|
|
|
+ return 'ok';
|
|
|
+ }
|
|
|
}
|