diff --git a/application/admin/controller/CfChannelInfo.php b/application/admin/controller/CfChannelInfo.php index 172cad9..62fc750 100755 --- a/application/admin/controller/CfChannelInfo.php +++ b/application/admin/controller/CfChannelInfo.php @@ -64,7 +64,7 @@ class CfChannelInfo extends Backend } $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $result = $this->model->allowField(true)->save($params); Db::commit(); } catch (ValidateException $e) { @@ -101,7 +101,7 @@ class CfChannelInfo extends Backend return $this->selectpage(); } $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); list($where, $sort, $order, $offset, $limit) = $this->buildparams(); $list = $this->model ->where($where) @@ -122,7 +122,7 @@ class CfChannelInfo extends Backend $keyValue=$this->request->post('keyValue'); $this->model->field('id,channel_name as name,commission_rate'); $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $where = ["group_id"=>$group_id]; if($keyValue){ $where = ['id'=>$keyValue,"group_id"=>$group_id]; diff --git a/application/admin/controller/CfHotelInfo.php b/application/admin/controller/CfHotelInfo.php index 7a30915..99479c1 100755 --- a/application/admin/controller/CfHotelInfo.php +++ b/application/admin/controller/CfHotelInfo.php @@ -48,7 +48,7 @@ class CfHotelInfo extends Backend $keyValue=$this->request->post('keyValue'); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $result= $this->model->getList($name,$keyValue,$params); if($keyValue){ return json(['list' => $result]); @@ -65,7 +65,7 @@ class CfHotelInfo extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfHotelInfoService(); return json($service->getList($params)); } @@ -78,7 +78,7 @@ class CfHotelInfo extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfHotelInfoService(); return json($service->save($params)); } diff --git a/application/admin/controller/CfItem.php b/application/admin/controller/CfItem.php index 3ae1ba6..2ee738d 100755 --- a/application/admin/controller/CfItem.php +++ b/application/admin/controller/CfItem.php @@ -54,7 +54,7 @@ class CfItem extends Backend return $this->selectpage(); } list($where, $sort, $order, $offset, $limit) = $this->buildparams(); - $group_id=$this->auth->getGroupId(); + $group_id=$this->auth->getGroupIds()[0]; $list = $this->model ->alias("a") ->join('hbp_admin c','a.create_id = c.id','left') @@ -117,7 +117,7 @@ class CfItem extends Backend $params["city_name"]=$area->where("id","=",$params["city"])->value("name"); } $params['create_id']=$this->auth->id; - $params['group_id']=$this->auth->getGroupId(); + $params['group_id']=$this->auth->getGroupIds()[0]; $result = $this->model->allowField(true)->save($params); Db::commit(); } catch (ValidateException $e) { @@ -210,7 +210,7 @@ class CfItem extends Backend $keyValue=$this->request->post('keyValue'); $this->model->field('id,item_name as name,item_unit,item_type,item_memo,purchase_user_id'); $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $where = ["del_flag"=>0,"group_id"=>$group_id]; if($keyValue){ $where = ['id'=>$keyValue,"del_flag"=>0,"group_id"=>$group_id]; @@ -244,7 +244,7 @@ class CfItem extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfItemService(); return json($service->getList($params)); } @@ -257,7 +257,7 @@ class CfItem extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfItemService(); return json($service->save($params)); } diff --git a/application/admin/controller/CfRoomInfo.php b/application/admin/controller/CfRoomInfo.php index 800e3e1..d130a93 100755 --- a/application/admin/controller/CfRoomInfo.php +++ b/application/admin/controller/CfRoomInfo.php @@ -54,7 +54,7 @@ class CfRoomInfo extends Backend return $this->selectpage(); } list($where, $sort, $order, $offset, $limit) = $this->buildparams(); - $group_id=$this->auth->getGroupId(); + $group_id=$this->auth->getGroupIds()[0]; $groupDao = new GroupDao(); $group_id = $groupDao->getTopGroup($group_id); $list = $this->model @@ -100,7 +100,7 @@ class CfRoomInfo extends Backend } $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $result = $this->model->allowField(true)->save($params); Db::commit(); } catch (ValidateException $e) { diff --git a/application/admin/controller/CfRoomPlan.php b/application/admin/controller/CfRoomPlan.php index c89825c..cce1959 100755 --- a/application/admin/controller/CfRoomPlan.php +++ b/application/admin/controller/CfRoomPlan.php @@ -52,7 +52,7 @@ class CfRoomPlan extends Backend public function getList(){ $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $name=$this->request->post('name'); $keyValue=$this->request->post('keyValue'); $this->model->field('id,plan_name as name,purchase_user_id,plan_memo'); @@ -81,7 +81,7 @@ class CfRoomPlan extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfRoomPlanDao(); return json($service->getList($params)); } @@ -94,7 +94,7 @@ class CfRoomPlan extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new CfRoomPlanDao(); return json($service->save($params)); } diff --git a/application/admin/controller/CfSuplierInfo.php b/application/admin/controller/CfSuplierInfo.php index d5ce07e..b5668c8 100755 --- a/application/admin/controller/CfSuplierInfo.php +++ b/application/admin/controller/CfSuplierInfo.php @@ -70,7 +70,7 @@ class CfSuplierInfo extends Backend } $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $result = $this->model->allowField(true)->save($params); Db::commit(); } catch (ValidateException $e) { @@ -107,7 +107,7 @@ class CfSuplierInfo extends Backend return $this->selectpage(); } $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); list($where, $sort, $order, $offset, $limit) = $this->buildparams(); $list = $this->model ->where($where) @@ -127,7 +127,7 @@ class CfSuplierInfo extends Backend $keyValue=$this->request->post('keyValue'); $this->model->field('id,supplier_name as name'); $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $where = ["group_id"=>$group_id]; if($keyValue){ $where = ['id'=>$keyValue,"group_id"=>$group_id]; diff --git a/application/admin/controller/Deposit.php b/application/admin/controller/Deposit.php index 497a41b..8ac8ddf 100644 --- a/application/admin/controller/Deposit.php +++ b/application/admin/controller/Deposit.php @@ -49,7 +49,7 @@ class Deposit extends Backend return $this->selectpage(); } list($where, $sort, $order, $offset, $limit) = $this->buildparams(); - $group_id=$this->auth->getGroupId(); + $group_id=$this->auth->getGroupIds()[0]; $list = $this->model ->alias("a") ->join('hbp_admin c','a.create_id = c.id','left') diff --git a/application/admin/controller/OrderHotel.php b/application/admin/controller/OrderHotel.php index 6453780..2976054 100755 --- a/application/admin/controller/OrderHotel.php +++ b/application/admin/controller/OrderHotel.php @@ -70,7 +70,7 @@ class OrderHotel extends Backend return $this->selectpage(); } $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); list($where, $sort, $order, $offset, $limit) = $this->buildparams(); $list = $this->model ->where($where) diff --git a/application/admin/controller/OrderItem.php b/application/admin/controller/OrderItem.php index 6f8bc83..b575658 100755 --- a/application/admin/controller/OrderItem.php +++ b/application/admin/controller/OrderItem.php @@ -70,7 +70,7 @@ class OrderItem extends Backend return $this->selectpage(); } $groupDao = new GroupDao(); - $group_id = $groupDao->getTopGroup($this->auth->getGroupId()); + $group_id = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); list($where, $sort, $order, $offset, $limit) = $this->buildparams(); $list = $this->model ->where($where) diff --git a/application/admin/controller/OrderMain.php b/application/admin/controller/OrderMain.php index 2788457..65cdac5 100755 --- a/application/admin/controller/OrderMain.php +++ b/application/admin/controller/OrderMain.php @@ -52,7 +52,7 @@ class OrderMain extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $orderMainService = new OrderMainService(); Db::startTrans(); $result = $orderMainService->saveOrder($params); @@ -72,7 +72,7 @@ class OrderMain extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $orderMainService = new OrderMainService(); Db::startTrans(); $result = $orderMainService->subOrderSave($params); @@ -116,7 +116,7 @@ class OrderMain extends Backend private function insertOrderMain($params){ $orderMain = new \app\admin\model\OrderMain(); $params['create_id']=$this->auth->id; - $params['group_id']=$this->auth->getGroupId(); + $params['group_id']=$this->auth->getGroupIds()[0]; $result = $orderMain->allowField(true)->save($params); } @@ -127,7 +127,7 @@ class OrderMain extends Backend public function getOrderList(){ $params=$this->request->post(); $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $orderMainService = new OrderMainService(); $result = $orderMainService->getOrderList($params); return json($result); diff --git a/application/admin/controller/PaymentOrder.php b/application/admin/controller/PaymentOrder.php index f8a9d4c..ffbac69 100755 --- a/application/admin/controller/PaymentOrder.php +++ b/application/admin/controller/PaymentOrder.php @@ -46,7 +46,7 @@ class PaymentOrder extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new PaymentOrderService(); $result = $service->save($params); return json($result); @@ -59,7 +59,7 @@ class PaymentOrder extends Backend public function getList(){ $params=$this->request->post(); $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new PaymentOrderService(); $result = $service->getList($params); return json($result); @@ -106,7 +106,7 @@ class PaymentOrder extends Backend public function getSubOrderList(){ $params=$this->request->post(); $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new PaymentOrderService(); $result = $service->getSubOrderList($params); return json($result); diff --git a/application/admin/controller/ReceiptOrder.php b/application/admin/controller/ReceiptOrder.php index 391ab04..45414f4 100755 --- a/application/admin/controller/ReceiptOrder.php +++ b/application/admin/controller/ReceiptOrder.php @@ -50,7 +50,7 @@ class ReceiptOrder extends Backend $params=$this->request->post(); $params['create_id']=$this->auth->id; $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new ReceiptOrderService(); $result = $service->save($params); return json($result); @@ -63,7 +63,7 @@ class ReceiptOrder extends Backend public function getList(){ $params=$this->request->post(); $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new ReceiptOrderService(); $result = $service->getList($params); return json($result); @@ -110,7 +110,7 @@ class ReceiptOrder extends Backend public function getOrderMainList(){ $params=$this->request->post(); $groupDao = new GroupDao(); - $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupId()); + $params['group_id'] = $groupDao->getTopGroup($this->auth->getGroupIds()[0]); $service = new ReceiptOrderService(); $result = $service->getOrderMainList($params); return json($result); diff --git a/application/admin/controller/auth/Admin.php b/application/admin/controller/auth/Admin.php index ab7ce5a..840b92a 100755 --- a/application/admin/controller/auth/Admin.php +++ b/application/admin/controller/auth/Admin.php @@ -302,7 +302,7 @@ class Admin extends Backend $keyValue=$this->request->post('keyValue'); $this->model->field('id,nickname as name'); $groupDao = new GroupDao(); - $groupIds = $groupDao->getSubGroup($this->auth->getGroupId()); + $groupIds = $groupDao->getSubGroup($groupDao->getTopGroup($this->auth->getGroupIds()[0])); //获取用户ID $accModel = new AuthGroupAccess(); $accList = $accModel->where(["group_id" => ["in",$groupIds]])->select();