Search in sources :

Example 6 with ResponseBean

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

the class DecPositionController method schoolResultsPreset.

/**
 * Description:加载学校申报情况统计结果(按申报数排序)
 *
 * @author:lyc
 * @date:2017年12月5日下午2:47:07
 * @param
 * @return ResponseBean
 */
@ResponseBody
@RequestMapping(value = "/list/schoolResultsPreset", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "加载学校申报情况统计结果(按申报数排序)")
public ResponseBean schoolResultsPreset(Integer pageSize, Integer pageNumber, Long materialId, String schoolName) {
    PageParameter<DeclarationSituationSchoolResultVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
    DeclarationSituationSchoolResultVO declarationSituationSchoolResultVO = new DeclarationSituationSchoolResultVO();
    declarationSituationSchoolResultVO.setMaterialId(materialId);
    declarationSituationSchoolResultVO.setSchoolName(schoolName);
    pageParameter.setParameter(declarationSituationSchoolResultVO);
    return new ResponseBean(decPositionService.listPresetDeclarationSituationSchoolResultVOs(pageParameter));
}
Also used : PageParameter(com.bc.pmpheep.back.plugin.PageParameter) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) DeclarationSituationSchoolResultVO(com.bc.pmpheep.back.vo.DeclarationSituationSchoolResultVO) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with ResponseBean

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

the class PositionChooseController method editorList.

/**
 * 分页查询该书籍下的已选主编和编委
 *
 * @param textbookId
 * @param pageSize
 * @param pageNumber
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "查询该书籍下的已选主编和编委")
@RequestMapping(value = "/editorList", method = RequestMethod.GET)
public ResponseBean editorList(@RequestParam("textbookId") Long textbookId, @RequestParam("pageSize") Integer pageSize, @RequestParam(name = "pageNumber", defaultValue = "1") Integer pageNumber) {
    PageParameter<TextbookDecVO> pageParameter = new PageParameter<>();
    TextbookDecVO textbookDecVO = new TextbookDecVO();
    textbookDecVO.setTextBookId(textbookId);
    pageParameter.setPageNumber(pageNumber);
    pageParameter.setPageSize(pageSize);
    pageParameter.setParameter(textbookDecVO);
    return new ResponseBean(textbookService.listEditorSelection(pageParameter));
}
Also used : TextbookDecVO(com.bc.pmpheep.back.vo.TextbookDecVO) 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 8 with ResponseBean

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

the class PropertiesImplController method mall.

/**
 * 功能描述:获取商城的接口信息
 *
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取商城接口信息")
@RequestMapping(value = "/mall", method = RequestMethod.GET)
public ResponseBean mall() {
    ResponseBean<Map> responseBean = new ResponseBean<>();
    Map<String, String> map = new HashMap<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("pmphapi-config.properties");
    responseBean.setCode(1);
    try {
        pp.load(fis);
        map.put("uri", pp.getProperty("uri"));
        map.put("appKey", pp.getProperty("app_key"));
        map.put("appSecret", pp.getProperty("app_secret"));
        map.put("sessionKey", pp.getProperty("session_key"));
    } catch (IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    responseBean.setData(map);
    return responseBean;
}
Also used : HashMap(java.util.HashMap) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) Properties(java.util.Properties) HashMap(java.util.HashMap) Map(java.util.Map) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 9 with ResponseBean

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

the class PropertiesImplController method erp.

/**
 * 功能描述:获取erp接口详情
 *
 * @return
 */
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "获取erp接口信息")
@RequestMapping(value = "/erp", method = RequestMethod.GET)
public ResponseBean erp() {
    ResponseBean<Map> responseBean = new ResponseBean<>();
    Map<String, String> map = new HashMap<>();
    pp = new Properties();
    fis = PropertiesImplController.class.getClassLoader().getResourceAsStream("mssql-config.properties");
    responseBean.setCode(1);
    try {
        pp.load(fis);
        map.put("uri", pp.getProperty("url").replace("jdbc:sqlserver:", ""));
        map.put("username", pp.getProperty("username"));
        map.put("driver", pp.getProperty("driver"));
        map.put("password", pp.getProperty("password"));
    } catch (IOException e) {
        responseBean.setCode(0);
        responseBean.setMsg(e.getMessage());
    } finally {
        try {
            fis.close();
        } catch (IOException e) {
            responseBean.setCode(0);
            responseBean.setMsg(e.getMessage());
        }
    }
    responseBean.setData(map);
    return responseBean;
}
Also used : HashMap(java.util.HashMap) ResponseBean(com.bc.pmpheep.controller.bean.ResponseBean) IOException(java.io.IOException) Properties(java.util.Properties) HashMap(java.util.HashMap) Map(java.util.Map) LogDetail(com.bc.pmpheep.annotation.LogDetail) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 10 with ResponseBean

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

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