diff --git a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue
index 82d54afc1..e5cbaba60 100644
--- a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue
@@ -217,7 +217,7 @@
{
this.form = response.data;
if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
+ this.tableData1 = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
}
-
this.open = true;
this.title = "修改消费有礼活动";
});
@@ -1173,10 +1176,14 @@ export default {
},
/** 提交按钮 */
submitForm() {
- if (!this.form.tableDatas || this.form.tableDatas.length==0){
- this.form.tableDatas = []
- }
- this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
+ // if (!this.form.tableDatas || this.form.tableDatas.length==0){
+ // this.form.tableDatas = []
+ // }
+ // if (this.tableDatas && this.tableDatas.length>0 || this.form.shiwudata && this.form.shiwudata.length>0 )
+ // this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
+
+ // if (this.tableDatas && this.tableDatas.length>0 || this.form.shiwudata && this.form.shiwudata.length>0 )
+ this.form.activeConsumptionChildList = this.tableData1.concat(this.tableDatas);
console.log(this.form.activeConsumptionChildList)
this.$refs["form"].validate(valid => {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
index 0c1509303..9845b8ea9 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
@@ -125,6 +125,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl activeConsumptionChildList1 = activeConsumptionDTO.getActiveConsumptionChildList();
if (CollectionUtils.isNotEmpty(activeConsumptionChildList1)){
activeConsumptionChildList1.stream().map(s ->{
- s.setActiveConsumptionId(activeConsumption.getId());
+ if (ObjectUtil.isNotEmpty(s)) s.setActiveConsumptionId(activeConsumption.getId());
return s;
}).collect(Collectors.toList());
- update = activeConsumptionChildService.saveBatch(activeConsumptionChildList1);
+ if (ObjectUtil.isNotEmpty(activeConsumptionChildList1))
+ update = activeConsumptionChildService.saveBatch(activeConsumptionChildList1);
}
return update;
}