From 16face1a901a018eee1122f27745eff8d5a6ea98 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 28 二月 2025 14:30:03 +0800
Subject: [PATCH] 新增加门店课程配置

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 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 447142e..6ddda72 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
@@ -2,8 +2,10 @@
 
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ibm.icu.util.LocaleData;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.redis.service.RedisService;
 import com.ruoyi.common.security.utils.SecurityUtils;
@@ -244,6 +246,12 @@
                     case "NURSE_PROBLEM":
                         mgtAllCustomConfigVo.setNurseProblem(value.getConfigValue());
                         break;
+                    case "STORE_COURSE_DISPLAY_NAME":
+                        mgtAllCustomConfigVo.setStoreCourseDisplayName(value.getConfigValue());
+                        break;
+                    case "STORE_COURSE_DISPLAY_PASSWORD":
+                        mgtAllCustomConfigVo.setStoreCourseDisplayPassword(value.getConfigValue());
+                        break;
                     default:
                         break;
                 }
@@ -296,6 +304,41 @@
         // 新建配置
         createNewConfig(mgtOtherConfigEditDto, updateTime);
     }
+    
+    
+    /**
+     * 修改门店课程配置
+     * @param mgtStoreCurriculumEditDto
+     */
+    @Override
+    public void editStoreCurriculum(MgtStoreCurriculumEditDto mgtStoreCurriculumEditDto) {
+        customConfigMapper.delete(new QueryWrapper<CustomConfig>().eq("config_type", ConfigEnum.STORE_COURSE_DISPLAY_NAME.getKeyType())
+                .eq("config_key", ConfigEnum.STORE_COURSE_DISPLAY_NAME.getKey()));
+        customConfigMapper.delete(new QueryWrapper<CustomConfig>().eq("config_type", ConfigEnum.STORE_COURSE_DISPLAY_PASSWORD.getKeyType())
+                .eq("config_key", ConfigEnum.STORE_COURSE_DISPLAY_PASSWORD.getKey()));
+    
+        CustomConfig customConfig = new CustomConfig();
+        customConfig.setDelFlag(0);
+        customConfig.setConfigType(2);
+        customConfig.setConfigKey(ConfigEnum.STORE_COURSE_DISPLAY_NAME.getKey());
+        customConfig.setConfigName(ConfigEnum.STORE_COURSE_DISPLAY_NAME.getKeyName());
+        customConfig.setCreateTime(new Date());
+        customConfig.setUpdateTime(new Date());
+        customConfig.setConfigValue(mgtStoreCurriculumEditDto.getStoreCourseDisplayName());
+        this.saveOrUpdate(customConfig);
+        
+        customConfig = new CustomConfig();
+        customConfig.setDelFlag(0);
+        customConfig.setConfigType(2);
+        customConfig.setConfigKey(ConfigEnum.STORE_COURSE_DISPLAY_PASSWORD.getKey());
+        customConfig.setConfigName(ConfigEnum.STORE_COURSE_DISPLAY_PASSWORD.getKeyName());
+        customConfig.setCreateTime(new Date());
+        customConfig.setUpdateTime(new Date());
+        customConfig.setConfigValue(mgtStoreCurriculumEditDto.getStoreCourseDisplayPassword());
+        this.saveOrUpdate(customConfig);
+    }
+    
+    
 
     /**
      * @param updateTime

--
Gitblit v1.7.1