Search in sources :

Example 6 with MyMessageVO

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

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

Aggregations

MyMessageVO (com.bc.pmpheep.back.vo.MyMessageVO)7 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)4 PageResult (com.bc.pmpheep.back.plugin.PageResult)4 PmphUser (com.bc.pmpheep.back.po.PmphUser)3 WriterUser (com.bc.pmpheep.back.po.WriterUser)3 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)3 LogDetail (com.bc.pmpheep.annotation.LogDetail)2 UserMessage (com.bc.pmpheep.back.po.UserMessage)2 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)2 Message (com.bc.pmpheep.general.po.Message)2 BaseTest (com.bc.pmpheep.test.BaseTest)2 WebScocketMessage (com.bc.pmpheep.websocket.WebScocketMessage)2 Test (org.junit.Test)2 Rollback (org.springframework.test.annotation.Rollback)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2 MessageAttachment (com.bc.pmpheep.back.po.MessageAttachment)1