| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?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.ruoyi.biz.mapper.TwinCalcHourEnergyMapper">
-
- <resultMap type="TwinCalcHourEnergy" id="TwinCalcHourEnergyResult">
- <result property="autoId" column="AUTO_ID" />
- <result property="dataDate" column="DATA_DATE" />
- <result property="hour" column="HOUR" />
- <result property="energyId" column="ENERGY_ID" />
- <result property="dataValue" column="DATA_VALUE" />
- <result property="remark" column="REMARK" />
- </resultMap>
- <sql id="selectTwinCalcHourEnergyVo">
- select AUTO_ID, DATA_DATE, HOUR, ENERGY_ID, DATA_VALUE, REMARK from twin_calc_hour_energy
- </sql>
- <select id="selectTwinCalcHourEnergyList" parameterType="TwinCalcHourEnergy" resultMap="TwinCalcHourEnergyResult">
- <include refid="selectTwinCalcHourEnergyVo"/>
- <where>
- <if test="dataDate != null "> and DATA_DATE = #{dataDate}</if>
- <if test="hour != null "> and HOUR = #{hour}</if>
- <if test="energyId != null "> and ENERGY_ID = #{energyId}</if>
- <if test="dataValue != null "> and DATA_VALUE = #{dataValue}</if>
- <if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
- </where>
- </select>
-
- <select id="selectTwinCalcHourEnergyByAutoId" parameterType="Long" resultMap="TwinCalcHourEnergyResult">
- <include refid="selectTwinCalcHourEnergyVo"/>
- where AUTO_ID = #{autoId}
- </select>
-
- <insert id="insertTwinCalcHourEnergy" parameterType="TwinCalcHourEnergy" useGeneratedKeys="true" keyProperty="autoId">
- insert into twin_calc_hour_energy
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dataDate != null">DATA_DATE,</if>
- <if test="hour != null">HOUR,</if>
- <if test="energyId != null">ENERGY_ID,</if>
- <if test="dataValue != null">DATA_VALUE,</if>
- <if test="remark != null">REMARK,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dataDate != null">#{dataDate},</if>
- <if test="hour != null">#{hour},</if>
- <if test="energyId != null">#{energyId},</if>
- <if test="dataValue != null">#{dataValue},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateTwinCalcHourEnergy" parameterType="TwinCalcHourEnergy">
- update twin_calc_hour_energy
- <trim prefix="SET" suffixOverrides=",">
- <if test="dataDate != null">DATA_DATE = #{dataDate},</if>
- <if test="hour != null">HOUR = #{hour},</if>
- <if test="energyId != null">ENERGY_ID = #{energyId},</if>
- <if test="dataValue != null">DATA_VALUE = #{dataValue},</if>
- <if test="remark != null">REMARK = #{remark},</if>
- </trim>
- where AUTO_ID = #{autoId}
- </update>
- <delete id="deleteTwinCalcHourEnergyByAutoId" parameterType="Long">
- delete from twin_calc_hour_energy where AUTO_ID = #{autoId}
- </delete>
- <delete id="deleteTwinCalcHourEnergyByAutoIds" parameterType="String">
- delete from twin_calc_hour_energy where AUTO_ID in
- <foreach item="autoId" collection="array" open="(" separator="," close=")">
- #{autoId}
- </foreach>
- </delete>
- </mapper>
|