Search in sources :

Example 11 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean 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 12 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean 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 13 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean 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 14 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class GroupController method groupMember.

/**
 * 功能描述:添加小组成员
 *
 * @param pmphGroupMembers
 *            需要小组Id 成员Id 是否作家用户
 * @return 是否成功
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "添加小组成员")
@RequestMapping(value = "/add/groupMember", method = RequestMethod.POST)
public ResponseBean groupMember(Long groupId, String pmphGroupMembers, HttpServletRequest request) {
    Gson gson = new Gson();
    Type type = new TypeToken<ArrayList<PmphGroupMember>>() {
    }.getType();
    List<PmphGroupMember> list = gson.fromJson(pmphGroupMembers, type);
    String sessionId = CookiesUtil.getSessionId(request);
    return new ResponseBean(pmphGroupMemberService.addPmphGroupMembers(groupId, list));
}
Also used : Type(java.lang.reflect.Type) PmphGroupMember(com.bc.pmpheep.back.po.PmphGroupMember) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) 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 15 with ResponseBean

use of com.bc.pmpheep.controller.bean.ResponseBean in project pmph by BCSquad.

the class GroupController method identity.

/**
 * 功能描述:批量修改小组成员权限
 *
 * @param listPar
 *            成员id
 * @return 是否成功
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "批量修改小组成员权限")
@RequestMapping(value = "/update/identity", method = RequestMethod.PUT)
public ResponseBean identity(Long groupId, String pmphGroupMembers, HttpServletRequest request) {
    Gson gson = new Gson();
    Type type = new TypeToken<ArrayList<PmphGroupMember>>() {
    }.getType();
    List<PmphGroupMember> list = gson.fromJson(pmphGroupMembers, type);
    String sessionId = CookiesUtil.getSessionId(request);
    return new ResponseBean(pmphGroupMemberService.updateMemberIdentity(groupId, list, sessionId));
}
Also used : Type(java.lang.reflect.Type) PmphGroupMember(com.bc.pmpheep.back.po.PmphGroupMember) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) 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

ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)67 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)67 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)65 LogDetail (com.bc.pmpheep.annotation.LogDetail)61 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)37 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)11 IOException (java.io.IOException)11 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 TopicLog (com.bc.pmpheep.back.po.TopicLog)5 DesRun (com.bc.pmpheep.back.util.DesRun)4 Properties (java.util.Properties)4 BookVideo (com.bc.pmpheep.back.po.BookVideo)3 PmphGroupMember (com.bc.pmpheep.back.po.PmphGroupMember)3 PmphUser (com.bc.pmpheep.back.po.PmphUser)3 Topic (com.bc.pmpheep.back.po.Topic)3 PmphGroup (com.bc.pmpheep.back.po.PmphGroup)2 PmphRole (com.bc.pmpheep.back.po.PmphRole)2 WriterUser (com.bc.pmpheep.back.po.WriterUser)2 DeclarationResultSchoolVO (com.bc.pmpheep.back.vo.DeclarationResultSchoolVO)2