/** * 处理申请 * * @param param 参数 * @return JsonMessage */ @ResponseBody @RequestMapping(value = "/handApply") public JsonMessage handApply(ClientParameter param) throws Exception { Map<String, String> map = ParameterUtils.getMapFromParameter(param); SecurityCert securityCert = new SecurityCert(); BeanUtils.populate(securityCert, map); securityCert.setUserCate(MapUtils.getShort(map, "userCate")); securityCert.setApplyType(MapUtils.getShort(map, "applyType")); securityCert.setActState(MapUtils.getShort(map, "actState")); String actionIp = MapUtils.getString(map, "actionIp"); securityCert.setActionIp(IPUtil.formatStrIpToInt(actionIp)); securityCertService.updateActState(securityCert); return super.getJsonMessage(CommonConst.SUCCESS); }
/** * 列表(分页) * * @param param 参数 * @return JsonMessage */ @ResponseBody @RequestMapping(value = "/search", method = RequestMethod.POST) public JsonMessage search(ClientParameter param) throws Exception { Map<String, String> map = ParameterUtils.getMapFromParameter(param); Pagination page = new Pagination( MapUtils.getIntValue(map, "currentPage"), MapUtils.getIntValue(map, "pageSize")); SecurityCert searchBean = new SecurityCert(); searchBean.setUserCate(MapUtils.getShort(map, "userCate")); searchBean.setApplyType(MapUtils.getShort(map, "applyType")); searchBean.setActState(MapUtils.getShort(map, "actState")); PaginateResult<SecurityCert> result = securityCertService.searchByClient(searchBean, page); return super.getJsonMessage(CommonConst.SUCCESS, result); }