提交 be20c0ee 编写于 作者: zhouweidong's avatar zhouweidong

add

上级 50834523
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
INSERT INTO T_BOOK (bookid, bookname,pubyearisbn ,price) VALUES
(1, 'java程序设计', '清华大学出版社', '50'),
(2, 'c语言自学指南', '清华大学出版社', '60'),
(3, 'pythod从精通到入门', '清华大学出版社', '70');
\ No newline at end of file
INSERT INTO T_CATEGORY (categoryid, categoryname) VALUES
(1, '社会'),
(2, '军事'),
(3, '历史'),
(4, '计算机'),
(5, '农业');
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
create table IF NOT EXISTS T_BOOK
create table IF NOT EXISTS T_CATEGORY
(
bookid VARCHAR2(100) not null,
categoryid VARCHAR2(100) not null,
createman VARCHAR2(60),
updateman VARCHAR2(60),
createdate DATE,
bookname VARCHAR2(200),
updatedate DATE ,
pubyearisbn VARCHAR2(200),
price number
categoryname VARCHAR2(200),
updatedate DATE
);
\ No newline at end of file
......@@ -2,9 +2,10 @@
TARGET=PSSYSTEM
</#ibiztemplate>
import ${pub.getPKGCodeName()}.demoMain;
import ${pub.getPKGCodeName()}.quickstart.domain.BOOK;
import ${pub.getPKGCodeName()}.quickstart.mapper.BOOKMapper;
import cn.ibizhub.demo.demoMain;
import cn.ibizhub.demo.quickstart.domain.CATEGORY;
import cn.ibizhub.demo.quickstart.mapper.CATEGORYMapper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -15,17 +16,20 @@ import java.util.List;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = demoMain.class)
public class ApplicationTest {
public class QuickStartTest {
@Autowired
private BOOKMapper bookMapper;
private CATEGORYMapper categoryMapper;
@Test
public void testMain() {
System.out.println(("----- selectAll method test ------"));
List<BOOK> userList = bookMapper.selectList(null);
Assert.assertEquals(3, userList.size());
List<CATEGORY> userList = categoryMapper.selectList(null);
Assert.assertEquals(5, userList.size());
userList.forEach(System.out::println);
}
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册