/** * Get the store locations * * <b>Request Type</b>: GET<br/><br/> * <b>Request Endpoint</b>:http://{server-domain}/channel/offlinestore/store/location<br/><br/> * <b>Content-type</b>: application/json<br/><br/> * <b>Summary</b>: This api is used for getting store locations * <br/><br/> * * <b>Request Params</b>:<br/> * name: string, the store location name<br/> * <br/><br/> * * <b>Response Example</b>:<br/> * <pre> * [ * { * "id": "5518b4362736e7fa648b4567", * "name": "北京" * }, * { * "id": "5518b4362736e7fa648b4568", * "name": "上海" * } * ] * </pre> */ public function actionLocation() { $parentName = $this->getQuery('name', null); $accountId = Token::getAccountId(); $locations = StoreLocation::find()->where(['parentName' => $parentName, 'accountId' => $accountId, 'isDeleted' => StoreLocation::NOT_DELETED])->all(); return $locations; }