|
@@ -0,0 +1,180 @@
|
|
|
+<?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.slibra.business.mapper.TXinyiForecastComparisonMapper">
|
|
|
+
|
|
|
+ <resultMap type="TXinyiForecastComparison" id="TXinyiForecastComparisonResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="category" column="category" />
|
|
|
+ <result property="forecastTimeOne" column="forecast_time_one" />
|
|
|
+ <result property="realOne" column="real_one" />
|
|
|
+ <result property="hsForecastOne" column="hs_forecast_one" />
|
|
|
+ <result property="hsErrorRateOne" column="hs_error_rate_one" />
|
|
|
+ <result property="yyForecastOne" column="yy_forecast_one" />
|
|
|
+ <result property="yyErrorRateOne" column="yy_error_rate_one" />
|
|
|
+ <result property="forecastTimeTwo" column="forecast_time_two" />
|
|
|
+ <result property="realTwo" column="real_two" />
|
|
|
+ <result property="hsForecastTwo" column="hs_forecast_two" />
|
|
|
+ <result property="hsErrorRateTwo" column="hs_error_rate_two" />
|
|
|
+ <result property="yyForecastTwo" column="yy_forecast_two" />
|
|
|
+ <result property="yyErrorRateTwo" column="yy_error_rate_two" />
|
|
|
+ <result property="forecastTimeThree" column="forecast_time_three" />
|
|
|
+ <result property="realThree" column="real_three" />
|
|
|
+ <result property="hsForecastThree" column="hs_forecast_three" />
|
|
|
+ <result property="hsErrorRateThree" column="hs_error_rate_three" />
|
|
|
+ <result property="yyForecastThree" column="yy_forecast_three" />
|
|
|
+ <result property="yyErrorRateThree" column="yy_error_rate_three" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="revision" column="revision" />
|
|
|
+ <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="selectTXinyiForecastComparisonVo">
|
|
|
+ select id, category, forecast_time_one, real_one, hs_forecast_one, hs_error_rate_one, yy_forecast_one, yy_error_rate_one, forecast_time_two, real_two, hs_forecast_two, hs_error_rate_two, yy_forecast_two, yy_error_rate_two, forecast_time_three, real_three, hs_forecast_three, hs_error_rate_three, yy_forecast_three, yy_error_rate_three, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_xinyi_forecast_comparison
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTXinyiForecastComparisonList" parameterType="TXinyiForecastComparison" resultMap="TXinyiForecastComparisonResult">
|
|
|
+ <include refid="selectTXinyiForecastComparisonVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="category != null and category != ''"> and category = #{category}</if>
|
|
|
+ <if test="forecastTimeOne != null and forecastTimeOne != ''"> and forecast_time_one = #{forecastTimeOne}</if>
|
|
|
+ <if test="realOne != null "> and real_one = #{realOne}</if>
|
|
|
+ <if test="hsForecastOne != null "> and hs_forecast_one = #{hsForecastOne}</if>
|
|
|
+ <if test="hsErrorRateOne != null "> and hs_error_rate_one = #{hsErrorRateOne}</if>
|
|
|
+ <if test="yyForecastOne != null "> and yy_forecast_one = #{yyForecastOne}</if>
|
|
|
+ <if test="yyErrorRateOne != null "> and yy_error_rate_one = #{yyErrorRateOne}</if>
|
|
|
+ <if test="forecastTimeTwo != null and forecastTimeTwo != ''"> and forecast_time_two = #{forecastTimeTwo}</if>
|
|
|
+ <if test="realTwo != null "> and real_two = #{realTwo}</if>
|
|
|
+ <if test="hsForecastTwo != null "> and hs_forecast_two = #{hsForecastTwo}</if>
|
|
|
+ <if test="hsErrorRateTwo != null "> and hs_error_rate_two = #{hsErrorRateTwo}</if>
|
|
|
+ <if test="yyForecastTwo != null "> and yy_forecast_two = #{yyForecastTwo}</if>
|
|
|
+ <if test="yyErrorRateTwo != null "> and yy_error_rate_two = #{yyErrorRateTwo}</if>
|
|
|
+ <if test="forecastTimeThree != null and forecastTimeThree != ''"> and forecast_time_three = #{forecastTimeThree}</if>
|
|
|
+ <if test="realThree != null "> and real_three = #{realThree}</if>
|
|
|
+ <if test="hsForecastThree != null "> and hs_forecast_three = #{hsForecastThree}</if>
|
|
|
+ <if test="hsErrorRateThree != null "> and hs_error_rate_three = #{hsErrorRateThree}</if>
|
|
|
+ <if test="yyForecastThree != null "> and yy_forecast_three = #{yyForecastThree}</if>
|
|
|
+ <if test="yyErrorRateThree != null "> and yy_error_rate_three = #{yyErrorRateThree}</if>
|
|
|
+ <if test="revision != null "> and revision = #{revision}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTXinyiForecastComparisonById" parameterType="Long" resultMap="TXinyiForecastComparisonResult">
|
|
|
+ <include refid="selectTXinyiForecastComparisonVo"/>
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTXinyiForecastComparison" parameterType="TXinyiForecastComparison" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_xinyi_forecast_comparison
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="category != null">category,</if>
|
|
|
+ <if test="forecastTimeOne != null">forecast_time_one,</if>
|
|
|
+ <if test="realOne != null">real_one,</if>
|
|
|
+ <if test="hsForecastOne != null">hs_forecast_one,</if>
|
|
|
+ <if test="hsErrorRateOne != null">hs_error_rate_one,</if>
|
|
|
+ <if test="yyForecastOne != null">yy_forecast_one,</if>
|
|
|
+ <if test="yyErrorRateOne != null">yy_error_rate_one,</if>
|
|
|
+ <if test="forecastTimeTwo != null">forecast_time_two,</if>
|
|
|
+ <if test="realTwo != null">real_two,</if>
|
|
|
+ <if test="hsForecastTwo != null">hs_forecast_two,</if>
|
|
|
+ <if test="hsErrorRateTwo != null">hs_error_rate_two,</if>
|
|
|
+ <if test="yyForecastTwo != null">yy_forecast_two,</if>
|
|
|
+ <if test="yyErrorRateTwo != null">yy_error_rate_two,</if>
|
|
|
+ <if test="forecastTimeThree != null">forecast_time_three,</if>
|
|
|
+ <if test="realThree != null">real_three,</if>
|
|
|
+ <if test="hsForecastThree != null">hs_forecast_three,</if>
|
|
|
+ <if test="hsErrorRateThree != null">hs_error_rate_three,</if>
|
|
|
+ <if test="yyForecastThree != null">yy_forecast_three,</if>
|
|
|
+ <if test="yyErrorRateThree != null">yy_error_rate_three,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="revision != null">revision,</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="category != null">#{category},</if>
|
|
|
+ <if test="forecastTimeOne != null">#{forecastTimeOne},</if>
|
|
|
+ <if test="realOne != null">#{realOne},</if>
|
|
|
+ <if test="hsForecastOne != null">#{hsForecastOne},</if>
|
|
|
+ <if test="hsErrorRateOne != null">#{hsErrorRateOne},</if>
|
|
|
+ <if test="yyForecastOne != null">#{yyForecastOne},</if>
|
|
|
+ <if test="yyErrorRateOne != null">#{yyErrorRateOne},</if>
|
|
|
+ <if test="forecastTimeTwo != null">#{forecastTimeTwo},</if>
|
|
|
+ <if test="realTwo != null">#{realTwo},</if>
|
|
|
+ <if test="hsForecastTwo != null">#{hsForecastTwo},</if>
|
|
|
+ <if test="hsErrorRateTwo != null">#{hsErrorRateTwo},</if>
|
|
|
+ <if test="yyForecastTwo != null">#{yyForecastTwo},</if>
|
|
|
+ <if test="yyErrorRateTwo != null">#{yyErrorRateTwo},</if>
|
|
|
+ <if test="forecastTimeThree != null">#{forecastTimeThree},</if>
|
|
|
+ <if test="realThree != null">#{realThree},</if>
|
|
|
+ <if test="hsForecastThree != null">#{hsForecastThree},</if>
|
|
|
+ <if test="hsErrorRateThree != null">#{hsErrorRateThree},</if>
|
|
|
+ <if test="yyForecastThree != null">#{yyForecastThree},</if>
|
|
|
+ <if test="yyErrorRateThree != null">#{yyErrorRateThree},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="revision != null">#{revision},</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="updateTXinyiForecastComparison" parameterType="TXinyiForecastComparison">
|
|
|
+ update t_xinyi_forecast_comparison
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="category != null">category = #{category},</if>
|
|
|
+ <if test="forecastTimeOne != null">forecast_time_one = #{forecastTimeOne},</if>
|
|
|
+ <if test="realOne != null">real_one = #{realOne},</if>
|
|
|
+ <if test="hsForecastOne != null">hs_forecast_one = #{hsForecastOne},</if>
|
|
|
+ <if test="hsErrorRateOne != null">hs_error_rate_one = #{hsErrorRateOne},</if>
|
|
|
+ <if test="yyForecastOne != null">yy_forecast_one = #{yyForecastOne},</if>
|
|
|
+ <if test="yyErrorRateOne != null">yy_error_rate_one = #{yyErrorRateOne},</if>
|
|
|
+ <if test="forecastTimeTwo != null">forecast_time_two = #{forecastTimeTwo},</if>
|
|
|
+ <if test="realTwo != null">real_two = #{realTwo},</if>
|
|
|
+ <if test="hsForecastTwo != null">hs_forecast_two = #{hsForecastTwo},</if>
|
|
|
+ <if test="hsErrorRateTwo != null">hs_error_rate_two = #{hsErrorRateTwo},</if>
|
|
|
+ <if test="yyForecastTwo != null">yy_forecast_two = #{yyForecastTwo},</if>
|
|
|
+ <if test="yyErrorRateTwo != null">yy_error_rate_two = #{yyErrorRateTwo},</if>
|
|
|
+ <if test="forecastTimeThree != null">forecast_time_three = #{forecastTimeThree},</if>
|
|
|
+ <if test="realThree != null">real_three = #{realThree},</if>
|
|
|
+ <if test="hsForecastThree != null">hs_forecast_three = #{hsForecastThree},</if>
|
|
|
+ <if test="hsErrorRateThree != null">hs_error_rate_three = #{hsErrorRateThree},</if>
|
|
|
+ <if test="yyForecastThree != null">yy_forecast_three = #{yyForecastThree},</if>
|
|
|
+ <if test="yyErrorRateThree != null">yy_error_rate_three = #{yyErrorRateThree},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="revision != null">revision = #{revision},</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>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiForecastComparisonById" parameterType="Long">
|
|
|
+ update t_xinyi_forecast_comparison set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiForecastComparisonByIds" parameterType="String">
|
|
|
+ update t_xinyi_forecast_comparison set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|