From a8ba074e4b0807cee707614a55e31e34ea0fbbde Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 26 四月 2021 10:29:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java index 0eb225b..736004d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java @@ -1,4 +1,5 @@ package com.panzhihua.service_community.service.impl; +import java.util.Date; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -119,13 +120,17 @@ BeanUtils.copyProperties(l, comMngRealCompanyDO); comMngRealCompanyDO.setCommunityId(communityId); comMngRealCompanyDOS.add(comMngRealCompanyDO); + }else{ + BeanUtils.copyProperties(l, realCompany); + realCompany.setCommunityId(communityId); + comMngRealCompanyDOS.add(realCompany); } }); - boolean batch = this.saveBatch(comMngRealCompanyDOS); + boolean batch = this.saveOrUpdateBatch(comMngRealCompanyDOS); if (batch) { return R.ok(); } - return R.fail("请检查数据是否重复,格合是否正确"); + return R.fail("请检查格式是否正确"); } @Override -- Gitblit v1.7.1