Search in sources :

Example 66 with PageParameter

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

the class PmphGroupMemberServiceTest method testListGroupMemberManagerVOs.

@Test
public void testListGroupMemberManagerVOs() {
    pmphGroupMemberService.addPmphGroupMember(pmphGroupMember);
    PageParameter pageParameter = new PageParameter<>(1, 20);
    PmphGroupMemberManagerVO pmphGroupMemberManagerVO = new PmphGroupMemberManagerVO();
    pmphGroupMemberManagerVO.setName(null);
    pmphGroupMemberManagerVO.setGroupId(pmphGroupMember.getGroupId());
    pageParameter.setParameter(pmphGroupMemberManagerVO);
    Assert.assertNotNull("获取数据失败", pmphGroupMemberService.listGroupMemberManagerVOs(pageParameter));
}
Also used : PmphGroupMemberManagerVO(com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 67 with PageParameter

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

the class PmphGroupMessageServiceTest method testListPmphGroupMessage.

@Test
public void testListPmphGroupMessage() {
    pmphGroupMessageService.addPmphGroupMessage(pmphGroupMessage);
    PageParameter<PmphGroupMessageVO> pageParameter = new PageParameter<>(1, 20);
    PmphGroupMessageVO pmphGroupMessageVO = new PmphGroupMessageVO();
    pmphGroupMessageVO.setGmtCreate(DateUtil.getCurrentTime());
    pmphGroupMessageVO.setGroupId(pmphGroupMessage.getGroupId());
    pageParameter.setParameter(pmphGroupMessageVO);
    Assert.assertNotNull("获取数据失败", pmphGroupMessageService.listPmphGroupMessage(pageParameter));
}
Also used : PmphGroupMessageVO(com.bc.pmpheep.back.vo.PmphGroupMessageVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest)

Example 68 with PageParameter

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

the class SurveyQuestionServiceTest method listSurveyQuestion.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void listSurveyQuestion() {
    SurveyQuestion surveyQuestion = this.addSurveyQuestions();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    SurveyQuestionVO surveyQuestionVO = new SurveyQuestionVO();
    pageParameter.setParameter(surveyQuestionVO);
    pageParameter.setPageSize(10);
    pageResult = surveyQuestionService.listSurveyQuestion(pageParameter);
    Assert.assertNotNull("分页数据失败", pageResult);
}
Also used : SurveyQuestionVO(com.bc.pmpheep.back.vo.SurveyQuestionVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) SurveyQuestion(com.bc.pmpheep.back.po.SurveyQuestion) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 69 with PageParameter

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

the class SurveyServiceTest method listSurvey.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void listSurvey() {
    Survey survey = this.addSurveys();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    SurveyVO surveyVO = new SurveyVO();
    pageParameter.setParameter(surveyVO);
    pageParameter.setPageSize(10);
    pageResult = surveyService.listSurvey(pageParameter);
    Assert.assertNotNull("分页数据失败", pageResult);
}
Also used : Survey(com.bc.pmpheep.back.po.Survey) SurveyVO(com.bc.pmpheep.back.vo.SurveyVO) 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 70 with PageParameter

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

the class SurveyTemplateServiceTest method listSurveyTemplateList.

@SuppressWarnings({ "unused", "rawtypes", "unchecked" })
@Test
@Rollback(Const.ISROLLBACK)
public void listSurveyTemplateList() {
    SurveyTemplate surveyTemplate = this.addSurveyTemplates();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    SurveyTemplateListVO surveyTemplateListVO = new SurveyTemplateListVO();
    pageParameter.setParameter(surveyTemplateListVO);
    pageParameter.setPageSize(10);
    pageResult = surveyTemplateService.listSurveyTemplateList(pageParameter);
    Assert.assertNotNull("分页数据失败", pageResult);
}
Also used : SurveyTemplateListVO(com.bc.pmpheep.back.vo.SurveyTemplateListVO) SurveyTemplate(com.bc.pmpheep.back.po.SurveyTemplate) 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