|
|
@@ -33,13 +33,13 @@ class LightController
|
|
|
*/
|
|
|
public function update(Request $request){// 拍灯以后的消息发至此处
|
|
|
$station = Station::query()->with('type')->where('code',$request['locCode'])->first();
|
|
|
-// if( $station->type && $station->type->name == '缓存架' ){ // 拍灯 推送任务
|
|
|
-// if($request['PTLAction'] !== 0) return ['location' => 200,'errMsg' => 'is cacheShelf','data' => $request->all()];
|
|
|
-// /** @var CacheShelfService $cacheShelfService */
|
|
|
-// $cacheShelfService = app(CacheShelfService::class);
|
|
|
-// $result = $cacheShelfService->lightOffTask($request['locCode'],$request['PTLAction']);
|
|
|
-// return ['location'=>$result['success'] ? 200 :0,'errMsg'=>$result['errMsg'] ?? null,'data'=>$request->all()];
|
|
|
-// }
|
|
|
+ if( $station->type && $station->type->name == '缓存架' ){ // 拍灯 推送任务
|
|
|
+ if($request['PTLAction'] !== 0) return ['location' => 200,'errMsg' => 'is cacheShelf','data' => $request->all()];
|
|
|
+ /** @var CacheShelfService $cacheShelfService */
|
|
|
+ $cacheShelfService = app(CacheShelfService::class);
|
|
|
+ $result = $cacheShelfService->lightOffTask($request['locCode'],$request['PTLAction']);
|
|
|
+ return ['location'=>$result['success'] ? 200 :0,'errMsg'=>$result['errMsg'] ?? null,'data'=>$request->all()];
|
|
|
+ }
|
|
|
$success = $request->input('success');
|
|
|
$location = $success?200:0;
|
|
|
app('LogService')->log(__METHOD__,__FUNCTION__,'拍灯:'.json_encode($request->all()));
|