提交 460b4512 编写于 作者: L laijiaping

api接口信息(api_mation )涉及的新增与详情功能的bug修复

上级 0fbfef8e
......@@ -19,7 +19,7 @@ public class ApiMationController {
/**
*
* @Title: insertApiMationMation
* @Title: insertApiMation
* @Description: 新增api接口信息
* @param inputObject
* @param outputObject
......@@ -27,9 +27,9 @@ public class ApiMationController {
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/ApiMationController/insertApiMationMation")
@RequestMapping("/post/ApiMationController/insertApiMation")
@ResponseBody
public void insertApiMationMation(InputObject inputObject, OutputObject outputObject) throws Exception{
public void insertApiMation(InputObject inputObject, OutputObject outputObject) throws Exception{
apiMationService.insertApiMation(inputObject, outputObject);
}
......
......@@ -20,7 +20,7 @@ public interface ApiMationDao {
public Map<String, Object> queryApiMationByRequestUrl(Map<String, Object> map) throws Exception;
public int insertApiMationMation(Map<String, Object> map) throws Exception;
public int insertApiMation(Map<String, Object> map) throws Exception;
public Map<String, Object> selectApiMationById(Map<String, Object> map) throws Exception;
......
......@@ -52,9 +52,8 @@ public class ApiMationServiceImpl implements ApiMationService {
map.put("lastUpdateTime", DateUtil.getTimeAndToString());
apiMationDao.editApiMationById(map);
} else {
map.put("id", ToolUtil.getSurFaceId());
map.put("createTime", DateUtil.getTimeAndToString());
apiMationDao.insertApiMationMation(map);
apiMationDao.insertApiMation(map);
}
}
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.eve.dao.ApiMationDao">
<mapper namespace="com.skyeye.dao.ApiMationDao">
<select id="queryApiMationByRequestUrl" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id
a.request_url requestUrl
FROM
api_mation a
WHERE
......@@ -13,19 +13,19 @@
<insert id="insertApiMation" parameterType="java.util.Map">
INSERT INTO api_mation
(id, request_url, request_body, reponse_body, create_id, create_time, last_update_id, last_update_time)
VALUES(#{id}, #{requestUrl}, #{requestBody}, #{reponseBody}, #{userId}, #{createTime}, #{userId}, #{createTime})
(request_url, request_body, reponse_body, create_id, create_time, last_update_id, last_update_time)
VALUES(#{requestUrl}, #{requestBody}, #{reponseBody}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select id="selectApiMationById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.request_url requestUrl,
a.request_body requestBody,
a.reponse_body reponseBody
FROM
api_mation a
api_mation a
WHERE
a.id = #{id}
a.request_url = #{requestUrl}
</select>
<update id="editApiMationById" parameterType="java.util.Map">
......@@ -33,10 +33,11 @@
<set>
request_url = #{requestUrl},
request_body = #{requestBody},
reponse_body = #{reponseBody},
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
</set>
WHERE id = #{id}
WHERE request_url = #{requestUrl}
</update>
</mapper>
\ No newline at end of file
......@@ -13,13 +13,13 @@
</url>
<!-- api接口信息开始 -->
<url id="apimation001" path="/post/ApiMationController/insertApiMation" val="新增api接口信息" allUse="2" method="POST" groupName="api接口">
<url id="apimation001" path="/post/ApiMationController/insertApiMation" method="POST" val="新增api接口信息" allUse="1" groupName="api接口">
<property id="requestUrl" name="requestUrl" ref="required" var="请求地址"/>
<property id="requestBody" name="requestBody" ref="" var="请求入参"/>
<property id="reponseBody" name="reponseBody" ref="" var="请求出参"/>
</url>
<url id="apimation002" path="/post/ApiMationController/selectApiMationById" val="查看api接口信息详情" allUse="2" method="GET" groupName="api接口">
<property id="id" name="id" ref="required" var="接口id"/>
<url id="apimation002" path="/post/ApiMationController/selectApiMationById" val="查看api接口信息详情" allUse="1" method="GET" groupName="api接口">
<property id="requestUrl" name="requestUrl" ref="required" var="接口id"/>
</url>
<!-- api接口信息结束 -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册