From 9914babb77569d9a1f4735c55bcea4586adff200 Mon Sep 17 00:00:00 2001
From: tangxiaobao <303826152@qq.com>
Date: 星期一, 19 七月 2021 17:57:32 +0800
Subject: [PATCH] 社区后台基础数据库bug修改

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

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
index 74abc98..ea5703a 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
@@ -19,9 +19,11 @@
 import com.panzhihua.common.utlis.ParamRegularUtil;
 import com.panzhihua.service_community.dao.ComMngCarDAO;
 import com.panzhihua.service_community.dao.ComMngStructAreaDAO;
+import com.panzhihua.service_community.dao.ComMngVillageDAO;
 import com.panzhihua.service_community.model.dos.ComCvtServeDO;
 import com.panzhihua.service_community.model.dos.ComMngCarDO;
 import com.panzhihua.service_community.model.dos.ComMngStructAreaDO;
+import com.panzhihua.service_community.model.dos.ComMngVillageDO;
 import com.panzhihua.service_community.service.ComMngCarService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
@@ -43,6 +45,8 @@
     private ComMngCarDAO comMngCarDAO;
     @Resource
     private ComMngStructAreaDAO comMngStructAreaDAO;
+    @Resource
+    private ComMngVillageDAO comMngVillageDAO;
     @Resource
     private UserService userService;
     @Value("${domain.aesKey:}")
@@ -109,8 +113,8 @@
                 return R.ok("车辆已存在");
             }
         }
-        ComMngStructAreaDO comMngStructAreaDO = comMngStructAreaDAO.selectById(comMngCarSaveDTO.getAreaId());
-        if (ObjectUtils.isEmpty(comMngStructAreaDO)) {
+        ComMngVillageDO comMngVillageDO = comMngVillageDAO.selectById(comMngCarSaveDTO.getAreaId());
+        if (ObjectUtils.isEmpty(comMngVillageDO)) {
             return R.fail("小区不存在");
         }
         if (ObjectUtils.isEmpty(comMngCarSaveDTO.getMobile())) {
@@ -121,8 +125,8 @@
         }
         ComMngCarDO comMngCarDO = new ComMngCarDO();
         BeanUtils.copyProperties(comMngCarSaveDTO, comMngCarDO);
-        comMngCarDO.setAreaName(comMngStructAreaDO.getAreaName());
-        comMngCarDO.setCommunityId(comMngStructAreaDO.getCommunityId());
+        comMngCarDO.setAreaName(comMngVillageDO.getGroupAt());
+        comMngCarDO.setCommunityId(comMngVillageDO.getCommunityId());
         try {
             comMngCarDO.setCardNo(AESUtil.encrypt128(comMngCarSaveDTO.getCardNo(),aesKey));
         }catch (Exception e){

--
Gitblit v1.7.1