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

1、实现表boss_interviewee_from增删改查接口

上级 19700df3
......@@ -4,9 +4,13 @@
package com.skyeye.controller;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.service.BossIntervieweeFromService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @ClassName: BossIntervieweeFromController
......@@ -22,4 +26,84 @@ public class BossIntervieweeFromController {
@Autowired
private BossIntervieweeFromService bossIntervieweeFromService;
/**
*
* @Title: queryBossIntervieweeFromList
* @Description: 分页+title模糊查询动态表单页面分类列表
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/BossIntervieweeFromController/queryBossIntervieweeFromList")
@ResponseBody
public void queryBossIntervieweeFromList(InputObject inputObject, OutputObject outputObject) throws Exception{
bossIntervieweeFromService.queryBossIntervieweeFromList(inputObject, outputObject);
}
/**
*
* @Title: insertBossIntervieweeFrom
* @Description: 新增面试者来源信息
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/BossIntervieweeFromController/insertBossIntervieweeFrom")
@ResponseBody
public void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception{
bossIntervieweeFromService.insertBossIntervieweeFrom(inputObject, outputObject);
}
/**
*
* @Title: delBossIntervieweeFromById
* @Description: 删除面试者来源信息
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/BossIntervieweeFromController/delBossIntervieweeFromById")
@ResponseBody
public void delBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception{
bossIntervieweeFromService.delBossIntervieweeFromById(inputObject, outputObject);
}
/**
*
* @Title: queryBossIntervieweeFromById
* @Description: 根据id查询面试者来源信息详情
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/BossIntervieweeFromController/queryBossIntervieweeFromById")
@ResponseBody
public void queryBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception{
bossIntervieweeFromService.queryBossIntervieweeFromById(inputObject, outputObject);
}
/**
*
* @Title: updateBossIntervieweeFromById
* @Description: 通过id编辑对应的面试者来源信息
* @param inputObject
* @param outputObject
* @throws Exception 异常
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/BossIntervieweeFromController/updateBossIntervieweeFromById")
@ResponseBody
public void updateBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception{
bossIntervieweeFromService.updateBossIntervieweeFromById(inputObject, outputObject);
}
}
......@@ -4,6 +4,11 @@
package com.skyeye.dao;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @ClassName: BossIntervieweeFromDao
* @Description: 面试者来源管理数据层
......@@ -14,4 +19,41 @@ package com.skyeye.dao;
*/
public interface BossIntervieweeFromDao {
/**
* 分页+title模糊查询动态表单页面分类列表
*
* @param map
* @return
*/
List<Map<String, Object>> queryBossIntervieweeFromList(Map<String, Object> map);
/**
* 新增面试者来源信息
*
* @param map
*/
void insertBossIntervieweeFrom(Map<String, Object> map);
/**
* 根据id查询面试者来源信息详情
*
* @param id 唯一标识
* @return 详情信息
*/
Map<String, Object> queryBossIntervieweeFromById(@Param("id") String id);
/**
* 根据id更新面试者来源信息
*
* @param map
* @throws Exception
*/
void updateBossIntervieweeFromById(Map<String, Object> map);
/**
* 根据id删除面试者来源信息
*
* @param id 唯一标识
*/
void delBossIntervieweeFromById(@Param("id") String id);
}
......@@ -4,6 +4,9 @@
package com.skyeye.service;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
/**
* @ClassName: BossIntervieweeFromService
* @Description: 面试者来源管理服务接口层
......@@ -13,4 +16,44 @@ package com.skyeye.service;
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public interface BossIntervieweeFromService {
/**
* 分页+title模糊查询动态表单页面分类列表
*
* @param inputObject
* @param outputObject
*/
void queryBossIntervieweeFromList(InputObject inputObject, OutputObject outputObject) throws Exception;
/**
* 新增面试者来源信息
*
* @param inputObject
* @param outputObject
*/
void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception;
/**
* 根据id查询面试者来源信息详情
*
* @param inputObject
* @param outputObject
*/
void queryBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception;
/**
* 根据id更新面试者来源信息
*
* @param inputObject
* @param outputObject
*/
void updateBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception;
/**
* 根据id删除面试者来源信息
*
* @param inputObject
* @param outputObject
*/
void delBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
......@@ -4,11 +4,18 @@
package com.skyeye.service.impl;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.DateUtil;
import com.skyeye.common.util.ToolUtil;
import com.skyeye.dao.BossIntervieweeFromDao;
import com.skyeye.service.BossIntervieweeFromService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @ClassName: BossIntervieweeFromServiceImpl
* @Description: 面试者来源管理服务层
......@@ -23,4 +30,46 @@ public class BossIntervieweeFromServiceImpl implements BossIntervieweeFromServic
@Autowired
private BossIntervieweeFromDao bossIntervieweeFromDao;
@Override
public void queryBossIntervieweeFromList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams();
List<Map<String, Object>> beans = bossIntervieweeFromDao.queryBossIntervieweeFromList(inputParams);
if(!beans.isEmpty()){
outputObject.setBeans(beans);
outputObject.settotal(beans.size());
}
}
@Override
public void insertBossIntervieweeFrom(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams();
inputParams.put("id", ToolUtil.getSurFaceId());
inputParams.put("createTime", DateUtil.getTimeAndToString());
inputParams.put("userId", inputObject.getLogParams().get("id"));
bossIntervieweeFromDao.insertBossIntervieweeFrom(inputParams);
}
@Override
public void queryBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams();
Map<String, Object> bean = bossIntervieweeFromDao.queryBossIntervieweeFromById(inputParams.get("id").toString());
if (bean != null) {
outputObject.setBean(bean);
outputObject.settotal(1);
}
}
@Override
public void updateBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams();
inputParams.put("userId", inputObject.getLogParams().get("id"));
inputParams.put("lastUpdateTime", DateUtil.getTimeAndToString());
bossIntervieweeFromDao.updateBossIntervieweeFromById(inputParams);
}
@Override
public void delBossIntervieweeFromById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> inputParams = inputObject.getParams();
bossIntervieweeFromDao.delBossIntervieweeFromById(inputParams.get("id").toString());
}
}
......@@ -2,5 +2,64 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.dao.BossIntervieweeFromDao">
<select id="queryBossIntervieweeFromList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.title,
a.from_url fromUrl,
a.desc,
b.user_name createName,
CONVERT(a.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(a.last_update_time, char) lastUpdateTime
FROM
boss_interviewee_from a
LEFT JOIN sys_eve_user_staff b ON a.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON a.last_update_id = c.user_id
WHERE 1 = 1
<if test="title != '' and title != null">
AND a.title LIKE '%${title}%'
</if>
ORDER BY a.create_time DESC
</select>
<insert id="insertBossIntervieweeFrom" parameterType="java.util.Map">
INSERT INTO boss_interviewee_from
(id, title, from_url, `desc`, create_id, create_time, last_update_id, last_update_time)
VALUES
(#{id}, #{title}, #{fromUrl}, #{desc}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select id="queryBossIntervieweeFromById" parameterType="java.lang.String" resultType="java.util.Map">
SELECT
a.id,
a.title,
a.from_url fromUrl,
a.desc,
b.user_name createName,
CONVERT(a.create_time, char) createTime,
c.user_name lastUpdateName,
CONVERT(a.last_update_time, char) lastUpdateTime
FROM
boss_interviewee_from a
LEFT JOIN sys_eve_user_staff b ON a.create_id = b.user_id
LEFT JOIN sys_eve_user_staff c ON a.last_update_id = c.user_id
WHERE a.id = #{id}
</select>
<update id="updateBossIntervieweeFromById" parameterType="java.util.Map">
UPDATE boss_interviewee_from
SET
title = #{title},
from_url = #{fromUrl},
`desc` = #{desc},
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
WHERE id = #{id}
</update>
<delete id="delBossIntervieweeFromById" parameterType="java.lang.String">
DELETE FROM boss_interviewee_from
WHERE id = #{id}
</delete>
</mapper>
\ No newline at end of file
......@@ -3,6 +3,29 @@
<!--
- allUse 是否需要登录才能使用 1是 0否 2需要登陆才能访问,但无需授权 默认为否
-->
<!-- 面试者来源信息表开始 -->
<url id="bossIntervieweeFrom001" path="/post/BossIntervieweeFromController/queryBossIntervieweeFromList" method="POST" val="获取面试者来源信息列表" allUse="1">
<property id="title" name="title" ref="" var="标题"/>
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
</url>
<url id="bossIntervieweeFrom002" path="/post/BossIntervieweeFromController/insertBossIntervieweeFrom" method="POST" val="新增面试者来源信息" allUse="1">
<property id="title" name="title" ref="required" var="标题"/>
<property id="fromUrl" name="fromUrl" ref="" var="来源地址"/>
<property id="desc" name="desc" ref="" var="简介"/>
</url>
<url id="bossIntervieweeFrom003" path="/post/BossIntervieweeFromController/delBossIntervieweeFromById" method="DELETE" val="删除面试者来源信息" allUse="1">
<property id="id" name="id" ref="required" var="主键id"/>
</url>
<url id="bossIntervieweeFrom004" path="/post/BossIntervieweeFromController/queryBossIntervieweeFromById" method="GET" val="根据id查询面试者来源信息详情" allUse="2">
<property id="id" name="id" ref="required" var="主键id"/>
</url>
<url id="bossIntervieweeFrom005" path="/post/BossIntervieweeFromController/updateBossIntervieweeFromById" method="PUT" val="通过id编辑对应的面试者来源信息" allUse="1">
<property id="id" name="id" ref="required" var="主键id"/>
<property id="title" name="title" ref="required" var="标题"/>
<property id="fromUrl" name="fromUrl" ref="" var="来源地址"/>
<property id="desc" name="desc" ref="" var="简介"/>
</url>
<!-- 面试者来源信息表结束 -->
</controller>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册