From 929ff93a7a9db5b9fb0e3ce8e45a66ce59ea1767 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期三, 11 八月 2021 17:53:57 +0800
Subject: [PATCH] Merge branch 'test' into 'master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java |   96 -----------------------------------------------
 1 files changed, 1 insertions(+), 95 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java
index 936a414..391764d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java
@@ -86,7 +86,7 @@
         List<ComActIntegralUserRuleVO> integralUserRuleList = comActIntegralRuleService.getIntegralReceiveApplets(communityId);
         if(integralUserRuleList.isEmpty()){
             //如果没有查询到列表数据,增给社区增加默认规则列表再查询
-            List<ComActIntegralRuleDO> integralRuleList = getIntegralRuleList(communityId);
+            List<ComActIntegralRuleDO> integralRuleList = comActIntegralRuleService.getIntegralRuleList(communityId);
             comActIntegralRuleService.saveBatch(integralRuleList);
             integralUserRuleList = comActIntegralRuleService.getIntegralReceiveApplets(communityId);
         }
@@ -160,100 +160,6 @@
         integralUserVO.setAmount(amount);
         integralUserVO.setIntegralUserList(integralUserList);
         return R.ok(integralUserVO);
-    }
-
-    /**
-     * 加载默认社区积分规则列表
-     * @param communityId   社区id
-     * @return  默认积分规则列表
-     */
-    private List<ComActIntegralRuleDO> getIntegralRuleList(Long communityId){
-        List<ComActIntegralRuleDO> integralRuleList = new ArrayList<>();
-
-        //随手拍默认积分规则
-        ComActIntegralRuleDO integralRuleSSPDO = new ComActIntegralRuleDO();
-        integralRuleSSPDO.setCommunityId(communityId);
-        integralRuleSSPDO.setName("发布随手拍");
-        integralRuleSSPDO.setAmount(0);
-        integralRuleSSPDO.setIntegralDescribe("发布随手拍并被公示后");
-        integralRuleSSPDO.setIsRestrict(1);
-        integralRuleSSPDO.setType(ComActIntegralRuleDO.type.month);
-        integralRuleSSPDO.setCount(0);
-        integralRuleSSPDO.setIntegralType(ComActIntegralRuleDO.integralType.fbssp);
-        integralRuleList.add(integralRuleSSPDO);
-
-        //微心愿默认积分规则
-        ComActIntegralRuleDO integralRuleWXYDO = new ComActIntegralRuleDO();
-        integralRuleWXYDO.setCommunityId(communityId);
-        integralRuleWXYDO.setName("发布微心愿");
-        integralRuleWXYDO.setAmount(0);
-        integralRuleWXYDO.setIntegralDescribe("发布微心愿并完成后");
-        integralRuleWXYDO.setIsRestrict(1);
-        integralRuleWXYDO.setType(ComActIntegralRuleDO.type.month);
-        integralRuleWXYDO.setCount(0);
-        integralRuleWXYDO.setIntegralType(ComActIntegralRuleDO.integralType.fbwxy);
-        integralRuleList.add(integralRuleWXYDO);
-
-        //议事投票默认积分规则
-        ComActIntegralRuleDO integralRuleYSTPDO = new ComActIntegralRuleDO();
-        integralRuleYSTPDO.setCommunityId(communityId);
-        integralRuleYSTPDO.setName("参与议事投票");
-        integralRuleYSTPDO.setAmount(0);
-        integralRuleYSTPDO.setIntegralDescribe("参与议事投票");
-        integralRuleYSTPDO.setIsRestrict(1);
-        integralRuleYSTPDO.setType(ComActIntegralRuleDO.type.day);
-        integralRuleYSTPDO.setCount(0);
-        integralRuleYSTPDO.setIntegralType(ComActIntegralRuleDO.integralType.cyystp);
-        integralRuleList.add(integralRuleYSTPDO);
-
-        //志愿者活动默认积分规则
-        ComActIntegralRuleDO integralRuleZYZDO = new ComActIntegralRuleDO();
-        integralRuleZYZDO.setCommunityId(communityId);
-        integralRuleZYZDO.setName("参与志愿者活动");
-        integralRuleZYZDO.setAmount(0);
-        integralRuleZYZDO.setIntegralDescribe("报名参加志愿者活动,仅限志愿者");
-        integralRuleZYZDO.setIsRestrict(1);
-        integralRuleZYZDO.setType(ComActIntegralRuleDO.type.month);
-        integralRuleZYZDO.setCount(0);
-        integralRuleZYZDO.setIntegralType(ComActIntegralRuleDO.integralType.cyzyzhd);
-        integralRuleList.add(integralRuleZYZDO);
-
-        //社区活动默认积分规则
-        ComActIntegralRuleDO integralRuleSQHDDO = new ComActIntegralRuleDO();
-        integralRuleSQHDDO.setCommunityId(communityId);
-        integralRuleSQHDDO.setName("参与社区活动");
-        integralRuleSQHDDO.setAmount(0);
-        integralRuleSQHDDO.setIntegralDescribe("报名参加社区活动,所有人可参与");
-        integralRuleSQHDDO.setIsRestrict(1);
-        integralRuleSQHDDO.setType(ComActIntegralRuleDO.type.month);
-        integralRuleSQHDDO.setCount(0);
-        integralRuleSQHDDO.setIntegralType(ComActIntegralRuleDO.integralType.cysqhd);
-        integralRuleList.add(integralRuleSQHDDO);
-
-        //党员活动默认积分规则
-        ComActIntegralRuleDO integralRuleDYHDDO = new ComActIntegralRuleDO();
-        integralRuleDYHDDO.setCommunityId(communityId);
-        integralRuleDYHDDO.setName("参与党员活动");
-        integralRuleDYHDDO.setAmount(0);
-        integralRuleDYHDDO.setIntegralDescribe("报名参加社区党员活动,党员可参与");
-        integralRuleDYHDDO.setIsRestrict(1);
-        integralRuleDYHDDO.setType(ComActIntegralRuleDO.type.day);
-        integralRuleDYHDDO.setCount(0);
-        integralRuleDYHDDO.setIntegralType(ComActIntegralRuleDO.integralType.cydyhd);
-        integralRuleList.add(integralRuleDYHDDO);
-
-        //党员活动默认积分规则
-        ComActIntegralRuleDO integralRuleWJDCDO = new ComActIntegralRuleDO();
-        integralRuleWJDCDO.setCommunityId(communityId);
-        integralRuleWJDCDO.setName("参与问卷调查");
-        integralRuleWJDCDO.setAmount(0);
-        integralRuleWJDCDO.setIntegralDescribe("参与问卷调查");
-        integralRuleWJDCDO.setIsRestrict(1);
-        integralRuleWJDCDO.setType(ComActIntegralRuleDO.type.day);
-        integralRuleWJDCDO.setCount(0);
-        integralRuleWJDCDO.setIntegralType(ComActIntegralRuleDO.integralType.cydcwj);
-        integralRuleList.add(integralRuleWJDCDO);
-        return integralRuleList;
     }
 
     /**

--
Gitblit v1.7.1