Search in sources :

Example 21 with PageParameter

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

the class UserMessageController method myMessageIcon.

/**
 * 功能描述:获取前几条未读消息
 *
 * @param pageSize 前几条消息
 * @param pageNumber 当前页码
 * @param userId 用户id
 * @param userType 用户类型
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取前几条未读消息")
@RequestMapping(value = "/list/myMessageIcon", method = RequestMethod.GET)
public ResponseBean myMessageIcon(Integer pageSize, Integer pageNumber, Long userId, Integer userType) {
    PageParameter<MyMessageVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    MyMessageVO myMessageVO = new MyMessageVO();
    myMessageVO.setUserId(userId);
    myMessageVO.setUserType(userType);
    myMessageVO.setIsRead(false);
    pageParameter.setParameter(myMessageVO);
    return new ResponseBean(userMessageService.listMyMessageOfIcon(pageParameter));
}
Also used : MyMessageVO(com.bc.pmpheep.back.vo.MyMessageVO) 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 22 with PageParameter

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

the class UserMessageController method myMessage.

/**
 * 功能描述:获取我的消息列表
 *
 * @param pageSize 当页条数
 * @param pageNumber 当前页码
 * @param title 标题
 * @param isRead 是否已读
 * @param userId 用户id
 * @param userType 用户类型
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询我的消息列表")
@RequestMapping(value = "/list/myMessage", method = RequestMethod.GET)
public ResponseBean myMessage(Integer pageSize, Integer pageNumber, String title, Boolean isRead, Long userId, Integer userType) {
    PageParameter<MyMessageVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    MyMessageVO myMessageVO = new MyMessageVO();
    myMessageVO.setUserId(userId);
    myMessageVO.setUserType(userType);
    myMessageVO.setTitle(title);
    myMessageVO.setIsRead(isRead);
    pageParameter.setParameter(myMessageVO);
    return new ResponseBean(userMessageService.listMyMessage(pageParameter));
}
Also used : MyMessageVO(com.bc.pmpheep.back.vo.MyMessageVO) 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 23 with PageParameter

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

the class GroupController method message.

/**
 * 功能描述:进入小组的时候获取历史消息
 *
 * @param pageSize
 *            获取的条数
 * @param pageNumber
 *            当前第几页
 * @param groupId
 *            小组id
 * @param nowTime
 *            进入小组的时间节点
 * @return 消息结果集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取历史消息")
@RequestMapping(value = "/list/message", method = RequestMethod.GET)
public ResponseBean message(Integer pageSize, Integer pageNumber, Long groupId, Long baseTime) {
    PageParameter<PmphGroupMessageVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    PmphGroupMessageVO pmphGroupMessageVO = new PmphGroupMessageVO();
    pmphGroupMessageVO.setGmtCreate(new Timestamp(baseTime));
    pmphGroupMessageVO.setGroupId(groupId);
    pageParameter.setParameter(pmphGroupMessageVO);
    return new ResponseBean(pmphGroupMessageService.listPmphGroupMessage(pageParameter));
}
Also used : PmphGroupMessageVO(com.bc.pmpheep.back.vo.PmphGroupMessageVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) Timestamp(java.sql.Timestamp) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 24 with PageParameter

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

the class MaterialController method list.

/**
 * 功能描述:初始化/条件查询教材列表
 *
 * @param request
 * @param pageSize
 *            当前页条数
 * @param pageNumber
 *            当前页数
 * @param isMy
 *            是否我的
 * @param state
 *            当前状态
 * @param materialName
 *            教材名称
 * @param contactUserName
 *            联系人名称
 * @return
 */
@ResponseBody
@LogDetail(businessType = Business_Type, logRemark = "查询教材公告列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(HttpServletRequest request, Integer pageSize, Integer pageNumber, Boolean isMy, String state, String materialName, String contactUserName) {
    String sessionId = CookiesUtil.getSessionId(request);
    PageParameter<MaterialListVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    MaterialListVO materialListVO = new MaterialListVO();
    materialListVO.setIsMy(isMy);
    materialListVO.setState(state);
    materialListVO.setContactUserName(contactUserName);
    materialListVO.setMaterialName(materialName);
    pageParameter.setParameter(materialListVO);
    return new ResponseBean(materialService.listMaterials(pageParameter, sessionId));
}
Also used : MaterialListVO(com.bc.pmpheep.back.vo.MaterialListVO) 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 25 with PageParameter

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

the class OrgUserController method allOrgUser.

/**
 * Description:分页查询机构用户
 *
 * @author:lyc
 * @date:2017年9月26日下午5:43:59
 * @Param: OrgUserManagerVO
 * @Return:分页数据集
 */
@RequestMapping(value = "/list/allOrgUser", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询机构用户")
@ResponseBody
public ResponseBean allOrgUser(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("name") String name, @RequestParam("orgName") String orgName) {
    PageParameter pageParameter = new PageParameter<>();
    OrgAndOrgUserVO orgAndOrgUserVO = new OrgAndOrgUserVO();
    if (StringUtil.notEmpty(orgName)) {
        orgAndOrgUserVO.setOrgName(StringUtil.toAllCheck(orgName));
    }
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        orgAndOrgUserVO.setName(StringUtil.toAllCheck(name));
    }
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(orgAndOrgUserVO);
    return new ResponseBean(orgUserService.getListAllOrgUser(pageParameter));
}
Also used : OrgAndOrgUserVO(com.bc.pmpheep.back.vo.OrgAndOrgUserVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) LogDetail(com.bc.pmpheep.annotation.LogDetail) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

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