Search in sources :

Example 26 with LogDetail

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

Example 27 with LogDetail

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

the class PmphUserController method resources.

/**
 * <pre>
 * 功能描述:根据用户 id 跳转到用户权限的列表页面
 * 使用示范:
 *
 * @param userId
 * @param model
 * @return
 * </pre>
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询指定用户 id 所拥有的权限")
@RequestMapping(value = "/resources/{id}", method = RequestMethod.GET)
public ResponseBean resources(@PathVariable("id") Long userId) {
    Map<String, Object> result = new HashMap<String, Object>();
    List<PmphPermission> resourceList = userService.getListAllResource(userId);
    PmphUser user = userService.get(userId);
    result.put("resources", resourceList);
    result.put("user", user);
    return new ResponseBean(result);
}
Also used : HashMap(java.util.HashMap) PmphPermission(com.bc.pmpheep.back.po.PmphPermission) PmphUser(com.bc.pmpheep.back.po.PmphUser) 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 28 with LogDetail

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

the class WriterUserController method resources.

/**
 * <pre>
 * 功能描述:根据用户 id 跳转到用户权限的列表页面
 * 使用示范:
 *
 * &#64;param userId
 * &#64;param model
 * &#64;return
 * </pre>
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "跳转到用户权限的列表页面")
@RequestMapping(value = "/resources/{id}", method = RequestMethod.GET)
public ResponseBean resources(@PathVariable("id") Long userId) {
    Map<String, Object> result = new HashMap<String, Object>();
    List<WriterPermission> resourceList = writerUserService.getListAllResource(userId);
    WriterUser user = writerUserService.get(userId);
    result.put("resources", resourceList);
    result.put("user", user);
    return new ResponseBean(result);
}
Also used : WriterPermission(com.bc.pmpheep.back.po.WriterPermission) HashMap(java.util.HashMap) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) WriterUser(com.bc.pmpheep.back.po.WriterUser) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 29 with LogDetail

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

the class WriterPointLogController method list.

@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询用户积分获取记录列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("userId") Long userId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
    PageParameter<WriterPointLogVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    WriterPointLogVO writerPointLogVO = new WriterPointLogVO();
    writerPointLogVO.setUserId(userId);
    writerPointLogVO.setStartTime(startTime);
    writerPointLogVO.setEndTime(endTime);
    pageParameter.setParameter(writerPointLogVO);
    return new ResponseBean(writerPointLogService.getListWriterPointLog(pageParameter));
}
Also used : WriterPointLogVO(com.bc.pmpheep.back.vo.WriterPointLogVO) 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 30 with LogDetail

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

the class WriterPointRuleController method list.

/**
 * 分页查询积分规则列表
 * @param pageSize
 * @param pageNumber
 * @param ruleCode
 * @param ruleName
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询积分规则列表")
@RequestMapping(value = "/pointrule/list", method = RequestMethod.GET)
public ResponseBean list(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("ruleCode") String ruleCode, @RequestParam("ruleName") String ruleName) {
    PageParameter<WriterPointRuleVO> pageParameter = new PageParameter<WriterPointRuleVO>(pageNumber, pageSize);
    WriterPointRuleVO writerPointRuleVO = new WriterPointRuleVO();
    writerPointRuleVO.setRuleName(ruleName);
    writerPointRuleVO.setRuleCode(ruleCode);
    pageParameter.setParameter(writerPointRuleVO);
    return new ResponseBean(writerPointRuleService.getListWriterPointRule(pageParameter));
}
Also used : WriterPointRuleVO(com.bc.pmpheep.back.vo.WriterPointRuleVO) 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

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