use of org.test.bean.TestTable in project Axe by DongyuCai.
the class DaoTest method testInsert.
public static void testInsert() throws Exception {
TestTable test = new TestTable();
test.setId(3);
test.setName("test3");
test = DataBaseHelper.insertOnDuplicateKeyEntity(test);
System.out.println(JsonUtil.toJson(test));
/*Export export = new Export();
export.setName("abc");
TestDao testDao = BeanHelper.getBean(TestDao.class);
export = testDao.saveEntity(export);
System.out.println(export.getId());*/
System.exit(0);
}
use of org.test.bean.TestTable in project Axe by DongyuCai.
the class DaoTest method testDaoPaging.
public static void testDaoPaging() throws Exception {
TestDao testDao = BeanHelper.getBean(TestDao.class);
List<TestTable> all = testDao.getAll();
Page<TestTable> pageList = testDao.page();
for (TestTable e : all) {
System.out.print(e.getName() + "\t");
}
System.out.println();
System.out.println(pageList.getCount() + "\t" + pageList.getPages());
for (TestTable e : pageList.getRecords()) {
System.out.print(e.getName() + "\t");
}
System.out.println();
}
use of org.test.bean.TestTable in project Axe by DongyuCai.
the class TestController method getOne.
//==================== postman success ================//
@Request(value = "/getOne/{id}", method = RequestMethod.GET)
public Data getOne(@RequestParam("id") Long id, Param param) {
// Data data = analysisParam(param);
if (id == null) {
throw new RestException(RestException.SC_BAD_REQUEST, "id不正确");
}
TestTable one = testService.get(id);
Data data = new Data(one);
return data;
}
Aggregations