From d6d00c7fbd97c6243cc259f563f081a1e479a9a2 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期三, 29 九月 2021 17:40:15 +0800 Subject: [PATCH] 基础数据功能修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java index 281fb67..4dc962d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java @@ -8,6 +8,7 @@ import javax.annotation.Resource; +import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseInsertAdminDTO; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -513,4 +514,21 @@ return R.ok(); } + @Override + @Transactional + public R insertHouse(ComMngPopulationHouseInsertAdminDTO houseEditAdminDTO) { + ComMngPopulationHouseDO houseDO=new ComMngPopulationHouseDO(); + BeanUtils.copyProperties(houseEditAdminDTO, houseDO); + houseDO.setCreateAt(new Date()); + if (this.baseMapper.insert(houseDO) > 0) { + ComMngPopulationHouseUserDO comMngPopulationHouseUserDO=new ComMngPopulationHouseUserDO(); + comMngPopulationHouseUserDO.setHouseId(houseDO.getId()); + comMngPopulationHouseUserDO.setPopulId(houseEditAdminDTO.getPopulationId()); + comMngPopulationHouseUserDAO.insert(comMngPopulationHouseUserDO); + return R.ok(); + } else { + return R.fail(); + } + } + } -- Gitblit v1.7.1