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); } } }
最近下载更多
最近浏览更多
FFF112233 LV8
3月27日
阿凡达 LV9
1月29日
shenghaer LV1
1月26日
WBelong LV7
2023年12月27日
pangzhihui LV12
2023年12月11日
limenghaoqwer LV2
2023年11月27日
xiaomii LV3
2023年11月13日
wwewww LV4
2023年11月2日
13188866605 LV12
2023年10月21日
zhaozhiqi LV5
2023年10月2日