mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-24 03:29:29 +08:00
学员批量导入
This commit is contained in:
@@ -115,6 +115,16 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
|
||||
}
|
||||
updateBatchById(updateRows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> allIds() {
|
||||
List<Department> departments = list(query().getWrapper().eq("1", "1").select("id"));
|
||||
List<Integer> ids = new ArrayList<>();
|
||||
for (Department department : departments) {
|
||||
ids.add(department.getId());
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ import org.springframework.stereotype.Service;
|
||||
import xyz.playedu.api.types.paginate.PaginationResult;
|
||||
import xyz.playedu.api.types.paginate.UserPaginateFilter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【users】的数据库操作Service实现
|
||||
@@ -72,6 +75,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> existsEmailsByEmails(List<String> emails) {
|
||||
List<User> users = list(query().getWrapper().in("email", emails).select("id", "email"));
|
||||
List<String> existsEmails = new ArrayList<>();
|
||||
for (User user : users) {
|
||||
existsEmails.add(user.getEmail());
|
||||
}
|
||||
return existsEmails;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user