|
@@ -0,0 +1,175 @@
|
|
|
+<?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.meas.system.mapper.MeasSpectralRadiationRadianceMapper">
|
|
|
+
|
|
|
+ <resultMap type="MeasSpectralRadiationRadiance" id="MeasSpectralRadiationRadianceResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="measurementBatchId" column="measurement_batch_id"/>
|
|
|
+ <result property="model" column="model"/>
|
|
|
+ <result property="lensFView" column="lens_f_view"/>
|
|
|
+ <result property="gain" column="gain"/>
|
|
|
+ <result property="calTemp" column="cal_temp"/>
|
|
|
+ <result property="calCurve" column="cal_curve"/>
|
|
|
+ <result property="calCurve2" column="cal_curve2"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectMeasSpectralRadiationRadianceVo">
|
|
|
+ select id, measurement_batch_id, model, lens_f_view, gain, cal_temp, cal_curve, cal_curve2, create_by, create_time, update_by, update_time
|
|
|
+ from meas_spectral_radiation_radiance
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMeasSpectralRadiationRadianceList" parameterType="MeasSpectralRadiationRadiance" resultMap="MeasSpectralRadiationRadianceResult">
|
|
|
+ <include refid="selectMeasSpectralRadiationRadianceVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="model != null and model != ''">
|
|
|
+ and model = #{model}
|
|
|
+ </if>
|
|
|
+ <if test="lensFView != null ">
|
|
|
+ and lens_f_view = #{lensFView}
|
|
|
+ </if>
|
|
|
+ <if test="gain != null ">
|
|
|
+ and gain = #{gain}
|
|
|
+ </if>
|
|
|
+ <if test="calTemp != null and calTemp != ''">
|
|
|
+ and cal_temp = #{calTemp}
|
|
|
+ </if>
|
|
|
+ <if test="calCurve != null and calCurve != ''">
|
|
|
+ and cal_curve = #{calCurve}
|
|
|
+ </if>
|
|
|
+ <if test="calCurve2 != null and calCurve2 != ''">
|
|
|
+ and cal_curve2 = #{calCurve2}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMeasSpectralRadiationRadianceById" parameterType="Long"
|
|
|
+ resultMap="MeasSpectralRadiationRadianceResult">
|
|
|
+ <include refid="selectMeasSpectralRadiationRadianceVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMeasSpectralRadiationRadiance" parameterType="MeasSpectralRadiationRadiance" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into meas_spectral_radiation_radiance
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,
|
|
|
+ </if>
|
|
|
+ <if test="measurementBatchId != null">measurement_batch_id,
|
|
|
+ </if>
|
|
|
+ <if test="model != null and model != ''">model,
|
|
|
+ </if>
|
|
|
+ <if test="lensFView != null">lens_f_view,
|
|
|
+ </if>
|
|
|
+ <if test="gain != null">gain,
|
|
|
+ </if>
|
|
|
+ <if test="calTemp != null">cal_temp,
|
|
|
+ </if>
|
|
|
+ <if test="calCurve != null">cal_curve,
|
|
|
+ </if>
|
|
|
+ <if test="calCurve2 != null">cal_curve2,
|
|
|
+ </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>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},
|
|
|
+ </if>
|
|
|
+ <if test="measurementBatchId != null">#{measurementBatchId},
|
|
|
+ </if>
|
|
|
+ <if test="model != null and model != ''">#{model},
|
|
|
+ </if>
|
|
|
+ <if test="lensFView != null">#{lensFView},
|
|
|
+ </if>
|
|
|
+ <if test="gain != null">#{gain},
|
|
|
+ </if>
|
|
|
+ <if test="calTemp != null">#{calTemp},
|
|
|
+ </if>
|
|
|
+ <if test="calCurve != null">#{calCurve},
|
|
|
+ </if>
|
|
|
+ <if test="calCurve2 != null">#{calCurve2},
|
|
|
+ </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>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateMeasSpectralRadiationRadiance" parameterType="MeasSpectralRadiationRadiance">
|
|
|
+ update meas_spectral_radiation_radiance
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="measurementBatchId != null">measurement_batch_id =
|
|
|
+ #{measurementBatchId},
|
|
|
+ </if>
|
|
|
+ <if test="model != null and model != ''">model =
|
|
|
+ #{model},
|
|
|
+ </if>
|
|
|
+ <if test="lensFView != null">lens_f_view =
|
|
|
+ #{lensFView},
|
|
|
+ </if>
|
|
|
+ <if test="gain != null">gain =
|
|
|
+ #{gain},
|
|
|
+ </if>
|
|
|
+ <if test="calTemp != null">cal_temp =
|
|
|
+ #{calTemp},
|
|
|
+ </if>
|
|
|
+ <if test="calCurve != null">cal_curve =
|
|
|
+ #{calCurve},
|
|
|
+ </if>
|
|
|
+ <if test="calCurve2 != null">cal_curve2 =
|
|
|
+ #{calCurve2},
|
|
|
+ </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>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMeasSpectralRadiationRadianceById" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from meas_spectral_radiation_radiance where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMeasSpectralRadiationRadianceByIds" parameterType="String">
|
|
|
+ delete from meas_spectral_radiation_radiance where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="getInfoByCondition" parameterType="MeasSpectralRadiationRadiance"
|
|
|
+ resultMap="MeasSpectralRadiationRadianceResult">
|
|
|
+ <include refid="selectMeasSpectralRadiationRadianceVo"/>
|
|
|
+ WHERE
|
|
|
+ measurement_batch_id = #{measurementBatchId}
|
|
|
+ AND model = #{model}
|
|
|
+ AND lens_f_view = #{lensFView}
|
|
|
+ AND gain = #{gain}
|
|
|
+ LIMIT 1
|
|
|
+ </select>
|
|
|
+</mapper>
|