提交 ed002c31 authored 作者: gongwenjie's avatar gongwenjie

通知

上级 396b4b93
......@@ -3,6 +3,7 @@ package com.zjty.tynotes.attendance;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@ComponentScan(basePackages = {
......@@ -11,6 +12,7 @@ import org.springframework.context.annotation.ComponentScan;
"com.zjty.tynotes.search",
"com.zjty.tynotes.attendance"
})
@EnableScheduling
public class NotesAttendanceApplication {
public static void main(String[] args) {
......
......@@ -21,4 +21,9 @@ public class AddressRequest {
*/
private int currentPage;
/**
* 部门id
*/
private String deId;
}
......@@ -355,15 +355,24 @@ public class UserManageServiceImpl implements UserManageService {
@Override
public PageResponse findAddressBook(AddressRequest addressRequest) {
PageResponse pageResponse = new PageResponse();
List<User> users = pasUserDao.findAll();
List<User> users = null;
if(addressRequest.getDeId()!=null){
users = pasUserDao.findAllByDepartmentIdsContains(addressRequest.getDeId());
}else{
users = pasUserDao.findAll();
}
List<Address> userList = new ArrayList<>();
List<Address> addressList = new ArrayList<>();
if(users!=null){
users.forEach(user -> {
int i = 1;
for (User user : users) {
if((!user.getUsername().equals("root")) && (!user.getUsername().equals("HR"))){
userList.add(new Address(user));
Address address = new Address(user);
address.setId(i+"");
userList.add(address);
i++;
}
});
}
}
if(addressRequest.getCurrentPage()<1){
addressRequest.setCurrentPage(1);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论