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