礼包码:更新指定礼包码
This commit is contained in:
@@ -168,6 +168,7 @@ export class CreateGiftCode {
|
||||
codeLen: number; // 礼包码位数
|
||||
remark: string = ''; // 备注
|
||||
generateType: GIFT_GENERATE_TYPE; // 生成类型
|
||||
code: string = '';
|
||||
|
||||
constructor(obj: any) {
|
||||
this.name = obj.name;
|
||||
@@ -177,6 +178,7 @@ export class CreateGiftCode {
|
||||
this.codeLen = obj.codeLen;
|
||||
this.remark = obj.remark;
|
||||
this.generateType = obj.generateType;
|
||||
this.code = obj.code;
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
@@ -191,6 +193,7 @@ export class CreateGiftCode {
|
||||
if(this.generateType != GIFT_GENERATE_TYPE.ONE_TO_MANY && this.generateType != GIFT_GENERATE_TYPE.ONE_TO_ONE) {
|
||||
return false
|
||||
}
|
||||
if(this.code != undefined && !isString(this.code)) return false
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user