|
|
|
|
@ -91,9 +91,7 @@ class OtherController extends CommonController
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
$YuanheRepository = new YuanheRepository();
|
|
|
|
|
// $result = $YuanheRepository->search(['keyword' => $all['company_name']]);
|
|
|
|
|
// todo:上线解开注释
|
|
|
|
|
$result = "[{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91320594MA7F0G9W6A\",\"keyNo\":\"db5ppy5kbsprbbhjbjlarvmvphjhp3mrkv\",\"name\":\"苏州元瞰科技有限公司\",\"operName\":\"刘杰杰\",\"startDate\":\"2021-12-21\",\"status\":\"注销\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91310118MA1JMYNK9K\",\"keyNo\":\"ak95iy5s3rhmsasj5kepiijjimh95jl3b5\",\"name\":\"上海元橡瞰行科技有限公司\",\"operName\":\"任杰\",\"startDate\":\"2019-03-19\",\"status\":\"存续\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91110108MAERYU4T74\",\"keyNo\":\"fs3ijyphhk59kbhjblbsj35priklbla5vh\",\"name\":\"北京元字瞰科技有限公司\",\"operName\":\"宋明龙\",\"startDate\":\"2025-08-22\",\"status\":\"存续\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"\",\"keyNo\":\"13ivbylse5l5mjkjar9pbhkm9vpsjiksjl\",\"name\":\"上海瞰元信息科技有限公司\",\"operName\":\"刘勇\",\"startDate\":\"2005-06-30\",\"status\":\"吊销\"},{\"createBy\":null,\"createDt\":null,\"updateBy\":null,\"updateDt\":null,\"creditCode\":\"91330100796660273A\",\"keyNo\":\"f3aaeyiss99ev5hjbipkv9eaerkih99bbs\",\"name\":\"杭州瞰元信息科技有限公司\",\"operName\":\"曾铁农\",\"startDate\":\"2006-12-22\",\"status\":\"吊销\"}]";
|
|
|
|
|
$result = $YuanheRepository->search(['keyword' => $all['company_name']]);
|
|
|
|
|
$result = json_decode($result, true);
|
|
|
|
|
if (!$result) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, '获取失败']);
|
|
|
|
|
@ -156,14 +154,14 @@ class OtherController extends CommonController
|
|
|
|
|
->whereHas('users', function ($query) {
|
|
|
|
|
$query->where('is_schoolmate', 1);
|
|
|
|
|
})->with([
|
|
|
|
|
'users' => function ($query) {
|
|
|
|
|
$query->select('id', 'name', 'username', 'company_position', 'company_id')->where('is_schoolmate', 1)->with([
|
|
|
|
|
'courseSigns' => function ($query) {
|
|
|
|
|
$query->select('id', 'status', 'user_id', 'course_id')->with('course')->orderBy('fee_status', 'desc');
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
'users' => function ($query) {
|
|
|
|
|
$query->select('id', 'name', 'username', 'company_position', 'company_id')->where('is_schoolmate', 1)->with([
|
|
|
|
|
'courseSigns' => function ($query) {
|
|
|
|
|
$query->select('id', 'status', 'user_id', 'course_id')->with('course')->orderBy('fee_status', 'desc');
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
// 根据排序字段进行排序
|
|
|
|
|
if ($sortName !== 'distance') {
|
|
|
|
|
$query->orderBy($sortName, $sortType);
|
|
|
|
|
|