<?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.aps.core.mapper.ApsGasPipelinePredictionMapper">
|
|
<resultMap type="com.aps.core.domain.ApsGasPipelinePrediction" id="ApsGasPipelinePredictionResult">
|
<result property="id" column="id" />
|
<result property="factory" column="factory" />
|
<result property="materialCode" column="material_code" />
|
<result property="predictDate" column="predict_date" />
|
<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="predictQuantity" column="predict_quantity" />
|
</resultMap>
|
|
<sql id="selectApsGasPipelinePredictionVo">
|
select id, factory, material_code, predict_date, create_by, create_time, update_by, update_time, predict_quantity from aps_gas_pipeline_prediction
|
</sql>
|
|
<select id="selectApsGasPipelinePredictionList" parameterType="ApsGasPipelinePrediction" resultMap="ApsGasPipelinePredictionResult">
|
<include refid="selectApsGasPipelinePredictionVo"/>
|
<where>
|
<if test="factory != null and factory != ''"> and factory = #{factory}</if>
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
<if test="predictDate != null and predictDate != ''"> and predict_date = #{predictDate}</if>
|
<if test="predictQuantity != null and predictQuantity != ''"> and predict_quantity = #{predictQuantity}</if>
|
</where>
|
order by create_time desc
|
</select>
|
|
<select id="selectApsGasPipelinePredictionById" parameterType="Long" resultMap="ApsGasPipelinePredictionResult">
|
</select>
|
|
<insert id="insertApsGasPipelinePrediction" parameterType="ApsGasPipelinePrediction">
|
insert into aps_gas_pipeline_prediction
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="factory != null">factory,</if>
|
<if test="materialCode != null">material_code,</if>
|
<if test="predictDate != null">predict_date,</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="predictQuantity != null">predict_quantity,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="factory != null">#{factory},</if>
|
<if test="materialCode != null">#{materialCode},</if>
|
<if test="predictDate != null">#{predictDate},</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="predictQuantity != null">#{predictQuantity},</if>
|
</trim>
|
</insert>
|
|
<update id="updateApsGasPipelinePrediction" parameterType="ApsGasPipelinePrediction">
|
update aps_gas_pipeline_prediction
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="factory != null">factory = #{factory},</if>
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
<if test="predictDate != null">predict_date = #{predictDate},</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="predictQuantity != null">predict_quantity = #{predictQuantity},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteApsGasPipelinePredictionById" parameterType="Long">
|
delete from aps_gas_pipeline_prediction where id = #{id}
|
</delete>
|
|
<delete id="deleteApsGasPipelinePredictionByIds" parameterType="String">
|
delete from aps_gas_pipeline_prediction where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<delete id="deleteAll" >
|
delete from aps_gas_pipeline_prediction
|
</delete>
|
</mapper>
|