From c83cf9d2d82a0a29a15e38f4566eb470b9a3517b Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 22 二月 2022 09:57:51 +0800
Subject: [PATCH] 抽奖相关提交

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

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
index a602b7c..6a1ca7c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialWorkerServiceImpl.java
@@ -10,12 +10,9 @@
 import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO;
 import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO;
 import com.panzhihua.common.utlis.StringUtils;
-import com.panzhihua.service_community.dao.ComActDAO;
-import com.panzhihua.service_community.dao.ComActSocialOrgDao;
-import com.panzhihua.service_community.dao.ComStreetDAO;
+import com.panzhihua.service_community.dao.*;
 import com.panzhihua.service_community.entity.ComActSocialOrg;
 import com.panzhihua.service_community.entity.ComActSocialWorker;
-import com.panzhihua.service_community.dao.ComActSocialWorkerDao;
 import com.panzhihua.service_community.model.dos.ComActDO;
 import com.panzhihua.service_community.model.dos.ComStreetDO;
 import com.panzhihua.service_community.service.ComActSocialWorkerService;
@@ -45,6 +42,8 @@
     private ComActSocialOrgDao comActSocialOrgMapper;
     @Resource
     private ComActDAO comActDAO;
+    @Resource
+    private ComActActivityDAO comActActivityDAO;
     /**
      * 新增社工
      * @param comActSocialWorkerAddDTO
@@ -127,18 +126,6 @@
             for(ComActSocialWorkerExcelVO comActSocialWorkerExcelVO:lis) {
                 ComActSocialWorker comActSocialWorkerDO = new ComActSocialWorker();
                 BeanUtils.copyProperties(comActSocialWorkerExcelVO,comActSocialWorkerDO);
-                if (StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getStreetId())) {
-                    ComStreetDO comStreetDO=comStreetDAO.selectOne(new QueryWrapper<ComStreetDO>().eq("name",comActSocialWorkerExcelVO.getStreetId()));
-                    if(comStreetDO!=null){
-                        comActSocialWorkerDO.setStreetId(comStreetDO.getStreetId());
-                    }
-                }
-                if (StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getSocialOrgId())) {
-                    ComActSocialOrg comActSocialOrgDO=comActSocialOrgMapper.selectOne(new QueryWrapper<ComActSocialOrg>().eq("name",comActSocialWorkerExcelVO.getSocialOrgId()));
-                    if(comActSocialOrgDO!=null){
-                        comActSocialWorkerDO.setSocialOrgId(comActSocialOrgDO.getId());
-                    }
-                }
                 if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCommunityId())){
                     ComActDO comActDO= comActDAO.selectOne(new QueryWrapper<ComActDO>().eq("name",comActSocialWorkerExcelVO.getCommunityId()));
                     if(comActDO!=null){
@@ -153,6 +140,22 @@
                         comActSocialWorkerDO.setGen(0);
                     }
                 }
+                if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCredential())){
+                    if("是".equals(comActSocialWorkerExcelVO.getCredential())){
+                        comActSocialWorkerDO.setCredential(1);
+                    }
+                    else {
+                        comActSocialWorkerDO.setCredential(0);
+                    }
+                }
+                if(StringUtils.isNotEmpty(comActSocialWorkerExcelVO.getCredential())){
+                    if("是".equals(comActSocialWorkerExcelVO.getCredential())){
+                        comActSocialWorkerDO.setCredential(1);
+                    }
+                    else {
+                        comActSocialWorkerDO.setCredential(0);
+                    }
+                }
                 list.add(comActSocialWorkerDO);
             }
             this.saveBatch(list);
@@ -160,4 +163,14 @@
 
         return R.ok();
     }
+
+    @Override
+    public R activity(CommonPage commonPage) {
+        return R.ok(comActSocialWorkerMapper.selectActivity(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId()));
+    }
+
+    @Override
+    public R activityList(CommonPage commonPage) {
+        return R.ok(comActActivityDAO.selectActivityBySocialWorker(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId()));
+    }
 }

--
Gitblit v1.7.1