|
@@ -173,15 +173,14 @@ class GeneralInnerServiceController extends Controller
|
173
|
173
|
// 鑒權
|
174
|
174
|
if ($this->oid == 0) return json_decode(json_encode(['code' => $this->apicode, 'msg' => GeneralConst::$apiMap[ $this->apicode ], 'data' => []], JSON_NUMERIC_CHECK), true);
|
175
|
175
|
// 服務層
|
176
|
|
- $orlId = $request->input('orlId');
|
177
|
|
- $result = $this->urlManagementSv->takeOrlPV($orlId, $this->oid);
|
|
176
|
+ $orlIds = $request->input('orlId');
|
|
177
|
+ $result = $this->urlManagementSv->takeOrlPV($orlIds, $this->oid);
|
178
|
178
|
// 整理返回資料
|
179
|
179
|
$data = [];
|
180
|
180
|
if (!empty($result)) {
|
181
|
|
- $data = [
|
182
|
|
- 'id' => $result["serno"],
|
183
|
|
- 'pv' => $result["pv"],
|
184
|
|
- ];
|
|
181
|
+ foreach($result as $dataPV){
|
|
182
|
+ $data[$dataPV["serno"]] = $dataPV["pv"];
|
|
183
|
+ }
|
185
|
184
|
}
|
186
|
185
|
// 返回
|
187
|
186
|
return json_decode(json_encode(['code' => GeneralConst::API_OK, 'msg' => GeneralConst::$apiMap[ GeneralConst::API_OK ], 'data' => $data], JSON_NUMERIC_CHECK), true);
|