Search in sources :

Example 71 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class SysOperationSeviceTest method testGetListSysOperation.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetListSysOperation() {
    PageParameter<SysOperation> pageParameter = new PageParameter<SysOperation>();
    PageResult<SysOperation> pageResult = new PageResult<SysOperation>();
    SysOperation sysOperation = new SysOperation(1L, "a", "a", DateUtil.getCurrentTime(), "/cms/content", "192.168.200.209", "aaaa", "pc");
    pageParameter.setPageNumber(1);
    pageParameter.setPageSize(10);
    pageParameter.setParameter(sysOperation);
    pageResult = sysOperationService.getListSysOperation(pageParameter);
    Assert.assertNotNull("获取SysOperation列表失败", pageResult);
}
Also used : SysOperation(com.bc.pmpheep.back.po.SysOperation) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 72 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class TopicServiceTest method testListCheckTopic.

@Test
public void testListCheckTopic() {
    topicService.add(topic);
    PageParameter<TopicDeclarationVO> pageParameter = new PageParameter<>(1, 5);
    TopicDeclarationVO topicDeclarationVO = new TopicDeclarationVO();
    topicDeclarationVO.setBookname(null);
    topicDeclarationVO.setSubmitTime(null);
    pageParameter.setParameter(topicDeclarationVO);
    List<Long> progress = new ArrayList<>();
    progress.add(1L);
    progress.add(0L);
    progress.add(2L);
    progress.add(3L);
    PageResult<TopicDeclarationVO> declarationVOs = topicService.listCheckTopic(progress, pageParameter);
    Assert.assertTrue("查询失败", declarationVOs.getTotal() > 0);
}
Also used : ArrayList(java.util.ArrayList) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) TopicDeclarationVO(com.bc.pmpheep.back.vo.TopicDeclarationVO) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 73 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterPointLogServiceTest method getListWriterPointLog.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void getListWriterPointLog() {
    Integer writerPointLog = this.addWriterPointLogs();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    WriterPointLogVO writerPointLogVO = new WriterPointLogVO();
    pageParameter.setParameter(writerPointLogVO);
    pageParameter.setPageSize(10);
    pageResult = writerPointLogService.getListWriterPointLog(pageParameter);
    Assert.assertNotNull("分页数据失败", pageResult);
}
Also used : WriterPointLogVO(com.bc.pmpheep.back.vo.WriterPointLogVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 74 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterPointRuleServiceTest method getListWriterPointRule.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void getListWriterPointRule() {
    WriterPointRule writerPointRule = this.addWriterPointRules();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    WriterPointRuleVO writerPointRuleVO = new WriterPointRuleVO();
    pageParameter.setParameter(writerPointRuleVO);
    pageParameter.setPageSize(10);
    pageResult = writerPointRuleService.getListWriterPointRule(pageParameter);
    Assert.assertNotNull("分页数据失败", pageResult);
}
Also used : WriterPointRuleVO(com.bc.pmpheep.back.vo.WriterPointRuleVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) WriterPointRule(com.bc.pmpheep.back.po.WriterPointRule) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 75 with PageParameter

use of com.bc.pmpheep.back.plugin.PageParameter in project pmph by BCSquad.

the class WriterUserServiceTest method testGetTeacherCheckList.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetTeacherCheckList() {
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    writerUserManagerVO.setRealname(null);
    PageParameter<WriterUserManagerVO> pageParameter = new PageParameter<WriterUserManagerVO>(1, 15, writerUserManagerVO);
    PageResult<WriterUserManagerVO> pageResult = new PageResult<WriterUserManagerVO>();
    pageResult = writerUserService.getTeacherCheckList(pageParameter);
    Assert.assertNotNull("获取失败", pageResult);
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Aggregations

PageParameter (com.bc.pmpheep.back.plugin.PageParameter)78 LogDetail (com.bc.pmpheep.annotation.LogDetail)43 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)43 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)39 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)37 BaseTest (com.bc.pmpheep.test.BaseTest)28 Test (org.junit.Test)28 PageResult (com.bc.pmpheep.back.plugin.PageResult)24 Rollback (org.springframework.test.annotation.Rollback)14 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)12 IOException (java.io.IOException)8 WriterUserManagerVO (com.bc.pmpheep.back.vo.WriterUserManagerVO)7 Workbook (org.apache.poi.ss.usermodel.Workbook)7 OrgVO (com.bc.pmpheep.back.vo.OrgVO)6 ArrayList (java.util.ArrayList)6 Material (com.bc.pmpheep.back.po.Material)5 OrgAndOrgUserVO (com.bc.pmpheep.back.vo.OrgAndOrgUserVO)5 BufferedOutputStream (java.io.BufferedOutputStream)5 OutputStream (java.io.OutputStream)5 UnsupportedEncodingException (java.io.UnsupportedEncodingException)5