Search in sources :

Example 61 with PageParameter

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

the class WriterPointLogController method listExchange.

@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询用户积分兑换记录列表")
@RequestMapping(value = "/listExchange", method = RequestMethod.GET)
public ResponseBean listExchange(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("userId") Long userId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
    PageParameter<WriterPointLogVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    WriterPointLogVO writerPointLogVO = new WriterPointLogVO();
    writerPointLogVO.setUserId(userId);
    writerPointLogVO.setStartTime(startTime);
    writerPointLogVO.setEndTime(endTime);
    pageParameter.setParameter(writerPointLogVO);
    return new ResponseBean(writerPointLogService.getListWriterPointLogExchange(pageParameter));
}
Also used : WriterPointLogVO(com.bc.pmpheep.back.vo.WriterPointLogVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 62 with PageParameter

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

the class WriterPointRuleController method exchangeList.

/**
 * 分页查询兑换规则列表
 * @param pageSize
 * @param pageNumber
 * @param ruleCode
 * @param ruleName
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询兑换规则列表")
@RequestMapping(value = "/exchangeList", method = RequestMethod.GET)
public ResponseBean exchangeList(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("ruleCode") String ruleCode, @RequestParam("ruleName") String ruleName) {
    PageParameter<WriterPointRuleVO> pageParameter = new PageParameter<WriterPointRuleVO>(pageNumber, pageSize);
    WriterPointRuleVO writerPointRuleVO = new WriterPointRuleVO();
    writerPointRuleVO.setRuleName(ruleName);
    writerPointRuleVO.setRuleCode(ruleCode);
    pageParameter.setParameter(writerPointRuleVO);
    return new ResponseBean(writerPointRuleService.getlistWriterPointRulePoint(pageParameter));
}
Also used : WriterPointRuleVO(com.bc.pmpheep.back.vo.WriterPointRuleVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 63 with PageParameter

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

the class OrgSeviceTest method testListOrg.

@Test
public void testListOrg() {
    OrgVO orgVO = new OrgVO();
    orgVO.getOrgName();
    PageResult<OrgVO> page = new PageResult<OrgVO>();
    PageParameter<OrgVO> pageParameter = new PageParameter<OrgVO>();
    pageParameter.setParameter(orgVO);
    page = orgService.listOrg(pageParameter);
}
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 64 with PageParameter

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

the class OrgSeviceTest method testGetSchoolAdminCheckList.

@Test
public void testGetSchoolAdminCheckList() {
    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("获取学校管理员审核列表失败", pageResult);
}
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 65 with PageParameter

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

the class OrgUserSeviceTest method testGetListOrgUserVO.

@Test
public void testGetListOrgUserVO() {
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    OrgAndOrgUserVO managerVO = new OrgAndOrgUserVO();
    managerVO.setUsername(null);
    managerVO.setRealname(null);
    managerVO.setOrgName(null);
    pageParameter.setParameter(managerVO);
    pageParameter.setStart(1);
    pageParameter.setPageSize(15);
    pageResult = orgUserService.getListOrgUser(pageParameter);
    Assert.assertNotNull("获取失败", pageResult);
}
Also used : OrgAndOrgUserVO(com.bc.pmpheep.back.vo.OrgAndOrgUserVO) 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