From 70d2a5d0f9c6951b2d4cac954041ed73582ff7eb Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 09 六月 2025 11:54:00 +0800
Subject: [PATCH] 6.9新增登录失败冻结逻辑

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java |   88 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java
index 4cfe5da..7a978ef 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java
@@ -2,10 +2,9 @@
 
 import javax.annotation.Resource;
 
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import com.panzhihua.common.model.vos.community.CommunityPublicityVO;
+import com.panzhihua.common.utlis.StringUtils;
+import org.springframework.web.bind.annotation.*;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.panzhihua.common.constants.Constants;
@@ -34,13 +33,94 @@
         return R.ok(value);
     }
 
+    /**
+     * 根据系统code以及社区id查询配置表value值
+     *
+     * @param key         系统code
+     * @param communityId 社区id
+     * @return 系统配置value值
+     */
     @GetMapping("getSysConfValue")
     public R getSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId) {
         return sysConfService.getSysConfValue(key,communityId);
     }
 
+    /**
+     * 新增系统code配置数据
+     *
+     * @param key         系统code
+     * @param communityId 社区id
+     * @return 新增结果
+     */
     @GetMapping("addSysConfValue")
     public R addSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId,@RequestParam("name") String name,@RequestParam("value") String value) {
         return sysConfService.addSysConfValue(key,communityId,name,value);
     }
+
+    /**
+     * 编辑系统配置
+     * @param communityId   社区id
+     * @param status    配置值
+     * @return  编辑结果
+     */
+    @GetMapping("editSysConfValue")
+    public R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status) {
+        return sysConfService.editSysConfValue(communityId,status);
+    }
+
+
+
+    @GetMapping("getCommunityPublicityData")
+    public R getCommunityPublicityData(@RequestParam("communityId") String communityId)
+    {
+        if(StringUtils.isEmpty(communityId))
+        {
+            return R.fail("社区id不能为空");
+        }
+        return R.ok(sysConfService.getData(communityId));
+    }
+
+    @PostMapping("addCommunityPublicityDate")
+    public R addCommunityPublicityDate(@RequestBody CommunityPublicityVO item) {
+        if(StringUtils.isEmpty(item.getCommunityId()))
+        {
+            return R.fail("社区id不能为空");
+        }
+        int num=sysConfService.addDate(item);
+        if(num>0)
+        {
+            return R.ok();
+        }
+        return R.fail("删除失败");
+    }
+
+    @PostMapping("editCommunityPublicityDate")
+    public R editCommunityPublicityDate(@RequestBody CommunityPublicityVO item)
+    {
+        if(StringUtils.isEmpty(item.getCommunityId()))
+        {
+            return R.fail("社区id不能为空");
+        }
+        int num=sysConfService.editDate(item);
+        if(num>0)
+        {
+            return R.ok();
+        }
+        return R.fail("删除失败");
+    }
+
+    @DeleteMapping("deleteCommunityPublicityData")
+    public R deleteCommunityPublicityData(@RequestParam("communityId") String communityId)
+    {
+        if(StringUtils.isEmpty(communityId))
+        {
+            return R.fail("社区id不能为空");
+        }
+        int num=sysConfService.deleteData(communityId);
+        if(num>0)
+        {
+            return R.ok();
+        }
+        return R.fail("删除失败");
+    }
 }

--
Gitblit v1.7.1