|
|
|
@ -108,6 +108,38 @@ class OtherController extends CommonController
|
|
|
|
return $this->success($list);
|
|
|
|
return $this->success($list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @OA\Get(
|
|
|
|
|
|
|
|
* path="/api/mobile/other/company-detail",
|
|
|
|
|
|
|
|
* tags={"小程序-其他"},
|
|
|
|
|
|
|
|
* summary="公司详情",
|
|
|
|
|
|
|
|
* @OA\Parameter(name="company_name", in="query", @OA\Schema(type="integer"), required=true, description="公司名字"),
|
|
|
|
|
|
|
|
* @OA\Response(
|
|
|
|
|
|
|
|
* response=200,
|
|
|
|
|
|
|
|
* description="操作成功"
|
|
|
|
|
|
|
|
* )
|
|
|
|
|
|
|
|
* )
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public function companyDetail()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$all = \request()->all();
|
|
|
|
|
|
|
|
$messages = [
|
|
|
|
|
|
|
|
'company_name.required' => '公司名称必填',
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$validator = Validator::make($all, [
|
|
|
|
|
|
|
|
'company_name' => 'required',
|
|
|
|
|
|
|
|
], $messages);
|
|
|
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$YuanheRepository = new YuanheRepository();
|
|
|
|
|
|
|
|
$result = $YuanheRepository->companyInfo(['enterpriseName' => $all['company_name']]);
|
|
|
|
|
|
|
|
if (empty($result)) {
|
|
|
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, '无数据']);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->success($result);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @OA\Get(
|
|
|
|
* @OA\Get(
|
|
|
|
* path="/api/mobile/other/company-list",
|
|
|
|
* path="/api/mobile/other/company-list",
|
|
|
|
|