From 7109e2fefaa46caffcd36b44828f48e0f8a790ba Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期二, 11 七月 2023 09:36:50 +0800
Subject: [PATCH] 管理台bug和用户端

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java |   70 +++++++++++++++++++++++++++++++----
 1 files changed, 62 insertions(+), 8 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
index 8752237..b3a48fa 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
@@ -259,24 +259,31 @@
                 case SHARE_INTEGRAL:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getShareIntegral().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case SUGGEST_PLATFORM_INTEGRAL:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getSuggestPlatformIntegral().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case SIGN_IN_INTEGRAL:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getSignInIntegral().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case SUGGEST_SHOP_INTEGRAL:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getSuggestShopIntegral().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case ORDER_AUTO_CANCEL_TIME:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getOrderAutoCancelTime().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case PAY_MONEY_INTEGRAL:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getPayMoneyIntegral().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 case HOME_STYLE:
                     customConfig.setConfigValue(mgtOtherConfigEditDto.getHomeStyle().toString());
                     this.saveOrUpdate(customConfig);
+                    break;
                 default:
                     break;
             }
@@ -313,23 +320,44 @@
                 switch (key) {
                     case "SHOP_EMERGENCY_DEGREE":
                         newValue = mgtShopConfigEditDto.getShopEmergencyDegree();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "SHOP_FOLLOW_TYPE":
                         newValue = mgtShopConfigEditDto.getShopFollowType();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "SHOP_CUSTOM_STATUS":
                         newValue = mgtShopConfigEditDto.getShopCustomStatus();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "SHOP_SOURCE_CHANNEL":
                         newValue = mgtShopConfigEditDto.getShopSourceChannel();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     default:
                         break;
                 }
-                customConfig.setConfigValue(newValue);
-                customConfig.setUpdateTime(updateTime);
-                handleChangeConfig(oldValue, newValue, key);
-                updatedCustomConfigs.add(customConfig);
+
             }
             this.saveOrUpdateBatch(updatedCustomConfigs);
         } else {
@@ -370,26 +398,52 @@
                 switch (key) {
                     case "MEMBER_SOURCE_CHANNEL":
                         newValue = mgtMemberConfigEditDto.getMemberSourceChannel();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "MEMBER_CHARACTER":
                         newValue = mgtMemberConfigEditDto.getMemberCharacter();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "MEMBER_LEVEL":
                         newValue = mgtMemberConfigEditDto.getMemberLevel();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "MEMBER_TYPE":
                         newValue = mgtMemberConfigEditDto.getMemberType();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     case "NURSE_PROBLEM":
                         newValue = mgtMemberConfigEditDto.getNurseProblem();
+                        customConfig.setConfigValue(newValue);
+                        customConfig.setUpdateTime(updateTime);
+                        if(oldValue!=null&&!oldValue.isEmpty()){
+                            handleChangeConfig(oldValue, newValue, key);
+                            updatedCustomConfigs.add(customConfig);
+                        }
                         break;
                     default:
                         break;
                 }
-                customConfig.setConfigValue(newValue);
-                customConfig.setUpdateTime(updateTime);
-                handleChangeConfig(oldValue, newValue, key);
-                updatedCustomConfigs.add(customConfig);
             }
             this.saveOrUpdateBatch(updatedCustomConfigs);
         } else {

--
Gitblit v1.7.1