提交 122502f0 编写于 作者: Jadan-Z's avatar Jadan-Z

1、实现表boss_interviewee_from新增接口校验

上级 5122f5d2
...@@ -42,6 +42,14 @@ public interface BossIntervieweeFromDao { ...@@ -42,6 +42,14 @@ public interface BossIntervieweeFromDao {
*/ */
Map<String, Object> queryBossIntervieweeFromById(@Param("id") String id); Map<String, Object> queryBossIntervieweeFromById(@Param("id") String id);
/**
* 根据title查询统计条数
*
* @param title
* @return
*/
Integer queryBossIntervieweeFromTotalByTitle(@Param("title") String title);
/** /**
* 根据id更新面试者来源信息 * 根据id更新面试者来源信息
* *
......
...@@ -43,6 +43,12 @@ public class BossIntervieweeFromServiceImpl implements BossIntervieweeFromServic ...@@ -43,6 +43,12 @@ public class BossIntervieweeFromServiceImpl implements BossIntervieweeFromServic
@Override @Override
public void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception { public void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams(); Map<String, Object> 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("id", ToolUtil.getSurFaceId());
inputParams.put("createTime", DateUtil.getTimeAndToString()); inputParams.put("createTime", DateUtil.getTimeAndToString());
inputParams.put("userId", inputObject.getLogParams().get("id")); inputParams.put("userId", inputObject.getLogParams().get("id"));
......
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
WHERE a.id = #{id} WHERE a.id = #{id}
</select> </select>
<select id="queryBossIntervieweeFromTotalByTitle" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT count(1) FROM boss_interviewee_from
WHERE title = #{title}
</select>
<update id="updateBossIntervieweeFromById" parameterType="java.util.Map"> <update id="updateBossIntervieweeFromById" parameterType="java.util.Map">
UPDATE boss_interviewee_from UPDATE boss_interviewee_from
SET SET
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册