|
@@ -0,0 +1,106 @@
|
|
|
+<?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.zdqz.data.mapper.DateReportBytMapper">
|
|
|
+
|
|
|
+ <resultMap type="DateReportByt" id="DateReportBytResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="assemblyAccession" column="assembly_accession" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="reportDate" column="report_date" />
|
|
|
+ <result property="areaType" column="area_type" />
|
|
|
+ <result property="areaId" column="area_id" />
|
|
|
+ <result property="areaName" column="area_name" />
|
|
|
+ <result property="num" column="num" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectDateReportBytVo">
|
|
|
+ select id, assembly_accession, name, report_date, area_type, area_id, area_name, num, create_by, create_time, update_by, update_time, remark from date_report_byt
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectDateReportBytList" parameterType="DateReportByt" resultMap="DateReportBytResult">
|
|
|
+ <include refid="selectDateReportBytVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="assemblyAccession != null and assemblyAccession != ''"> and assembly_accession = #{assemblyAccession}</if>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="reportDate != null "> and report_date = #{reportDate}</if>
|
|
|
+ <if test="areaType != null "> and area_type = #{areaType}</if>
|
|
|
+ <if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
|
|
|
+ <if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
|
|
+ <if test="num != null "> and num = #{num}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectDateReportBytById" parameterType="Long" resultMap="DateReportBytResult">
|
|
|
+ <include refid="selectDateReportBytVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertDateReportByt" parameterType="DateReportByt" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into date_report_byt
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="assemblyAccession != null">assembly_accession,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="reportDate != null">report_date,</if>
|
|
|
+ <if test="areaType != null">area_type,</if>
|
|
|
+ <if test="areaId != null">area_id,</if>
|
|
|
+ <if test="areaName != null">area_name,</if>
|
|
|
+ <if test="num != null">num,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="assemblyAccession != null">#{assemblyAccession},</if>
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="reportDate != null">#{reportDate},</if>
|
|
|
+ <if test="areaType != null">#{areaType},</if>
|
|
|
+ <if test="areaId != null">#{areaId},</if>
|
|
|
+ <if test="areaName != null">#{areaName},</if>
|
|
|
+ <if test="num != null">#{num},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateDateReportByt" parameterType="DateReportByt">
|
|
|
+ update date_report_byt
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="assemblyAccession != null">assembly_accession = #{assemblyAccession},</if>
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="reportDate != null">report_date = #{reportDate},</if>
|
|
|
+ <if test="areaType != null">area_type = #{areaType},</if>
|
|
|
+ <if test="areaId != null">area_id = #{areaId},</if>
|
|
|
+ <if test="areaName != null">area_name = #{areaName},</if>
|
|
|
+ <if test="num != null">num = #{num},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteDateReportBytById" parameterType="Long">
|
|
|
+ delete from date_report_byt where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteDateReportBytByIds" parameterType="String">
|
|
|
+ delete from date_report_byt where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|