JavaApiInfoStaticsMapper.xml
2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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.JavaApiInfoStaticsMapper">
<resultMap id="BaseResultMap" type="com.model.JavaApiInfoStatics">
<result column="api_id" property="apiId" jdbcType="INTEGER"/>
<result column="mobj_id" property="mobjId" jdbcType="INTEGER"/>
<result column="is_exception" property="isException" jdbcType="TINYINT"/>
<result column="exception" property="exception" jdbcType="VARCHAR"/>
<result column="start_time" property="startTime" jdbcType="BIGINT"/>
<result column="end_time" property="endTime" jdbcType="BIGINT"/>
</resultMap>
<insert id="insert" parameterType="com.model.JavaApiInfoStatics">
insert into java_api_info_statics (api_id, mobj_id, is_exception, exception,start_time,end_time)
values (#{apiId,jdbcType=INTEGER}, #{mobjId,jdbcType=INTEGER}, #{isException,jdbcType=TINYINT},
#{exception,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.model.JavaApiInfoStatics">
insert into java_api_info_statics
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="apiId != null">
api_id,
</if>
<if test="mobjId != null">
mobj_id,
</if>
<if test="isException != null">
is_exception,
</if>
<if test="exception != null">
exception,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="apiId != null">
#{apiId,jdbcType=INTEGER},
</if>
<if test="mobjId != null">
#{mobjId,jdbcType=INTEGER},
</if>
<if test="isException != null">
#{isException,jdbcType=TINYINT},
</if>
<if test="exception != null">
#{exception,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<delete id="deleteAll">
delete from java_api_info_statics
</delete>
<select id="selectJavaApiStaticsByIds" resultMap="BaseResultMap">
select api_id, mobj_id, is_exception, exception,start_time,end_time from java_api_info_statics
where
<foreach collection="list" item="item" index="index" separator="or" open="(" close=")">
(api_id = #{item.serviceId} and mobj_id= #{item.mObjectId} )
</foreach>
</select>
</mapper>