yingzi 2 years ago
parent
commit
83c4226d64
1 changed files with 7 additions and 3 deletions
  1. 7 3
      Controller/Shop/ShopRostering.Class.php

+ 7 - 3
Controller/Shop/ShopRostering.Class.php

@@ -711,14 +711,18 @@ class ShopRostering extends BaseController
         $uids = [];
         foreach (explode(',', $param['staff_id']) as $item){
             $staff = $this->staff->getStaffInfo(['id' => $item, 'shopId' => $this->shopId])->getData();
-            $uids[] = $staff['userId'];
+            if(!empty($staff['userId'])){
+                $uids[] = $staff['userId'];
+            }
+        }
+        if(empty($uids)){
+            parent::sendOutput("员工未绑定钉钉账号", 1);
         }
-var_dump($uids);
+        
         $data = [
             'group_key' => $this->group_key($param['id']),
             'user_id_list' => implode(',', $uids),
         ];
-        var_dump($data);
         $data = json_encode($data);
 
         $res = $this->post_json($url, $data);