From 216dd040d86f9aadd84a8feadd5f85e112b40983 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期五, 19 十一月 2021 15:19:05 +0800
Subject: [PATCH] Merge branch 'zhaozhengjie1104' into test

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

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
index d2e43f8..d4e8c12 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
@@ -174,7 +174,7 @@
                     return R.fail("该值班表不存在");
                 }
                 ComSwRotaDO checkCreditCode = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda()
-                    .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()));
+                    .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()).eq(ComSwRotaDO::getCommunityId,comSwRotaSaveDTO.getCommunityId()));
                 if (null != checkCreditCode && !comSwRotaDO.getId().equals(checkCreditCode.getId())) {
                     return R.fail("该值班表已存在,值班日期重复");
                 }
@@ -187,7 +187,7 @@
                 comSwRotaDAO.updateById(comSwRotaDO);
             } else {
                 Integer count = comSwRotaDAO.selectCount(new QueryWrapper<ComSwRotaDO>().lambda()
-                    .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()));
+                    .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()).eq(ComSwRotaDO::getCommunityId,comSwRotaSaveDTO.getCommunityId()));
                 if (count > 0) {
                     return R.fail("该值班表已存在,值班日期重复");
                 }

--
Gitblit v1.7.1