CellDataSourceMapper.xml 12.9 KB
Newer Older
1 2 3
<?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.CellDataSourceMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.CellDataSource">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
9 10 11 12 13 14 15 16 17
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" />
    <result column="cell_data_id" jdbcType="BIGINT" property="cellDataId" />
    <result column="data_source_id" jdbcType="BIGINT" property="dataSourceId" />
    <result column="operation_type" jdbcType="INTEGER" property="operationType" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
    <result column="period" jdbcType="INTEGER" property="period" />
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
  </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>
46
            </foreach>
47
          </trim>
48
        </if>
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
      </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>
81
        </if>
82 83 84 85 86 87 88 89
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
90 91
    id, cell_template_id, cell_data_id, data_source_id, operation_type, create_time, 
    update_time, project_id, period
92 93 94 95 96 97 98 99 100 101 102
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.CellDataSourceExample" 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" />
103
    from cell_data_source
104 105 106 107 108 109 110 111 112 113 114 115 116 117
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
118 119
    from cell_data_source
    where id = #{id,jdbcType=BIGINT}
120 121 122 123 124 125
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
126 127
    delete from cell_data_source
    where id = #{id,jdbcType=BIGINT}
128 129 130 131 132 133
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.CellDataSourceExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
134
    delete from cell_data_source
135 136 137 138 139 140 141 142 143
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.CellDataSource">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
144 145 146 147 148 149 150 151
    insert into cell_data_source (id, cell_template_id, cell_data_id, 
      data_source_id, operation_type, create_time, 
      update_time, project_id, period
      )
    values (#{id,jdbcType=BIGINT}, #{cellTemplateId,jdbcType=BIGINT}, #{cellDataId,jdbcType=BIGINT}, 
      #{dataSourceId,jdbcType=BIGINT}, #{operationType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}
      )
152 153 154 155 156 157
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.CellDataSource">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
158
    insert into cell_data_source
159 160
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
161
        id,
162 163
      </if>
      <if test="cellTemplateId != null">
164
        cell_template_id,
165 166
      </if>
      <if test="cellDataId != null">
167
        cell_data_id,
168 169
      </if>
      <if test="dataSourceId != null">
170
        data_source_id,
171 172
      </if>
      <if test="operationType != null">
173
        operation_type,
174 175
      </if>
      <if test="createTime != null">
176
        create_time,
177 178
      </if>
      <if test="updateTime != null">
179 180 181 182 183 184 185
        update_time,
      </if>
      <if test="projectId != null">
        project_id,
      </if>
      <if test="period != null">
        period,
186 187 188 189
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
190
        #{id,jdbcType=BIGINT},
191 192
      </if>
      <if test="cellTemplateId != null">
193
        #{cellTemplateId,jdbcType=BIGINT},
194 195
      </if>
      <if test="cellDataId != null">
196
        #{cellDataId,jdbcType=BIGINT},
197 198
      </if>
      <if test="dataSourceId != null">
199
        #{dataSourceId,jdbcType=BIGINT},
200 201
      </if>
      <if test="operationType != null">
202
        #{operationType,jdbcType=INTEGER},
203 204 205 206 207 208 209
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
210 211 212 213 214 215
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        #{period,jdbcType=INTEGER},
      </if>
216 217 218 219 220 221 222
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.CellDataSourceExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
223
    select count(*) from cell_data_source
224 225 226 227 228 229 230 231 232
    <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.
    -->
233
    update cell_data_source
234 235
    <set>
      <if test="record.id != null">
236
        id = #{record.id,jdbcType=BIGINT},
237 238
      </if>
      <if test="record.cellTemplateId != null">
239
        cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
240 241
      </if>
      <if test="record.cellDataId != null">
242
        cell_data_id = #{record.cellDataId,jdbcType=BIGINT},
243 244
      </if>
      <if test="record.dataSourceId != null">
245
        data_source_id = #{record.dataSourceId,jdbcType=BIGINT},
246 247
      </if>
      <if test="record.operationType != null">
248
        operation_type = #{record.operationType,jdbcType=INTEGER},
249 250
      </if>
      <if test="record.createTime != null">
251
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
252 253
      </if>
      <if test="record.updateTime != null">
254 255 256 257 258 259 260
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.projectId != null">
        project_id = #{record.projectId,jdbcType=VARCHAR},
      </if>
      <if test="record.period != null">
        period = #{record.period,jdbcType=INTEGER},
261 262 263 264 265 266 267 268 269 270 271
      </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.
    -->
272 273 274 275 276 277 278 279 280 281
    update cell_data_source
    set id = #{record.id,jdbcType=BIGINT},
      cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
      cell_data_id = #{record.cellDataId,jdbcType=BIGINT},
      data_source_id = #{record.dataSourceId,jdbcType=BIGINT},
      operation_type = #{record.operationType,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      project_id = #{record.projectId,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER}
282 283 284 285 286 287 288 289 290
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.CellDataSource">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
291
    update cell_data_source
292 293
    <set>
      <if test="cellTemplateId != null">
294
        cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
295 296
      </if>
      <if test="cellDataId != null">
297
        cell_data_id = #{cellDataId,jdbcType=BIGINT},
298 299
      </if>
      <if test="dataSourceId != null">
300
        data_source_id = #{dataSourceId,jdbcType=BIGINT},
301 302
      </if>
      <if test="operationType != null">
303
        operation_type = #{operationType,jdbcType=INTEGER},
304 305
      </if>
      <if test="createTime != null">
306
        create_time = #{createTime,jdbcType=TIMESTAMP},
307 308
      </if>
      <if test="updateTime != null">
309 310 311 312 313 314 315
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="projectId != null">
        project_id = #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        period = #{period,jdbcType=INTEGER},
316 317
      </if>
    </set>
318
    where id = #{id,jdbcType=BIGINT}
319 320 321 322 323 324
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.CellDataSource">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
325 326 327 328 329 330 331 332 333 334
    update cell_data_source
    set cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
      cell_data_id = #{cellDataId,jdbcType=BIGINT},
      data_source_id = #{dataSourceId,jdbcType=BIGINT},
      operation_type = #{operationType,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      project_id = #{projectId,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
335 336 337 338 339 340 341 342 343 344 345
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.CellDataSourceExample" 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" />
346
    from cell_data_source
347 348 349 350 351 352 353
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
354
</mapper>