From 24a0b567fc7a5f894c8a8c4c60e2b958393517ab Mon Sep 17 00:00:00 2001 From: bianyadong Date: Mon, 20 May 2024 11:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E5=9F=B9=E8=AE=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cool/store/dao/EmployeeTrainingDAO.java | 5 +---- .../cool/store/service/impl/EmployeeTrainingServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/EmployeeTrainingDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/EmployeeTrainingDAO.java index f1997a961..7ab53c9fb 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/EmployeeTrainingDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/EmployeeTrainingDAO.java @@ -77,11 +77,8 @@ public class EmployeeTrainingDAO { } public Integer unCompleteNum(Long shopId) { - List statusList = new ArrayList<>(); - statusList.add(0); - statusList.add(1); Example example = new Example(EmployeeTrainingDO.class); - example.createCriteria().andIn("assessmentStatus", statusList).andEqualTo("shopId", shopId); + example.createCriteria().andEqualTo("shopId", shopId).andCondition("theoreticalExamStatus != 1").andCondition("practical_exam_status != 1", 1); return employeeTrainingMapper.selectCountByExample(example); } } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java index 73992e055..e335b15bd 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java @@ -649,10 +649,10 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService { } - if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO || employeeTrainingDO.getTheoreticalExamStatus() == CommonConstants.TWO) { + if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO) { employeeTrainingDO.setAssessmentStatus(CommonConstants.THREE); } - if (employeeTrainingDO.getPracticalExamStatus() == 1 && employeeTrainingDO.getTheoreticalExamStatus() == 1) { + if (employeeTrainingDO.getPracticalExamStatus() == 1) { employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO); } employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);