礼包码:更新指定礼包码

This commit is contained in:
luying
2021-12-27 20:37:19 +08:00
parent 8478b8850c
commit 3824333687
3 changed files with 7 additions and 1 deletions

View File

@@ -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;
}
}