Commit f1259dc1 authored by zhangc's avatar zhangc

commit

parent 04088cd5
...@@ -20,7 +20,10 @@ import java.io.Serializable; ...@@ -20,7 +20,10 @@ import java.io.Serializable;
@ApiModel("API详情信息") @ApiModel("API详情信息")
public class ApiInterfaceDetailReq implements Serializable { public class ApiInterfaceDetailReq implements Serializable {
@ApiModelProperty(value = "id",required = true) @ApiModelProperty(value = "id",required = false)
@NotNull(message = "id不能为空")
private Long id; private Long id;
@ApiModelProperty(value = "apiKey",required = true)
@NotNull(message = "apiKey不能为空")
private String apiKey;
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jz.dm.mapper.ApiInterfaceMapper"> <mapper namespace="com.jz.dm.mapper.ApiInterfaceMapper">
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, api_key, api_name, api_desc, api_protocl, id, api_key, api_name, api_desc, api_protocl,
...@@ -28,12 +28,18 @@ ...@@ -28,12 +28,18 @@
</select> </select>
<select id="selectDetail" resultType="com.jz.dm.models.domian.ApiInterface"> <select id="selectDetail" resultType="com.jz.dm.models.domian.ApiInterface">
SELECT ai.*, SELECT ai.*,
aic.request_param AS requestParam, aic.request_param AS requestParam,
aic.response_param AS responseParam, aic.response_param AS responseParam,
aic.resp_code AS respCode aic.resp_code AS respCode
FROM t_api_interface AS ai FROM t_api_interface AS ai
LEFT JOIN t_api_interface_custom AS aic ON ai.id = aic.api_interface_id AND aic.is_deleted =0 LEFT JOIN t_api_interface_custom AS aic ON ai.id = aic.api_interface_id AND aic.is_deleted =0
WHERE ai.id =#{id} WHERE
<if test="apiKey != null and apiKey !=''">
ai.api_key =#{apiKey}
</if>
<if test="id != null and id !=''">
AND ai.id =#{id}
</if>
</select> </select>
<select id="getTestData" resultType="com.jz.dm.models.domian.ApiInterfaceCustom"> <select id="getTestData" resultType="com.jz.dm.models.domian.ApiInterfaceCustom">
SELECT aic.* SELECT aic.*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment