| | |
| | | return this.error(MobileCoreCode.GET_ROUTER_FAIL); |
| | | } |
| | | } |
| | | /** |
| | | * 执行移动端送来的表达式到数据库中执行,得到结果返回 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/excute-exp/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String excuteExp(HttpServletRequest request) { |
| | | FieldSetEntity fse = null; |
| | | Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if (bean != null) { |
| | | RequestParameterEntity reqp = (RequestParameterEntity) bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | try { |
| | | return result_OK_List(commonMVCService.excuteExp(fse.getString("exp"))); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | | return this.error(e); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return this.error(MobileCoreCode.GET_ROUTER_FAIL); |
| | | } |
| | | } |
| | | |
| | | } |