Search in sources :

Example 1 with WriterPointRuleVO

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

Example 2 with WriterPointRuleVO

use of com.bc.pmpheep.back.vo.WriterPointRuleVO in project pmph by BCSquad.

the class WriterPointRuleServiceTest method updateWriterPointRule.

@Test
@Rollback(Const.ISROLLBACK)
public void updateWriterPointRule() {
    writerPointRuleService.addWriterPointRule(writerPointRule);
    writerPointRule.setPoint(2);
    WriterPointRuleVO writerPointRule1 = new WriterPointRuleVO(writerPointRule.getId(), "登录规则", "login", 1, false, null, 0, null, false);
    Assert.assertTrue("更新失败", writerPointRuleService.updateWriterPointRule(writerPointRule1) > 0);
}
Also used : WriterPointRuleVO(com.bc.pmpheep.back.vo.WriterPointRuleVO) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 3 with WriterPointRuleVO

use of com.bc.pmpheep.back.vo.WriterPointRuleVO in project pmph by BCSquad.

the class WriterPointRuleController method list.

/**
 * 分页查询积分规则列表
 * @param pageSize
 * @param pageNumber
 * @param ruleCode
 * @param ruleName
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询积分规则列表")
@RequestMapping(value = "/pointrule/list", method = RequestMethod.GET)
public ResponseBean list(@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.getListWriterPointRule(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 4 with WriterPointRuleVO

use of com.bc.pmpheep.back.vo.WriterPointRuleVO 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 5 with WriterPointRuleVO

use of com.bc.pmpheep.back.vo.WriterPointRuleVO in project pmph by BCSquad.

the class WriterPointRuleServiceTest method getListWriterPointRule.

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

WriterPointRuleVO (com.bc.pmpheep.back.vo.WriterPointRuleVO)5 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)4 BaseTest (com.bc.pmpheep.test.BaseTest)3 Test (org.junit.Test)3 Rollback (org.springframework.test.annotation.Rollback)3 LogDetail (com.bc.pmpheep.annotation.LogDetail)2 PageResult (com.bc.pmpheep.back.plugin.PageResult)2 WriterPointRule (com.bc.pmpheep.back.po.WriterPointRule)2 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2