diff --git a/shared/domain/backEndField/params.ts b/shared/domain/backEndField/params.ts index 5adc178aa..21d792bb0 100644 --- a/shared/domain/backEndField/params.ts +++ b/shared/domain/backEndField/params.ts @@ -383,18 +383,18 @@ export class UpdateActivityParam { this.activityIds.push(parseInt(aidStr)); }); } - if(obj.groupId)this.groupId = obj.groupId; - if(obj.beginTime) this.beginTime = new Date(obj.beginTime); - if(obj.endTime) this.endTime = new Date(obj.endTime); - if(obj.type) this.type = obj.type; - if(obj.data) this.data = obj.data; - if(obj.timeType) this.timeType = obj.timeType; - if(obj.days) this.days = obj.days; - if(obj.delayDay) this.delayDay = obj.delayDay; - if(obj.interval) this.interval = obj.interval; - if(obj.name) this.name = obj.name; - if(obj.hideDayByServer) this.hideDayByServer = obj.hideDayByServer; - if(obj.effectDay) this.effectDay = obj.effectDay; + if(obj.groupId != undefined)this.groupId = obj.groupId; + if(obj.beginTime != undefined) this.beginTime = new Date(obj.beginTime); + if(obj.endTime != undefined) this.endTime = new Date(obj.endTime); + if(obj.type != undefined) this.type = obj.type; + if(obj.data != undefined) this.data = obj.data; + if(obj.timeType != undefined) this.timeType = obj.timeType; + if(obj.days != undefined) this.days = obj.days; + this.delayDay = obj.delayDay||0; + this.interval = obj.interval||0; + this.effectDay = obj.effectDay||0; + this.hideDayByServer = obj.hideDayByServer||0; + if(obj.name != undefined) this.name = obj.name; if(obj.multiTime && obj.multiTime.length) { this.multiTime = []; for(let { id, beginTime, endTime } of obj.multiTime) {