...
|
...
|
@@ -11,9 +11,10 @@ |
|
|
<result column="api_req_method" property="apiReqMethod" jdbcType="INTEGER"/>
|
|
|
<result column="api_warn_trigger" property="apiWarnTrigger" jdbcType="INTEGER"/>
|
|
|
<result column="api_error_check" property="apiErrorCheck" jdbcType="INTEGER"/>
|
|
|
<result column="api_url_custom" property="apiUrlCustom" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
service_id, service_type, api_name, api_url, api_data, api_toggle, api_req_method,api_warn_trigger,api_error_check
|
|
|
service_id, service_type, api_name, api_url, api_data, api_toggle, api_req_method,api_warn_trigger,api_error_check,api_url_custom
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
...
|
...
|
@@ -28,10 +29,11 @@ |
|
|
<insert id="insert" parameterType="com.model.JavaApiInfo">
|
|
|
insert into java_api_info (service_id, service_type, api_name,
|
|
|
api_url, api_data, api_toggle,
|
|
|
api_req_method,api_warn_trigger,api_error_check)
|
|
|
api_req_method,api_warn_trigger,api_error_check,api_url_custom)
|
|
|
values (#{serviceId,jdbcType=INTEGER}, #{serviceType,jdbcType=INTEGER}, #{apiName,jdbcType=VARCHAR},
|
|
|
#{apiUrl,jdbcType=VARCHAR}, #{apiData,jdbcType=VARCHAR}, #{apiToggle,jdbcType=INTEGER},
|
|
|
#{apiReqMethod,jdbcType=INTEGER},#{apiWarnTrigger,jdbcType=INTEGER},#{apiErrorCheck,jdbcType=INTEGER})
|
|
|
#{apiReqMethod,jdbcType=INTEGER},#{apiWarnTrigger,jdbcType=INTEGER},
|
|
|
#{apiErrorCheck,jdbcType=INTEGER},#{apiUrlCustom,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.model.JavaApiInfo">
|
|
|
insert into java_api_info
|
...
|
...
|
@@ -63,6 +65,9 @@ |
|
|
<if test="apiErrorCheck != null">
|
|
|
api_error_check,
|
|
|
</if>
|
|
|
<if test="apiUrlCustom != null">
|
|
|
api_url_custom,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="serviceId != null">
|
...
|
...
|
@@ -92,6 +97,9 @@ |
|
|
<if test="apiErrorCheck != null">
|
|
|
#{apiErrorCheck,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiUrlCustom != null">
|
|
|
#{apiUrlCustom,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.model.JavaApiInfo">
|
...
|
...
|
@@ -121,6 +129,9 @@ |
|
|
<if test="apiErrorCheck != null">
|
|
|
api_error_check=#{apiErrorCheck,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiUrlCustom != null">
|
|
|
api_url_custom=#{apiUrlCustom,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</update>
|
...
|
...
|
@@ -133,7 +144,8 @@ |
|
|
api_toggle = #{apiToggle,jdbcType=INTEGER},
|
|
|
api_req_method = #{apiReqMethod,jdbcType=INTEGER},
|
|
|
api_warn_trigger= #{apiWarnTrigger,jdbcType=INTEGER},
|
|
|
api_error_check=#{apiErrorCheck,jdbcType=INTEGER}
|
|
|
api_error_check=#{apiErrorCheck,jdbcType=INTEGER},
|
|
|
api_url_custom=#{apiUrlCustom,jdbcType=INTEGER}
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
...
|
...
|
@@ -154,10 +166,10 @@ |
|
|
and service_type = #{params.serviceType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiName != null and params.apiName != ''">
|
|
|
and api_name like CONCAT('%',#{params.apiName,jdbcType=VARCHAR},'%' )
|
|
|
and api_name like CONCAT('%',#{params.apiName,jdbcType=VARCHAR},'%' )
|
|
|
</if>
|
|
|
<if test="params.apiUrl != null and params.apiUrl != ''">
|
|
|
and api_url like CONCAT('%',#{params.apiUrl,jdbcType=VARCHAR},'%' )
|
|
|
and api_url like CONCAT('%',#{params.apiUrl,jdbcType=VARCHAR},'%' )
|
|
|
</if>
|
|
|
<if test="params.apiData != null">
|
|
|
and api_data = #{params.apiData,jdbcType=VARCHAR}
|
...
|
...
|
@@ -166,10 +178,10 @@ |
|
|
and api_toggle = #{params.apiToggle,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiReqMethod != null and params.apiReqMethod !=2 ">
|
|
|
and api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
and api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiWarnTrigger != null">
|
|
|
and api_warn_trigger = #{params.apiWarnTrigger,jdbcType=INTEGER}
|
|
|
and api_warn_trigger = #{params.apiWarnTrigger,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
...
|
...
|
@@ -177,7 +189,8 @@ |
|
|
select
|
|
|
<include refid="Base_Column_List"/>,statics.err_num
|
|
|
from java_api_info info
|
|
|
left JOIN (SELECT count(api_id) err_num,api_id FROM `java_api_info_statics` where is_exception=1 GROUP BY api_id ) as statics
|
|
|
left JOIN (SELECT count(api_id) err_num,api_id FROM `java_api_info_statics` where is_exception=1 GROUP BY api_id
|
|
|
) as statics
|
|
|
on info.service_id=statics.api_id
|
|
|
where
|
|
|
1=1
|
...
|
...
|
@@ -185,22 +198,22 @@ |
|
|
and info.service_type = #{params.serviceType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiName != null and params.apiName != ''">
|
|
|
and info.api_name like CONCAT('%',#{params.apiName,jdbcType=VARCHAR},'%' )
|
|
|
and info.api_name like CONCAT('%',#{params.apiName,jdbcType=VARCHAR},'%' )
|
|
|
</if>
|
|
|
<if test="params.apiUrl != null and params.apiUrl != ''">
|
|
|
and info.api_url like CONCAT('%',#{params.apiUrl,jdbcType=VARCHAR},'%' )
|
|
|
and info.api_url like CONCAT('%',#{params.apiUrl,jdbcType=VARCHAR},'%' )
|
|
|
</if>
|
|
|
<if test="params.apiData != null">
|
|
|
and info.api_data = #{params.apiData,jdbcType=VARCHAR}
|
|
|
and info.api_data = #{params.apiData,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiToggle != null">
|
|
|
and info.api_toggle = #{params.apiToggle,jdbcType=INTEGER}
|
|
|
and info.api_toggle = #{params.apiToggle,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiReqMethod != null and params.apiReqMethod !=2 ">
|
|
|
and info.api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
and info.api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiWarnTrigger != null">
|
|
|
and info.api_warn_trigger = #{params.apiWarnTrigger,jdbcType=INTEGER}
|
|
|
and info.api_warn_trigger = #{params.apiWarnTrigger,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
ORDER BY info.api_toggle desc , statics.err_num desc
|
|
|
limit #{startIndex},#{pageSize}
|
...
|
...
|
|