From a5334a6632de39612ff8d8a11979e7fe625213ce Mon Sep 17 00:00:00 2001 From: luch1994 <1097650398@qq.com> Date: Tue, 16 Jan 2024 14:35:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/apps/surveyManage/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/apps/surveyManage/index.ts b/server/src/apps/surveyManage/index.ts index 7902af49..4ec3a54b 100644 --- a/server/src/apps/surveyManage/index.ts +++ b/server/src/apps/surveyManage/index.ts @@ -5,6 +5,7 @@ import { surveyHistoryService } from './service/surveyHistoryService'; import { HISTORY_TYPE } from '../../types/index'; import { getValidateValue } from './utils/index'; import * as Joi from 'joi'; +import { CommonError } from '../../types/index'; type FilterItem = { comparator?: string; @@ -115,14 +116,14 @@ export default class SurveyManage { try { filter = this.getFilter(JSON.parse(condition.filter)); } catch (error) { - console.log(error); + throw new CommonError('filter参数格式不正确'); } } if (condition.order) { try { order = this.getOrder(JSON.parse(condition.order)); } catch (error) { - console.log(error); + throw new CommonError('order参数格式不正确'); } } const userData = await userService.checkLogin({ req });