From 122502f0a56a4a68811347188c70023a0d8aa9e1 Mon Sep 17 00:00:00 2001 From: Jadan-Z <13625030900@163.com> Date: Sun, 21 Nov 2021 22:55:04 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=9E=E7=8E=B0=E8=A1=A8boss=5Fint?= =?UTF-8?q?erviewee=5Ffrom=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/skyeye/dao/BossIntervieweeFromDao.java | 8 ++++++++ .../service/impl/BossIntervieweeFromServiceImpl.java | 6 ++++++ .../resources/mapper/boss/BossIntervieweeFromMapper.xml | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/skyeye-boss/src/main/java/com/skyeye/dao/BossIntervieweeFromDao.java b/skyeye-boss/src/main/java/com/skyeye/dao/BossIntervieweeFromDao.java index 3c4734cd0..a645a4da2 100644 --- a/skyeye-boss/src/main/java/com/skyeye/dao/BossIntervieweeFromDao.java +++ b/skyeye-boss/src/main/java/com/skyeye/dao/BossIntervieweeFromDao.java @@ -42,6 +42,14 @@ public interface BossIntervieweeFromDao { */ Map queryBossIntervieweeFromById(@Param("id") String id); + /** + * 根据title查询统计条数 + * + * @param title + * @return + */ + Integer queryBossIntervieweeFromTotalByTitle(@Param("title") String title); + /** * 根据id更新面试者来源信息 * diff --git a/skyeye-boss/src/main/java/com/skyeye/service/impl/BossIntervieweeFromServiceImpl.java b/skyeye-boss/src/main/java/com/skyeye/service/impl/BossIntervieweeFromServiceImpl.java index c2491e76d..d3e0038b1 100644 --- a/skyeye-boss/src/main/java/com/skyeye/service/impl/BossIntervieweeFromServiceImpl.java +++ b/skyeye-boss/src/main/java/com/skyeye/service/impl/BossIntervieweeFromServiceImpl.java @@ -43,6 +43,12 @@ public class BossIntervieweeFromServiceImpl implements BossIntervieweeFromServic @Override public void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception { Map inputParams = inputObject.getParams(); + String title = inputParams.get("title").toString(); + Integer total = bossIntervieweeFromDao.queryBossIntervieweeFromTotalByTitle(title); + if (total != 0) { + outputObject.setreturnMessage("存在相同的标题名称, 请更换新的标题!"); + return; + } inputParams.put("id", ToolUtil.getSurFaceId()); inputParams.put("createTime", DateUtil.getTimeAndToString()); inputParams.put("userId", inputObject.getLogParams().get("id")); diff --git a/skyeye-boss/src/main/resources/mapper/boss/BossIntervieweeFromMapper.xml b/skyeye-boss/src/main/resources/mapper/boss/BossIntervieweeFromMapper.xml index 3dc71efd1..fcc6a0af0 100644 --- a/skyeye-boss/src/main/resources/mapper/boss/BossIntervieweeFromMapper.xml +++ b/skyeye-boss/src/main/resources/mapper/boss/BossIntervieweeFromMapper.xml @@ -47,6 +47,11 @@ WHERE a.id = #{id} + + UPDATE boss_interviewee_from SET -- GitLab