Search in sources :

Example 61 with ResponseBean

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

the class PmphUserController method pmphUser.

/**
 * 功能描述:分页查询社内用户
 *
 * @param page
 *            分页条件
 * @param pmphUserManagerVO
 *            查询条件
 * @return 分好页的结果集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询社内用户")
@RequestMapping(value = "/list/pmphUser", method = RequestMethod.GET)
public ResponseBean pmphUser(Integer pageSize, Integer pageNumber, String name, @RequestParam("path") String path, Long departmentId, Long groupId) {
    PageParameter pageParameter = new PageParameter<>();
    PmphUserManagerVO pmphUserManagerVO = new PmphUserManagerVO();
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        pmphUserManagerVO.setName(name.replaceAll(" ", ""));
    }
    pmphUserManagerVO.setPath(path);
    pmphUserManagerVO.setDepartmentId(departmentId);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(pmphUserManagerVO);
    return new ResponseBean(userService.getListPmphUser(pageParameter, groupId));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PmphUserManagerVO(com.bc.pmpheep.back.vo.PmphUserManagerVO) 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 62 with ResponseBean

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

the class WriterLoginController method logout.

/**
 * <pre>
 * 功能描述:退出
 * 使用示范:
 *
 * &#64;param model
 * &#64;return
 * </pre>
 */
@ResponseBody
@RequestMapping(value = "/logout", method = RequestMethod.GET)
public ResponseBean logout(HttpServletRequest request, @RequestParam("loginType") Short loginType) {
    String sessionId = CookiesUtil.getSessionId(request);
    HttpSession session = SessionContext.getSession(new DesRun(sessionId).depsw);
    if (ObjectUtil.notNull(session)) {
        if (Const.LOGIN_TYPE_WRITER == loginType) {
            // 清除User信息
            session.removeAttribute(Const.SESSION_WRITER_USER);
            // 清除token
            session.removeAttribute(Const.SEESION_WRITER_USER_TOKEN);
        }
    }
    return new ResponseBean();
}
Also used : HttpSession(javax.servlet.http.HttpSession) DesRun(com.bc.pmpheep.back.util.DesRun) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 63 with ResponseBean

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

the class WriterUserController method writerUser.

/**
 * 功能描述:分页查询作家用户
 *
 * @param page
 *            分页条件
 * @param writerUserManagerVO
 *            查询条件
 * @return 分好页的结果集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询作家用户")
@RequestMapping(value = "/list/writerUser", method = RequestMethod.GET)
public ResponseBean writerUser(Long groupId, @RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("name") String name, @RequestParam("rank") Integer rank, @RequestParam("orgName") String orgName) {
    PageParameter pageParameter = new PageParameter<>();
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    if (StringUtil.notEmpty(name)) {
        // 去除空格
        writerUserManagerVO.setName(name.replaceAll(" ", ""));
    }
    if (StringUtil.notEmpty(orgName)) {
        writerUserManagerVO.setOrgName(orgName.replaceAll(" ", ""));
    }
    writerUserManagerVO.setRank(rank);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(writerUserManagerVO);
    return new ResponseBean(writerUserService.getListWriterUser(pageParameter, groupId));
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) 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 64 with ResponseBean

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

the class WriterUserController method groupMember.

/**
 * 功能描述: 分页查询小组成员添加界面作家用户信息
 *
 * @param bookname
 *            书籍名称
 * @param chosenPosition
 *            申报职位
 * @param name
 *            姓名/帐号
 * @return 分好页的数据集
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = " 分页查询小组成员添加界面作家用户信息")
@RequestMapping(value = "/list/groupMember", method = RequestMethod.GET)
public ResponseBean groupMember(Integer pageSize, Integer pageNumber, String bookname, Integer chosenPosition, String name) {
    PageParameter<GroupMemberWriterUserVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    GroupMemberWriterUserVO groupMemberWriterUserVO = new GroupMemberWriterUserVO();
    groupMemberWriterUserVO.setBookname(bookname);
    groupMemberWriterUserVO.setChosenPosition(chosenPosition);
    groupMemberWriterUserVO.setName(name);
    pageParameter.setParameter(groupMemberWriterUserVO);
    return new ResponseBean(writerUserService.listGroupMemberWriterUsers(pageParameter));
}
Also used : GroupMemberWriterUserVO(com.bc.pmpheep.back.vo.GroupMemberWriterUserVO) 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 65 with ResponseBean

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

the class WriterPointController method list.

/**
 * 用户积分分页查询
 * @param pageSize
 * @param pageNumber
 * @param username
 * @param realname
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询用户积分列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("username") String username, @RequestParam("realname") String realname) {
    PageParameter<WriterPointVO> pageParameter = new PageParameter<WriterPointVO>(pageNumber, pageSize);
    WriterPointVO writerPoint = new WriterPointVO();
    writerPoint.setUsername(username);
    writerPoint.setRealname(realname);
    pageParameter.setParameter(writerPoint);
    return new ResponseBean(writerPointService.getListWriterPoint(pageParameter));
}
Also used : WriterPointVO(com.bc.pmpheep.back.vo.WriterPointVO) 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

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