DataSourceDetailMapper.xml 9.86 KB
Newer Older
frank.xa.zhang's avatar
frank.xa.zhang committed
1 2 3 4 5 6 7 8
<?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="pwc.taxtech.atms.vat.dao.DataSourceDetailMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.DataSourceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
9 10 11 12
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="data_source_id" jdbcType="BIGINT" property="dataSourceId" />
    <result column="data_source_type" jdbcType="INTEGER" property="dataSourceType" />
    <result column="item_value" jdbcType="VARCHAR" property="itemValue" />
frank.xa.zhang's avatar
frank.xa.zhang committed
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
85
    id, data_source_id, data_source_type, item_value
frank.xa.zhang's avatar
frank.xa.zhang committed
86 87 88 89 90 91 92 93 94 95 96
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
97
    from data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
98 99 100 101 102 103 104
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
105
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
frank.xa.zhang's avatar
frank.xa.zhang committed
106 107 108 109 110 111
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
112 113
    from data_source_detail
    where id = #{id,jdbcType=BIGINT}
frank.xa.zhang's avatar
frank.xa.zhang committed
114
  </select>
115
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
frank.xa.zhang's avatar
frank.xa.zhang committed
116 117 118 119
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
120 121
    delete from data_source_detail
    where id = #{id,jdbcType=BIGINT}
frank.xa.zhang's avatar
frank.xa.zhang committed
122 123 124 125 126 127
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
128
    delete from data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
129 130 131 132 133 134 135 136 137
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
138 139 140
    insert into data_source_detail (id, data_source_id, data_source_type, 
      item_value)
    values (#{id,jdbcType=BIGINT}, #{dataSourceId,jdbcType=BIGINT}, #{dataSourceType,jdbcType=INTEGER}, 
frank.xa.zhang's avatar
frank.xa.zhang committed
141 142 143 144 145 146 147
      #{itemValue,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
148
    insert into data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
149
    <trim prefix="(" suffix=")" suffixOverrides=",">
150 151
      <if test="id != null">
        id,
frank.xa.zhang's avatar
frank.xa.zhang committed
152
      </if>
153 154
      <if test="dataSourceId != null">
        data_source_id,
frank.xa.zhang's avatar
frank.xa.zhang committed
155 156
      </if>
      <if test="dataSourceType != null">
157
        data_source_type,
frank.xa.zhang's avatar
frank.xa.zhang committed
158 159
      </if>
      <if test="itemValue != null">
160
        item_value,
frank.xa.zhang's avatar
frank.xa.zhang committed
161 162 163
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
164 165
      <if test="id != null">
        #{id,jdbcType=BIGINT},
frank.xa.zhang's avatar
frank.xa.zhang committed
166
      </if>
167 168
      <if test="dataSourceId != null">
        #{dataSourceId,jdbcType=BIGINT},
frank.xa.zhang's avatar
frank.xa.zhang committed
169 170 171 172 173 174 175 176 177 178 179 180 181 182
      </if>
      <if test="dataSourceType != null">
        #{dataSourceType,jdbcType=INTEGER},
      </if>
      <if test="itemValue != null">
        #{itemValue,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
183
    select count(*) from data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
184 185 186 187 188 189 190 191 192
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
193
    update data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
194
    <set>
195 196
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
frank.xa.zhang's avatar
frank.xa.zhang committed
197
      </if>
198 199
      <if test="record.dataSourceId != null">
        data_source_id = #{record.dataSourceId,jdbcType=BIGINT},
frank.xa.zhang's avatar
frank.xa.zhang committed
200 201
      </if>
      <if test="record.dataSourceType != null">
202
        data_source_type = #{record.dataSourceType,jdbcType=INTEGER},
frank.xa.zhang's avatar
frank.xa.zhang committed
203 204
      </if>
      <if test="record.itemValue != null">
205
        item_value = #{record.itemValue,jdbcType=VARCHAR},
frank.xa.zhang's avatar
frank.xa.zhang committed
206 207 208 209 210 211 212 213 214 215 216
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
217 218 219 220 221
    update data_source_detail
    set id = #{record.id,jdbcType=BIGINT},
      data_source_id = #{record.dataSourceId,jdbcType=BIGINT},
      data_source_type = #{record.dataSourceType,jdbcType=INTEGER},
      item_value = #{record.itemValue,jdbcType=VARCHAR}
frank.xa.zhang's avatar
frank.xa.zhang committed
222 223 224 225 226 227 228 229 230
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
231
    update data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
232
    <set>
233 234
      <if test="dataSourceId != null">
        data_source_id = #{dataSourceId,jdbcType=BIGINT},
frank.xa.zhang's avatar
frank.xa.zhang committed
235 236
      </if>
      <if test="dataSourceType != null">
237
        data_source_type = #{dataSourceType,jdbcType=INTEGER},
frank.xa.zhang's avatar
frank.xa.zhang committed
238 239
      </if>
      <if test="itemValue != null">
240
        item_value = #{itemValue,jdbcType=VARCHAR},
frank.xa.zhang's avatar
frank.xa.zhang committed
241 242
      </if>
    </set>
243
    where id = #{id,jdbcType=BIGINT}
frank.xa.zhang's avatar
frank.xa.zhang committed
244 245 246 247 248 249
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
250 251 252 253 254
    update data_source_detail
    set data_source_id = #{dataSourceId,jdbcType=BIGINT},
      data_source_type = #{dataSourceType,jdbcType=INTEGER},
      item_value = #{itemValue,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
frank.xa.zhang's avatar
frank.xa.zhang committed
255 256 257 258 259 260 261 262 263 264 265
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.DataSourceDetailExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
266
    from data_source_detail
frank.xa.zhang's avatar
frank.xa.zhang committed
267 268 269 270 271 272 273 274
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>