@@ -126,8 +126,8 @@ export default {
this.$emit('hideEditDialog')
},
initEditData() {
- this.addTreeListLabelForCasCard(this.allTreeList, 'child')
- this.parentOptions = this.allTreeList
+ this.parentOptions = [...this.allTreeList]
+ this.addTreeListLabelForCasCard(this.parentOptions, 'child')
if (this.isCreate !== 1) {
const { id } = this.prent
this.editPram.pid = id
@@ -146,7 +146,7 @@ export default {
addTreeListLabelForCasCard(arr, child) {
arr.forEach((o,i) => {
if (o.child && o.child.length) {
- o.disabled = true
+ // o.disabled = true
o.child.forEach((j) => {
j.disabled = true
})
diff --git a/admin/src/views/order/index.vue b/admin/src/views/order/index.vue
index 7ba09a90..372616a0 100644
--- a/admin/src/views/order/index.vue
+++ b/admin/src/views/order/index.vue
@@ -168,7 +168,7 @@
订单详情
订单记录
订单备注
- 拒绝退款
+ 拒绝退款
立即退款
删除订单
diff --git a/admin/src/views/order/orderDetail.vue b/admin/src/views/order/orderDetail.vue
index d1057037..83450d34 100644
--- a/admin/src/views/order/orderDetail.vue
+++ b/admin/src/views/order/orderDetail.vue
@@ -9,7 +9,7 @@
用户信息
用户昵称:{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}
-
绑定电话:{{orderDatalist.user.phone}}
+
绑定电话:{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}
{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}
diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/model/SystemConfig.java b/crmeb/src/main/java/com/zbkj/crmeb/system/model/SystemConfig.java
index 98a12fb3..293d5fe4 100644
--- a/crmeb/src/main/java/com/zbkj/crmeb/system/model/SystemConfig.java
+++ b/crmeb/src/main/java/com/zbkj/crmeb/system/model/SystemConfig.java
@@ -1,17 +1,17 @@
package com.zbkj.crmeb.system.model;
-import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
-import java.io.Serializable;
-import java.util.Date;
-
+import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+
/**
*
* 配置表
@@ -57,7 +57,7 @@ public class SystemConfig implements Serializable {
private String value;
@ApiModelProperty(value = "是否隐藏")
- private Boolean status;
+ private Boolean status = false;
@ApiModelProperty(value = "创建时间")
private Date createTime;
diff --git a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemConfigServiceImpl.java b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemConfigServiceImpl.java
index 6935a3a7..dc6bc360 100644
--- a/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemConfigServiceImpl.java
+++ b/crmeb/src/main/java/com/zbkj/crmeb/system/service/impl/SystemConfigServiceImpl.java
@@ -129,7 +129,9 @@ public class SystemConfigServiceImpl extends ServiceImpl systemConfigList = new ArrayList<>();
+ List systemConfigSaveList = new ArrayList<>();
+ List systemConfigUpdateList = new ArrayList<>();
+ List systemConfigDeleteList = new ArrayList<>();
//批量添加
for (SystemFormItemCheckRequest systemFormItemCheckRequest : systemFormCheckRequest.getFields()) {
@@ -141,29 +143,65 @@ public class SystemConfigServiceImpl extends ServiceImpl formDataList = selectByFormId(systemFormCheckRequest.getId());
- saveBatch(systemConfigList);
+ //添加或者更新数据
+ saveBatch(systemConfigSaveList);
+ saveOrUpdateBatch(systemConfigUpdateList);
- //删除之前隐藏的数据
- deleteStatusByFormId(systemFormCheckRequest.getId());
- List forAsyncPram = systemConfigList.stream().map(e -> {
- e.setStatus(true);
- return e;
- }).collect(Collectors.toList());
- async(forAsyncPram);
+ //所有需要修改的数据
+ systemConfigSaveList.addAll(systemConfigUpdateList);
+
+ List collectNameList = systemConfigSaveList.stream().map(SystemConfig::getName).collect(Collectors.toList());
+
+ //删除老的数据且不在新form提交的数据
+ if(null != formDataList && formDataList.size() > 0){
+ for (SystemConfig systemConfig : formDataList) {
+ if(!collectNameList.contains(systemConfig.getName())){
+ systemConfig.setStatus(true);
+ systemConfigDeleteList.add(systemConfig);
+ }
+ }
+ }
+ if(systemConfigDeleteList.size() > 0){
+ dao.deleteBatchIds(systemConfigDeleteList.stream().map(SystemConfig::getId).collect(Collectors.toList()));
+
+ }
+
+ systemConfigDeleteList.addAll(systemConfigSaveList);
+ async(systemConfigDeleteList);
return true;
}
+ private List selectByFormId(Integer formId) {
+ LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
+ lambdaQueryWrapper.eq(SystemConfig::getFormId, formId);
+ return dao.selectList(lambdaQueryWrapper);
+ }
+
+ private SystemConfig selectByName(String value) {
+ LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>();
+ lambdaQueryWrapper.eq(SystemConfig::getName, value).eq(SystemConfig::getStatus, false);
+ return dao.selectOne(lambdaQueryWrapper);
+ }
/**
@@ -291,13 +329,13 @@ public class SystemConfigServiceImpl extends ServiceImpl systemConfigList){
- if (!asyncConfig) {
+ if (!asyncConfig && systemConfigList.size() < 1) {
//如果配置没有开启
return;
}
for (SystemConfig systemConfig : systemConfigList) {
- if(systemConfig.getStatus()){
+ if(null != systemConfig.getStatus() && systemConfig.getStatus()){
//隐藏之后,删除redis的数据
deleteRedis(systemConfig.getName());
continue;