|
@@ -410,13 +410,17 @@ class Service
|
|
return $user['depart_select']['depart_id'];
|
|
return $user['depart_select']['depart_id'];
|
|
}
|
|
}
|
|
|
|
|
|
- public function getMyTopDepart($user){
|
|
|
|
|
|
+ public function getMyTopDepart($user, $get_title = false){
|
|
if(empty($user)) return 0;
|
|
if(empty($user)) return 0;
|
|
//当前门店
|
|
//当前门店
|
|
$current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
$current_top_depart_id = $user['depart_top'][0] ?? [];
|
|
- $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
-
|
|
|
|
- return $current_top_depart_id;
|
|
|
|
|
|
+ if($get_title){
|
|
|
|
+ $current_top_depart_title = $current_top_depart_id['title'] ?? "";
|
|
|
|
+ return $current_top_depart_title;
|
|
|
|
+ }else{
|
|
|
|
+ $current_top_depart_id = $current_top_depart_id['depart_id'] ?? 0;
|
|
|
|
+ return $current_top_depart_id;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
public function returnOrderEditErrorCommon($current_top_depart_id, $order_top_depart_id){
|
|
public function returnOrderEditErrorCommon($current_top_depart_id, $order_top_depart_id){
|