|
@@ -1,10 +1,6 @@
|
|
|
import { Rule, RuleType } from '@midwayjs/validate';
|
|
|
import { ApiProperty } from '@midwayjs/swagger';
|
|
|
-import {
|
|
|
- FrameworkErrorEnum,
|
|
|
- SearchBase,
|
|
|
- ServiceError,
|
|
|
-} from 'free-midway-component';
|
|
|
+import { SearchBase } from 'free-midway-component';
|
|
|
import get = require('lodash/get');
|
|
|
const dealVO = (cla, data) => {
|
|
|
for (const key in cla) {
|
|
@@ -72,18 +68,10 @@ export class QVO_order extends FVO_order {
|
|
|
|
|
|
export class CDTO_order {
|
|
|
@ApiProperty({ description: '用户' })
|
|
|
- @Rule(
|
|
|
- RuleType['string']()
|
|
|
- .required()
|
|
|
- .error(new ServiceError('缺少用户', FrameworkErrorEnum.NEED_BODY))
|
|
|
- )
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
'user': string = undefined;
|
|
|
@ApiProperty({ description: '来源' })
|
|
|
- @Rule(
|
|
|
- RuleType['object']()
|
|
|
- .required()
|
|
|
- .error(new ServiceError('缺少来源', FrameworkErrorEnum.NEED_BODY))
|
|
|
- )
|
|
|
+ @Rule(RuleType['string']().empty(''))
|
|
|
'source': object = undefined;
|
|
|
@ApiProperty({ description: '来源名称' })
|
|
|
@Rule(RuleType['string']().empty(''))
|