From ea9425d6f50ff1eea46f4ce31e56e0b79e401250 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期五, 03 九月 2021 10:24:39 +0800
Subject: [PATCH] Merge branch 'zzj' into 'test'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
index b8b4395..0404aaf 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
@@ -55,17 +55,17 @@
         }
     }
 
-    /**
-     * 编辑系统配置
-     * @param communityId   社区id
-     * @param status    配置值
-     * @return  编辑结果
-     */
     @Override
     public R editSysConfValue(Long communityId, Integer status){
-        SysConfDO confDO = new SysConfDO();
+        String key = NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE;
+
+        SysConfDO confDO = this.baseMapper.selectOne(new QueryWrapper<SysConfDO>().lambda().eq(SysConfDO::getCommunityId,communityId)
+                .eq(SysConfDO::getCode,key + communityId));
+        if(confDO == null){
+            return R.fail("未查询到该系统配置");
+        }
         confDO.setCommunityId(communityId);
-        confDO.setCode(NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE + communityId);
+        confDO.setCode(key + communityId);
         confDO.setValue(status+"");
         if(this.baseMapper.updateById(confDO) > 0){
             return R.ok(confDO.getValue());

--
Gitblit v1.7.1