use of org.tech.domain.People in project tech by ffyyhh995511.
the class PeopleService method queryPage.
public OpenPage queryPage(Integer pageNum, Integer pageSize) {
// 获取第1页,10条内容,默认查询总数count
PageHelper.startPage(pageNum, pageSize);
// 紧跟着的第一个select方法会被分页
List<People> list = peopleMapper.queryAll();
Page p = ((Page) list);
return OpenPage.buildPage(p);
}
use of org.tech.domain.People in project tech by ffyyhh995511.
the class MultipleController method testNullValue.
/**
* 测试返回的数据有空字段时,过滤掉这些没用的空字段
* @return
*/
@ResponseBody
@RequestMapping(value = "/testNullValue", method = RequestMethod.GET)
public Object testNullValue() {
People p = new People();
p.setAddress("address");
p.setAge(20);
return responseSuccess(null, p);
}
use of org.tech.domain.People in project tech by ffyyhh995511.
the class PeopleServiceUnit method test.
@Test
public void test() {
People people = new People();
people.setName("t22");
System.out.println(peopleService.add(people));
}
use of org.tech.domain.People in project tech by ffyyhh995511.
the class AllInOneThreadController method test1.
/**
* 这个方法是为了测试controller-->service-->dao是否都是同一个线程
* @return
*/
@ResponseBody
@RequestMapping(value = "/test1", method = RequestMethod.GET)
public Object test1() {
logger.info("controller thread name:" + Thread.currentThread().getName());
logger.info("controller thread id:" + Thread.currentThread().getId());
logger.info("controller activeCount:" + Thread.activeCount());
try {
People people = new People();
people.setId(UUIDUtil.getUUID());
people.setName("test one thread");
peopleService.addByTestOneThread(people);
} catch (Exception e) {
logger.error("这里报错了", e);
}
return responseSuccess("test one thread", new Date());
}
Aggregations