<?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.qunzhixinxi.hnqz.admin.mapper.WmDaTrackMapper" >
	<resultMap id="BaseResultMap" type="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
		<id column="id" property="id" jdbcType="INTEGER" />
		<result column="trace_principal_name" property="tracePrincipalName" jdbcType="VARCHAR" />
		<result column="trace_object_name" property="traceObjectName" jdbcType="VARCHAR" />
		<result column="status" property="status" jdbcType="INTEGER" />
		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
		<result column="create_user" property="createUser" jdbcType="INTEGER" />
		<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
		<result column="update_user" property="updateUser" jdbcType="INTEGER" />
		<result column="project_id" property="projectId" jdbcType="BIGINT" />
		<result column="export1" property="export1" jdbcType="VARCHAR" />
		<result column="export2" property="export2" jdbcType="VARCHAR" />
		<result column="export3" property="export3" jdbcType="VARCHAR" />
	</resultMap>
	<sql id="Base_Column_List" >
    id, trace_principal_name, trace_object_name, status, create_time, create_user, update_time,
    update_user, project_id, export1, export2, export3
  </sql>
	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
		select
		<include refid="Base_Column_List" />
		from wm_da_track
		where id = #{id,jdbcType=INTEGER}
	</select>
	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from wm_da_track
    where id = #{id,jdbcType=INTEGER}
  </delete>
	<insert id="insert" parameterType="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
    insert into wm_da_track (id, trace_principal_name, trace_object_name,
      status, create_time, create_user,
      update_time, update_user, project_id,
      export1, export2, export3
      )
    values (#{id,jdbcType=INTEGER}, #{tracePrincipalName,jdbcType=VARCHAR}, #{traceObjectName,jdbcType=VARCHAR},
      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER},
      #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{projectId,jdbcType=BIGINT},
      #{export1,jdbcType=VARCHAR}, #{export2,jdbcType=VARCHAR}, #{export3,jdbcType=VARCHAR}
      )
  </insert>
	<insert id="insertSelective" parameterType="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
		insert into wm_da_track
		<trim prefix="(" suffix=")" suffixOverrides="," >
			<if test="id != null" >
				id,
			</if>
			<if test="tracePrincipalName != null" >
				trace_principal_name,
			</if>
			<if test="traceObjectName != null" >
				trace_object_name,
			</if>
			<if test="status != null" >
				status,
			</if>
			<if test="createTime != null" >
				create_time,
			</if>
			<if test="createUser != null" >
				create_user,
			</if>
			<if test="updateTime != null" >
				update_time,
			</if>
			<if test="updateUser != null" >
				update_user,
			</if>
			<if test="projectId != null" >
				project_id,
			</if>
			<if test="export1 != null" >
				export1,
			</if>
			<if test="export2 != null" >
				export2,
			</if>
			<if test="export3 != null" >
				export3,
			</if>
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides="," >
			<if test="id != null" >
				#{id,jdbcType=INTEGER},
			</if>
			<if test="tracePrincipalName != null" >
				#{tracePrincipalName,jdbcType=VARCHAR},
			</if>
			<if test="traceObjectName != null" >
				#{traceObjectName,jdbcType=VARCHAR},
			</if>
			<if test="status != null" >
				#{status,jdbcType=INTEGER},
			</if>
			<if test="createTime != null" >
				#{createTime,jdbcType=TIMESTAMP},
			</if>
			<if test="createUser != null" >
				#{createUser,jdbcType=INTEGER},
			</if>
			<if test="updateTime != null" >
				#{updateTime,jdbcType=TIMESTAMP},
			</if>
			<if test="updateUser != null" >
				#{updateUser,jdbcType=INTEGER},
			</if>
			<if test="projectId != null" >
				#{projectId,jdbcType=BIGINT},
			</if>
			<if test="export1 != null" >
				#{export1,jdbcType=VARCHAR},
			</if>
			<if test="export2 != null" >
				#{export2,jdbcType=VARCHAR},
			</if>
			<if test="export3 != null" >
				#{export3,jdbcType=VARCHAR},
			</if>
		</trim>
	</insert>
	<update id="updateByPrimaryKeySelective" parameterType="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
		update wm_da_track
		<set >
			<if test="tracePrincipalName != null" >
				trace_principal_name = #{tracePrincipalName,jdbcType=VARCHAR},
			</if>
			<if test="traceObjectName != null" >
				trace_object_name = #{traceObjectName,jdbcType=VARCHAR},
			</if>
			<if test="status != null" >
				status = #{status,jdbcType=INTEGER},
			</if>
			<if test="createTime != null" >
				create_time = #{createTime,jdbcType=TIMESTAMP},
			</if>
			<if test="createUser != null" >
				create_user = #{createUser,jdbcType=INTEGER},
			</if>
			<if test="updateTime != null" >
				update_time = #{updateTime,jdbcType=TIMESTAMP},
			</if>
			<if test="updateUser != null" >
				update_user = #{updateUser,jdbcType=INTEGER},
			</if>
			<if test="projectId != null" >
				project_id = #{projectId,jdbcType=BIGINT},
			</if>
			<if test="export1 != null" >
				export1 = #{export1,jdbcType=VARCHAR},
			</if>
			<if test="export2 != null" >
				export2 = #{export2,jdbcType=VARCHAR},
			</if>
			<if test="export3 != null" >
				export3 = #{export3,jdbcType=VARCHAR},
			</if>
		</set>
		where id = #{id,jdbcType=INTEGER}
	</update>
	<update id="updateByPrimaryKey" parameterType="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
    update wm_da_track
    set trace_principal_name = #{tracePrincipalName,jdbcType=VARCHAR},
      trace_object_name = #{traceObjectName,jdbcType=VARCHAR},
      status = #{status,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user = #{createUser,jdbcType=INTEGER},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user = #{updateUser,jdbcType=INTEGER},
      project_id = #{projectId,jdbcType=BIGINT},
      export1 = #{export1,jdbcType=VARCHAR},
      export2 = #{export2,jdbcType=VARCHAR},
      export3 = #{export3,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>

	<select id="listWmDaTrack" resultMap="BaseResultMap" parameterType="com.qunzhixinxi.hnqz.admin.entity.WmDaTrack" >
		select
		<include refid="Base_Column_List" />
		from wm_da_track
		where 1 =1
		<if test="id != null">
			and id = #{id,jdbcType=INTEGER}
		</if>
		<if test="tracePrincipalName != null and tracePrincipalName != '' " >
			and	trace_principal_name = #{tracePrincipalName,jdbcType=VARCHAR}
		</if>
		<if test="traceObjectName != null and traceObjectName != ''" >
			and	trace_object_name = #{traceObjectName,jdbcType=VARCHAR}
		</if>
		<if test="status != null" >
			and	status = #{status,jdbcType=INTEGER}
		</if>
		<if test="createTime != null" >
			and	create_time = #{createTime,jdbcType=TIMESTAMP}
		</if>
		<if test="createUser != null" >
			and	create_user = #{createUser,jdbcType=INTEGER}
		</if>
		<if test="updateTime != null" >
			and	update_time = #{updateTime,jdbcType=TIMESTAMP}
		</if>
		<if test="updateUser != null" >
			and	update_user = #{updateUser,jdbcType=INTEGER}
		</if>
		<if test="projectId != null" >
			and	project_id = #{projectId,jdbcType=BIGINT}
		</if>
		<if test="export1 != null" >
			and	export1 = #{export1,jdbcType=VARCHAR}
		</if>
		<if test="export2 != null" >
			and	export2 = #{export2,jdbcType=VARCHAR}
		</if>
		<if test="export3 != null" >
			and	export3 = #{export3,jdbcType=VARCHAR}
		</if>
	</select>


	<delete id="deleteByProjectId" parameterType="java.lang.Long" >
    delete from wm_da_track
    where project_id = #{projectId,jdbcType=BIGINT}
  </delete>

</mapper>