diff --git a/shared/domain/backEndField/params.ts b/shared/domain/backEndField/params.ts index 52054407b..bb3caca9b 100644 --- a/shared/domain/backEndField/params.ts +++ b/shared/domain/backEndField/params.ts @@ -236,6 +236,7 @@ export class CreateGiftCode { generateType: GIFT_GENERATE_TYPE; // 生成类型 channel: string[] = ['all']; code: string = ''; + type: number = 0; // 类型 constructor(obj: any) { this.name = obj.name; @@ -247,6 +248,7 @@ export class CreateGiftCode { this.generateType = obj.generateType; this.channel = obj.channel; this.code = obj.code; + this.type = obj.type; } checkParams() { @@ -255,6 +257,7 @@ export class CreateGiftCode { for(let { id, count } of this.goods) { if(!isNumber(id) || !isNumber(count)) return false; } + if(this.type != 0 && this.type != 1 && this.type != 2) return false; if(!isTimestamp(this.beginTime) || !isTimestamp(this.endTime)) return false; if(!isNumber(this.codeLen) || this.codeLen <= 0) return false;