|
@@ -578,7 +578,11 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
|
|
|
// return Result::success($data);
|
|
|
$pid = $data['pid'] ?? 0;
|
|
|
- $result = District::where('pid',$pid)->where('status',1)->orderBy('code')->get();
|
|
|
+ $result = District::leftJoin('district as district2','district.pid','=','district2.id')
|
|
|
+ ->where('district.pid',$pid)
|
|
|
+ ->where('district.status',1)
|
|
|
+ ->select('district.id','district.name','district2.name as pid_name')
|
|
|
+ ->orderBy('district.code')->get();
|
|
|
if(empty($result)){
|
|
|
return Result::error("未查询到此地区",0);
|
|
|
}else{
|