This commit is contained in:
2023-11-09 16:07:23 +08:00
parent 39f88f3e1b
commit 6c3970ec5c
5 changed files with 168 additions and 63 deletions
+12
View File
@@ -6,6 +6,7 @@ namespace App\Model;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Collection;
use Hyperf\Snowflake\Concern\Snowflake;
/**
@@ -58,6 +59,17 @@ class User extends Model
return $result;
}
/**
* 获取用户信息-多条
* @param array $params
* @param array $fields
* @return Collection|array
*/
public static function getList(array $params, array $fields = ['*']): Collection|array
{
return self::where($params)->get($fields);
}
/**
* 新增用户-批量
* @param array $data 新增数据