Search in sources :

Example 6 with PageParameter

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

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

the class SensitiveServiceTest method listTest.

@Test
public void listTest() {
    Sensitive sen = sensitiveService.add(sensitive);
    PageParameter<Sensitive> pageParameter = new PageParameter<>(1, 5);
    Sensitive sensitive = new Sensitive();
    pageParameter.setParameter(sensitive);
    PageResult<Sensitive> pageResult = sensitiveService.list(pageParameter);
    Assert.assertNotNull("获取失败", pageResult.getRows());
}
Also used : Sensitive(com.bc.pmpheep.back.po.Sensitive) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 8 with PageParameter

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

Example 9 with PageParameter

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

the class UserMessageServiceTest method testListMyMessageOfIcon.

@Test
@Rollback(Const.ISROLLBACK)
public void testListMyMessageOfIcon() {
    MyMessageVO myMessageVO = new MyMessageVO();
    myMessageVO.setUserId(1L);
    myMessageVO.setUserType(1);
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    pageParameter.setParameter(myMessageVO);
    pageResult = userMessageService.listMyMessageOfIcon(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)

Example 10 with PageParameter

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

the class WriterPointRuleServiceTest method getlistWriterPointRulePoint.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void getlistWriterPointRulePoint() {
    WriterPointRule writerPointRule = this.addWriterPointRulePoint();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    WriterPointRuleVO writerPointRuleVO = new WriterPointRuleVO();
    pageParameter.setParameter(writerPointRuleVO);
    pageParameter.setPageSize(10);
    pageResult = writerPointRuleService.getlistWriterPointRulePoint(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)

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