From b30e1a48f2bc5f65a0efd2e69e090fed2d7a627c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 17 十一月 2022 15:56:43 +0800 Subject: [PATCH] #feat 订单退款和查询 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java index 565b693..24d319a 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java @@ -28,6 +28,7 @@ import com.panzhihua.common.utlis.Snowflake; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.service.ComMngVillageService; +import org.springframework.util.CollectionUtils; /** * @author: llming @@ -79,8 +80,8 @@ @Override public R listComActVillage(ComMngVillageVO comMngVillageVO) { + List<ComMngVillageDO> vos = Lists.newArrayList(); if(comMngVillageVO.getCommunityId()!=null){ - List<ComMngVillageDO> vos = Lists.newArrayList(); LambdaQueryWrapper<ComMngVillageDO> param = new QueryWrapper<ComMngVillageDO>().lambda(); if(StringUtils.isNotEmpty(comMngVillageVO.getName())){ param.like(ComMngVillageDO::getName, comMngVillageVO.getName()); @@ -90,9 +91,25 @@ } List<ComMngVillageDO> comMngVillageDOS = comActVillageDAO.selectList(param); BeanUtils.copyProperties(comMngVillageDOS, vos); + if(CollectionUtils.isEmpty(comMngVillageDOS)){ + //默认添加小区 + ComMngVillageDO comMngVillageDO=new ComMngVillageDO(); + comMngVillageDO.setVillageId(1540264792718184449L); + comMngVillageDO.setType(1); + comMngVillageDO.setName("该社区/村暂未添加小区(院落),请先选择本项"); + comMngVillageDOS.add(comMngVillageDO); + } return R.ok(comMngVillageDOS); } - return R.fail("暂无小区数据"); + if(CollectionUtils.isEmpty(vos)){ + //默认添加小区 + ComMngVillageDO comMngVillageDO=new ComMngVillageDO(); + comMngVillageDO.setVillageId(1540264792718184449L); + comMngVillageDO.setType(1); + comMngVillageDO.setName("该社区/村暂未添加小区(院落),请先选择本项"); + vos.add(comMngVillageDO); + } + return R.ok(vos); } @Override -- Gitblit v1.7.1