|
|
<?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.monitor.mysql.mapper.JavaApiInfoMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.model.JavaApiInfo" >
|
|
|
<id column="service_id" property="serviceId" jdbcType="INTEGER" />
|
|
|
<result column="service_type" property="serviceType" jdbcType="INTEGER" />
|
|
|
<result column="api_name" property="apiName" jdbcType="VARCHAR" />
|
|
|
<result column="api_url" property="apiUrl" jdbcType="VARCHAR" />
|
|
|
<result column="api_data" property="apiData" jdbcType="VARCHAR" />
|
|
|
<result column="api_toggle" property="apiToggle" jdbcType="INTEGER" />
|
|
|
<result column="api_req_method" property="apiReqMethod" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
<mapper namespace="com.monitor.mysql.mapper.JavaApiInfoMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.model.JavaApiInfo">
|
|
|
<id column="service_id" property="serviceId" jdbcType="INTEGER"/>
|
|
|
<result column="service_type" property="serviceType" jdbcType="INTEGER"/>
|
|
|
<result column="api_name" property="apiName" jdbcType="VARCHAR"/>
|
|
|
<result column="api_url" property="apiUrl" jdbcType="VARCHAR"/>
|
|
|
<result column="api_data" property="apiData" jdbcType="VARCHAR"/>
|
|
|
<result column="api_toggle" property="apiToggle" jdbcType="INTEGER"/>
|
|
|
<result column="api_req_method" property="apiReqMethod" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
service_id, service_type, api_name, api_url, api_data, api_toggle, api_req_method
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from java_api_info
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from java_api_info
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from java_api_info
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.model.JavaApiInfo" >
|
|
|
<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)
|
...
|
...
|
@@ -31,80 +31,80 @@ |
|
|
#{apiUrl,jdbcType=VARCHAR}, #{apiData,jdbcType=VARCHAR}, #{apiToggle,jdbcType=INTEGER},
|
|
|
#{apiReqMethod,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.model.JavaApiInfo" >
|
|
|
insert into java_api_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="serviceId != null" >
|
|
|
service_id,
|
|
|
</if>
|
|
|
<if test="serviceType != null" >
|
|
|
service_type,
|
|
|
</if>
|
|
|
<if test="apiName != null" >
|
|
|
api_name,
|
|
|
</if>
|
|
|
<if test="apiUrl != null" >
|
|
|
api_url,
|
|
|
</if>
|
|
|
<if test="apiData != null" >
|
|
|
api_data,
|
|
|
</if>
|
|
|
<if test="apiToggle != null" >
|
|
|
api_toggle,
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null" >
|
|
|
api_req_method,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="serviceId != null" >
|
|
|
#{serviceId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="serviceType != null" >
|
|
|
#{serviceType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiName != null" >
|
|
|
#{apiName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiUrl != null" >
|
|
|
#{apiUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiData != null" >
|
|
|
#{apiData,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiToggle != null" >
|
|
|
#{apiToggle,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null" >
|
|
|
#{apiReqMethod,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.model.JavaApiInfo" >
|
|
|
update java_api_info
|
|
|
<set >
|
|
|
<if test="serviceType != null" >
|
|
|
service_type = #{serviceType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiName != null" >
|
|
|
api_name = #{apiName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiUrl != null" >
|
|
|
api_url = #{apiUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiData != null" >
|
|
|
api_data = #{apiData,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiToggle != null" >
|
|
|
api_toggle = #{apiToggle,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null" >
|
|
|
api_req_method = #{apiReqMethod,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.model.JavaApiInfo" >
|
|
|
<insert id="insertSelective" parameterType="com.model.JavaApiInfo">
|
|
|
insert into java_api_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="serviceId != null">
|
|
|
service_id,
|
|
|
</if>
|
|
|
<if test="serviceType != null">
|
|
|
service_type,
|
|
|
</if>
|
|
|
<if test="apiName != null">
|
|
|
api_name,
|
|
|
</if>
|
|
|
<if test="apiUrl != null">
|
|
|
api_url,
|
|
|
</if>
|
|
|
<if test="apiData != null">
|
|
|
api_data,
|
|
|
</if>
|
|
|
<if test="apiToggle != null">
|
|
|
api_toggle,
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null">
|
|
|
api_req_method,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="serviceId != null">
|
|
|
#{serviceId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="serviceType != null">
|
|
|
#{serviceType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiName != null">
|
|
|
#{apiName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiUrl != null">
|
|
|
#{apiUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiData != null">
|
|
|
#{apiData,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiToggle != null">
|
|
|
#{apiToggle,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null">
|
|
|
#{apiReqMethod,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.model.JavaApiInfo">
|
|
|
update java_api_info
|
|
|
<set>
|
|
|
<if test="serviceType != null">
|
|
|
service_type = #{serviceType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiName != null">
|
|
|
api_name = #{apiName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiUrl != null">
|
|
|
api_url = #{apiUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiData != null">
|
|
|
api_data = #{apiData,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="apiToggle != null">
|
|
|
api_toggle = #{apiToggle,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="apiReqMethod != null">
|
|
|
api_req_method = #{apiReqMethod,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.model.JavaApiInfo">
|
|
|
update java_api_info
|
|
|
set service_type = #{serviceType,jdbcType=INTEGER},
|
|
|
api_name = #{apiName,jdbcType=VARCHAR},
|
...
|
...
|
@@ -115,11 +115,64 @@ |
|
|
where service_id = #{serviceId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectAllApi" resultMap="BaseResultMap" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from java_api_info
|
|
|
</select>
|
|
|
<select id="selectAllApi" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from java_api_info
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="selectCountByCodition" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|
|
|
from java_api_info
|
|
|
where
|
|
|
1=1
|
|
|
<if test="params.serviceType != null">
|
|
|
and service_type = #{params.serviceType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiName != null">
|
|
|
and api_name = #{params.apiName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiUrl != null">
|
|
|
and api_url = #{params.apiUrl,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiData != null">
|
|
|
and api_data = #{params.apiData,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiToggle != null">
|
|
|
and api_toggle = #{params.apiToggle,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiReqMethod != null">
|
|
|
and api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectJavaInfosByCodition" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from java_api_info
|
|
|
where
|
|
|
1=1
|
|
|
<if test="params.serviceType != null">
|
|
|
and service_type = #{params.serviceType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiName != null">
|
|
|
and api_name = #{params.apiName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiUrl != null">
|
|
|
and api_url = #{params.apiUrl,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiData != null">
|
|
|
and api_data = #{params.apiData,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="params.apiToggle != null">
|
|
|
and api_toggle = #{params.apiToggle,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="params.apiReqMethod != null">
|
|
|
and api_req_method = #{params.apiReqMethod,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
limit #{startIndex},#{pageSize}
|
|
|
</select>
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|