//package com.elephant.framework.galaxy.travel.mapper;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.elephant.framework.galaxy.travel.module.system.mapper.DepartmentMapper;
//import com.elephant.framework.galaxy.travel.module.system.entity.Department;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.Date;
//import java.util.List;
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class DepartmentMapperTests {
//
//    @Autowired
//    private DepartmentMapper departmentMapper;
//
//    @Test
//    public void testSelect() {
//        // 查询全部
////        List<Department> departments = deptMapper.selectList(null);
////        departments.forEach(System.out::println);
//        //id 查询要有@TableId标识主键
////        Department department = deptMapper.selectById(1);
////        System.out.println(department);
//        //多条件查询
////        Department department = new Department();
////        department.setDelFlag(Byte.valueOf("1"));
////        department.setName("租户2");
////        Department result = deptMapper.selectOne(new QueryWrapper<>(department));
////        System.out.println(result);
//        Page<Department> page = new Page<>(2, 2);
//        IPage<Department> departmentIPage = departmentMapper.selectPage(page, null);
//        List<Department> records = departmentIPage.getRecords();
//        System.out.println(records);
//    }
//
//    @Test
//    public void testInsert() {
//        Department department = new Department();
//        department.setName("品象软件");
//        department.setSort(1);
//        department.setCreateTime(new Date());
//        department.setDelFlag(Byte.parseByte("0"));
//        department.setParentId(1);
//        department.setTenantId(1);
//        departmentMapper.insert(department);
//    }
//
//}
