Search in sources :

Example 16 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class SensitiveController method list.

/**
 * 功能描述:分页查询敏感词
 *
 * @param word
 * @param pageSize
 * @param pageNumber
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询敏感词")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(String word, Integer pageSize, Integer pageNumber) {
    PageParameter<Sensitive> pageParameter = new PageParameter<>(pageNumber, pageSize);
    Sensitive sensitive = new Sensitive();
    sensitive.setWord(word);
    pageParameter.setParameter(sensitive);
    return new ResponseBean(sensitiveService.list(pageParameter));
}
Also used : Sensitive(com.bc.pmpheep.back.po.Sensitive) 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 17 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail 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 18 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail 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 19 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.

the class WeChatArticleController method get.

/**
 * @author mr 查询人卫健康微信公众号文章
 * @param guid
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询人卫健康微信公众号文章")
@RequestMapping(value = "/article/get", method = RequestMethod.POST)
public void get(@RequestParam("guid") String guid, HttpServletResponse response) {
    WechatArticle wechatArticle = wechatArticleService.get(guid);
    PrintWriter writer;
    try {
        writer = response.getWriter();
        writer.write(wechatArticle.getResult());
        writer.flush();
        writer.close();
    } catch (IOException e) {
        new CheckedServiceException(CheckedExceptionBusiness.WECHAT_ARTICLE, CheckedExceptionResult.ILLEGAL_PARAM, "非法的请求参数");
    }
}
Also used : CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) IOException(java.io.IOException) WechatArticle(com.bc.pmpheep.general.runnable.WechatArticle) PrintWriter(java.io.PrintWriter) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 20 with LogDetail

use of com.bc.pmpheep.annotation.LogDetail 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)

Aggregations

LogDetail (com.bc.pmpheep.annotation.LogDetail)83 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)82 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)71 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)61 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)43 IOException (java.io.IOException)28 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)24 OutputStream (java.io.OutputStream)18 BufferedOutputStream (java.io.BufferedOutputStream)17 Workbook (org.apache.poi.ss.usermodel.Workbook)15 UnsupportedEncodingException (java.io.UnsupportedEncodingException)14 ArrayList (java.util.ArrayList)7 Material (com.bc.pmpheep.back.po.Material)6 TopicLog (com.bc.pmpheep.back.po.TopicLog)5 HashMap (java.util.HashMap)4 Properties (java.util.Properties)4 BookVideo (com.bc.pmpheep.back.po.BookVideo)3 PmphGroupMember (com.bc.pmpheep.back.po.PmphGroupMember)3 Topic (com.bc.pmpheep.back.po.Topic)3 DeclarationResultSchoolVO (com.bc.pmpheep.back.vo.DeclarationResultSchoolVO)3