Commit 05e9a79d by 朱继来

调整db

parent dc1fceef
Showing with 4 additions and 4 deletions
......@@ -58,7 +58,7 @@ class AddressController extends Controller
// 地址
public function getRegion($region_id)
{
$region = DB::connection('member')->table('lie_region')->where('region_id', $region_id)->select('region_name')->first();
$region = DB::connection('order')->table('lie_region')->where('region_id', $region_id)->select('region_name')->first();
return $region ? $region->region_name : '';
}
......@@ -69,7 +69,7 @@ class AddressController extends Controller
if ($request->isMethod('post')) {
$address_id = $request->input('address_id');
$info = DB::connection('member')->table('lie_user_address')->where('address_id', $address_id)->first();
$info = DB::connection('order')->table('lie_user_address')->where('address_id', $address_id)->first();
if (empty($info)) return ['errcode' => Error::E_NOT_EXISTS, 'errmsg' => '未找到'];
......@@ -160,13 +160,13 @@ class AddressController extends Controller
}
if ($map['user_id'] && isset($map['address_type'])) {
$addressList = DB::connection('member')->table('lie_user_address')->where($map)->get();
$addressList = DB::connection('order')->table('lie_user_address')->where($map)->get();
}
if(!empty($addressList) && is_array($addressList)) {
$region = array();
foreach ($addressList as &$val) {
$region = DB::connection('member')
$region = DB::connection('order')
->table('lie_region')
->whereIn('region_id', [$val->province, $val->city, $val->district])
->select('region_id', 'region_name')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment