Search in sources :

Example 1 with PageParameter

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

the class BookServiceTest method testGetBookPreferenceAnalysis.

@Test
public void testGetBookPreferenceAnalysis() {
    PageParameter<BookPreferenceAnalysisVO> pageParameter = new PageParameter<>(1, 10);
    BookPreferenceAnalysisVO bookPreferenceAnalysisVO = new BookPreferenceAnalysisVO();
    bookPreferenceAnalysisVO.setBookname(null);
    pageParameter.setParameter(bookPreferenceAnalysisVO);
    PageResult<BookPreferenceAnalysisVO> pageResult = bookService.getBookPreferenceAnalysis(pageParameter);
    Assert.assertNotNull(pageResult.getRows());
}
Also used : BookPreferenceAnalysisVO(com.bc.pmpheep.back.vo.BookPreferenceAnalysisVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 2 with PageParameter

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

the class BookUserCommentServiceTest method testListBookUserComment.

@Test
public void testListBookUserComment() {
    PageParameter<BookUserCommentVO> pageParameter = new PageParameter<>(1, 1);
    BookUserCommentVO bookUserCommentVO = new BookUserCommentVO();
    bookUserCommentVO.setIsAuth(1);
    bookUserCommentVO.setName("名字");
    pageParameter.setParameter(bookUserCommentVO);
    PageResult<BookUserCommentVO> pageResult = bookUserCommentService.listBookUserComment(pageParameter);
    Assert.assertTrue("分页初始化/查询图书评论", pageResult.getRows().isEmpty());
}
Also used : BookUserCommentVO(com.bc.pmpheep.back.vo.BookUserCommentVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 3 with PageParameter

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

the class OrgSeviceTest method testListOrgByOrgName.

@Test
public void testListOrgByOrgName() {
    PageParameter pageParameter = new PageParameter<>();
    PageResult<OrgVO> pageResult = new PageResult<OrgVO>();
    OrgVO orgVO = new OrgVO();
    orgVO.setOrgName(null);
    orgVO.setAreaId(null);
    orgVO.setRealname(null);
    pageParameter.setPageNumber(1);
    pageParameter.setPageSize(20);
    pageParameter.setParameter(orgVO);
    pageResult = orgService.getSchoolAdminCheckList(pageParameter);
    Assert.assertNotNull("在新增用户与修改用户时查询机构失败", orgService.listOrgByOrgName("机构名称"));
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 4 with PageParameter

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

the class OrgSeviceTest method testListSendToSchoolAdminOrAllUser.

@Test
public void testListSendToSchoolAdminOrAllUser() {
    PageParameter pageParameter = new PageParameter<>();
    PageResult<OrgVO> pageResult = new PageResult<OrgVO>();
    OrgVO orgVO = new OrgVO();
    orgVO.setOrgName(null);
    orgVO.setAreaId(null);
    orgVO.setRealname(null);
    pageParameter.setPageNumber(1);
    pageParameter.setPageSize(20);
    pageParameter.setParameter(orgVO);
    pageResult = orgService.getSchoolAdminCheckList(pageParameter);
    Assert.assertNotNull("系统消息——发送新消息——发送对象失败", orgService.listSendToSchoolAdminOrAllUser("机构名称", 1L));
}
Also used : OrgVO(com.bc.pmpheep.back.vo.OrgVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 5 with PageParameter

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

the class PmphGroupFileServiceTest method testGetList.

@Test
public void testGetList() {
    pmphGroupFileService.add(pmphGroupFile);
    PageResult pageResult = new PageResult<>();
    PageParameter pageParameter = new PageParameter<>();
    PmphGroupFileVO fileVO = new PmphGroupFileVO();
    fileVO.setFileName(null);
    fileVO.setFileId(null);
    fileVO.setGroupId(pmphGroupFile.getGroupId());
    ;
    pageParameter.setParameter(fileVO);
    pageParameter.setPageSize(15);
    pageResult = pmphGroupFileService.listGroupFile(pageParameter);
    Assert.assertNotNull("没有获取到数据", pageResult.getRows());
}
Also used : PmphGroupFileVO(com.bc.pmpheep.back.vo.PmphGroupFileVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

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