package com.iarchie.crm_v1;
import com.iarchie.crm_v1.domain.Department;
import com.iarchie.crm_v1.domain.Employee;
import com.iarchie.crm_v1.domain.Position;
import com.iarchie.crm_v1.domain.User;
import com.iarchie.crm_v1.service.IDepartmentService;
import com.iarchie.crm_v1.service.IEmployeeService;
import com.iarchie.crm_v1.service.IPositionService;
import com.iarchie.crm_v1.service.IUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value = "classpath:applicationContext.xml")
public class App {
@Autowired
private IUserService service;
@Autowired
private IEmployeeService employeeService;
@Autowired
private IPositionService positionService;
@Autowired
private IDepartmentService departmentService;
@Test
public void test() {
List<User> users = service.selectAll("d",null);
for (User user : users) {
System.out.println("user = " + user);
}
}
@Test
public void testPage() {
List<User> users = service.selectPageResult(1, 5);
for (User user : users) {
System.out.println("user = " + user);
}
}
@Test
public void testEmpList() {
List<Employee> employees = employeeService.selectAll();
for (Employee employee : employees) {
System.out.println("employee = " + employee.getDeptId().getDeptname());
}
}
@Test
public void testPositionList() {
List<Position> positions = positionService.selectAll("DBA");
for (Position position : positions) {
System.out.println("position = " + position);
}
}
@Test
public void deptList(){
List<Department> list = departmentService.selectAll("技术");
for (Department department : list) {
System.out.println("department = " + department);
}
}
}
最近下载更多
wwwwwww453 LV3
2025年12月23日
奋斗的小蚂蚁 LV17
2025年9月15日
vincemokea LV9
2025年5月7日
heqian LV17
2024年5月26日
李俊雄 LV3
2024年5月6日
shenghaer LV1
2024年3月14日
zhaozhiqi LV5
2023年10月2日
李亮 LV19
2023年8月28日
493240689 LV3
2022年11月25日
admin115 LV6
2022年11月22日
最近浏览更多
微信网友_7826662819680256
2025年12月24日
暂无贡献等级
wwwwwww453 LV3
2025年12月23日
vincemokea LV9
2025年5月7日
Lyricify
2024年12月22日
暂无贡献等级
lxzlxzl LV1
2024年6月21日
wangbh1234 LV1
2024年6月6日
heqian LV17
2024年5月26日
sunlea LV20
2024年5月22日
李俊雄 LV3
2024年4月30日
FFF112233 LV8
2024年3月27日

