From 28e8b38e9de8cc76084d0af6a96d2d9d1e1f739f Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 27 十月 2022 13:28:32 +0800
Subject: [PATCH] Merge branch 'local_20221024' into haucheng_panzhihua

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 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 4ad4dee..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
@@ -1,12 +1,16 @@
 package com.panzhihua.service_community.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.panzhihua.common.constants.NeighborCircleConstants;
+import org.springframework.stereotype.Service;
+
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.service_community.dao.SysConfMapper;
 import com.panzhihua.service_community.model.dos.SysConfDO;
 import com.panzhihua.service_community.service.SysConfService;
+
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
 
 import java.util.Date;
 
@@ -51,4 +55,23 @@
         }
     }
 
+    @Override
+    public R editSysConfValue(Long communityId, Integer status){
+        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(key + communityId);
+        confDO.setValue(status+"");
+        if(this.baseMapper.updateById(confDO) > 0){
+            return R.ok(confDO.getValue());
+        }else{
+            return R.fail();
+        }
+    }
+
 }

--
Gitblit v1.7.1