dataease-dm/backend/src/main/java/io/dataease/base/mapper/TestCaseReviewTestCaseMapper.xml
2021-02-20 10:23:37 +08:00

259 lines
9.5 KiB
XML

<?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="io.dataease.base.mapper.TestCaseReviewTestCaseMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.TestCaseReviewTestCase">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="review_id" jdbcType="VARCHAR" property="reviewId" />
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="result" jdbcType="VARCHAR" property="result" />
<result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<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">
<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">
id, review_id, case_id, `status`, `result`, reviewer, create_time, update_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.TestCaseReviewTestCaseExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_review_test_case
<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">
select
<include refid="Base_Column_List" />
from test_case_review_test_case
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_case_review_test_case
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.TestCaseReviewTestCaseExample">
delete from test_case_review_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.TestCaseReviewTestCase">
insert into test_case_review_test_case (id, review_id, case_id,
`status`, `result`, reviewer,
create_time, update_time)
values (#{id,jdbcType=VARCHAR}, #{reviewId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{reviewer,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.TestCaseReviewTestCase">
insert into test_case_review_test_case
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="reviewId != null">
review_id,
</if>
<if test="caseId != null">
case_id,
</if>
<if test="status != null">
`status`,
</if>
<if test="result != null">
`result`,
</if>
<if test="reviewer != null">
reviewer,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="caseId != null">
#{caseId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="result != null">
#{result,jdbcType=VARCHAR},
</if>
<if test="reviewer != null">
#{reviewer,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.TestCaseReviewTestCaseExample" resultType="java.lang.Long">
select count(*) from test_case_review_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review_test_case
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.caseId != null">
case_id = #{record.caseId,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.result != null">
`result` = #{record.result,jdbcType=VARCHAR},
</if>
<if test="record.reviewer != null">
reviewer = #{record.reviewer,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review_test_case
set id = #{record.id,jdbcType=VARCHAR},
review_id = #{record.reviewId,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
`result` = #{record.result,jdbcType=VARCHAR},
reviewer = #{record.reviewer,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.TestCaseReviewTestCase">
update test_case_review_test_case
<set>
<if test="reviewId != null">
review_id = #{reviewId,jdbcType=VARCHAR},
</if>
<if test="caseId != null">
case_id = #{caseId,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="result != null">
`result` = #{result,jdbcType=VARCHAR},
</if>
<if test="reviewer != null">
reviewer = #{reviewer,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.TestCaseReviewTestCase">
update test_case_review_test_case
set review_id = #{reviewId,jdbcType=VARCHAR},
case_id = #{caseId,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
`result` = #{result,jdbcType=VARCHAR},
reviewer = #{reviewer,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>