示例#1
0
 /**
  * 更新用户信息
  * 更新用户姓名,部门,角色,电话 ,邮件
  */
 public static function update($id, $name, $dept_id, $role_id, $mobile, $email)
 {
     try {
         if (isset($name)) {
             $arr["name"] = $name;
         }
         if (isset($dept_id)) {
             $arr["dept_id"] = $dept_id;
         }
         if (isset($role_id)) {
             $arr["role_id"] = $role_id;
         }
         if (isset($mobile)) {
             $arr["mobile"] = $mobile;
         }
         if (isset($email)) {
             $arr["email"] = $email;
         }
         return Dao\UserTable::instance()->update($id, $arr);
     } catch (Exception $e) {
         throw $e;
     }
 }
示例#2
0
 public static function get_data_count()
 {
     try {
         return UserTable::instance()->count(null);
     } catch (Exception $e) {
         throw $e;
     }
 }