|
@@ -357,7 +357,7 @@ class UserService implements UserServiceInterface
|
|
|
*/
|
|
|
public function updateUserInfo(array $data): array
|
|
|
{
|
|
|
- return 1;
|
|
|
+ return [];
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -388,8 +388,8 @@ class UserService implements UserServiceInterface
|
|
|
{
|
|
|
Db::beginTransaction();
|
|
|
try {
|
|
|
- User::where(['id' => $id])->delete();
|
|
|
- UserInfo::where(['user_id' => $id])->delete();
|
|
|
+// User::where(['id' => $id])->delete();
|
|
|
+// UserInfo::where(['user_id' => $id])->delete();
|
|
|
Db::commit();
|
|
|
} catch (\Throwable $ex) {
|
|
|
Db::rollBack();
|
|
@@ -640,4 +640,20 @@ class UserService implements UserServiceInterface
|
|
|
return Result::error('查询失败');
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 根据类型获取用户列表
|
|
|
+ */
|
|
|
+ public function getTypeUserList(array $data): array
|
|
|
+ {
|
|
|
+ $result = User::when($data, function ($query) use ($data) {
|
|
|
+ if (isset($data['type_id']) && $data['type_id']) {
|
|
|
+ $query->where('type_id', $data['type_id']);
|
|
|
+ }
|
|
|
+ })->where('status', 1)->get();
|
|
|
+ if ($result) {
|
|
|
+ return Result::success($result);
|
|
|
+ } else {
|
|
|
+ return Result::error('查询失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|