Search in sources :

Example 1 with PageResult

use of com.bc.pmpheep.back.plugin.PageResult 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 2 with PageResult

use of com.bc.pmpheep.back.plugin.PageResult 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 3 with PageResult

use of com.bc.pmpheep.back.plugin.PageResult 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)

Example 4 with PageResult

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

the class PmphUserServiceTest method testTetListPmphUserVO.

@Test
public void testTetListPmphUserVO() {
    PageResult pageResult = new PageResult<>();
    PageParameter pageParameter = new PageParameter<>();
    PmphUserManagerVO managerVO = new PmphUserManagerVO();
    managerVO.setUsername(null);
    managerVO.setRealname(null);
    managerVO.setPath("0-92-174");
    managerVO.setDepartmentId(176L);
    pageParameter.setParameter(managerVO);
    pageParameter.setPageNumber(1);
    pageParameter.setPageSize(30);
    pageResult = userService.getListPmphUser(pageParameter, null);
    Assert.assertNotNull("查找失败", pageResult);
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PmphUserManagerVO(com.bc.pmpheep.back.vo.PmphUserManagerVO) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 5 with PageResult

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

the class UserMessageServiceTest method testListMyMessage.

@Test
@Rollback(Const.ISROLLBACK)
public void testListMyMessage() {
    MyMessageVO myMessageVO = new MyMessageVO();
    myMessageVO.setUserId(1L);
    myMessageVO.setUserType(1);
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    pageParameter.setParameter(myMessageVO);
    pageResult = userMessageService.listMyMessage(pageParameter);
    Assert.assertNotNull("查询成功了", pageResult);
}
Also used : MyMessageVO(com.bc.pmpheep.back.vo.MyMessageVO) 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

PageResult (com.bc.pmpheep.back.plugin.PageResult)57 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)33 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)24 BaseTest (com.bc.pmpheep.test.BaseTest)20 Test (org.junit.Test)20 PmphUser (com.bc.pmpheep.back.po.PmphUser)17 ArrayList (java.util.ArrayList)13 Rollback (org.springframework.test.annotation.Rollback)12 HashMap (java.util.HashMap)8 CmsContentVO (com.bc.pmpheep.back.vo.CmsContentVO)4 MyMessageVO (com.bc.pmpheep.back.vo.MyMessageVO)4 OrgVO (com.bc.pmpheep.back.vo.OrgVO)4 WriterUserManagerVO (com.bc.pmpheep.back.vo.WriterUserManagerVO)4 PmphGroup (com.bc.pmpheep.back.po.PmphGroup)3 PmphRole (com.bc.pmpheep.back.po.PmphRole)3 SysOperation (com.bc.pmpheep.back.po.SysOperation)3 WriterUser (com.bc.pmpheep.back.po.WriterUser)3 PmphUserManagerVO (com.bc.pmpheep.back.vo.PmphUserManagerVO)3 Material (com.bc.pmpheep.back.po.Material)2 PmphDepartment (com.bc.pmpheep.back.po.PmphDepartment)2