1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?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.predict.mapper.WtgTheorypowerDataMapper">
-
- <resultMap type="WtgTheorypowerData" id="WtgTheorypowerDataResult">
- <result property="wturNo" column="wtur_no" />
- <result property="dataTime" column="data_time" />
- <result property="theorypower" column="theorypower" />
- <result property="isLimit" column="is_limit" />
- <result property="wtgstate" column="wtgstate" />
- <result property="dataFlag" column="data_flag" />
- </resultMap>
- <sql id="selectWtgTheorypowerDataVo">
- select wtur_no, data_time, theorypower, is_limit, wtgstate, data_flag from wtg_theorypower_data
- </sql>
- <select id="selectWtgTheorypowerDataList" parameterType="WtgTheorypowerData" resultMap="WtgTheorypowerDataResult">
- <include refid="selectWtgTheorypowerDataVo"/>
- <where>
- <if test="wturNo != null ">and wtur_no = #{wturNo}</if>
- <if test="theorypower != null "> and theorypower = #{theorypower}</if>
- <if test="isLimit != null "> and is_limit = #{isLimit}</if>
- <if test="wtgstate != null "> and wtgstate = #{wtgstate}</if>
- <if test="dataFlag != null "> and data_flag = #{dataFlag}</if>
- <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
- and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
- to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
- </if>
- <if test="dataTime != null ">and data_time = #{dataTime}</if>
- </where>
- </select>
-
- <select id="selectWtgTheorypowerDataById" parameterType="Long" resultMap="WtgTheorypowerDataResult">
- <include refid="selectWtgTheorypowerDataVo"/>
- where wtur_no = #{wturNo}
- </select>
-
- <insert id="insertWtgTheorypowerData" parameterType="WtgTheorypowerData">
- <selectKey keyProperty="wturNo" resultType="long" order="BEFORE">
- SELECT seq_wtg_theorypower_data.NEXTVAL as wturNo FROM DUAL
- </selectKey>
- insert into wtg_theorypower_data
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="wturNo != null">wtur_no,</if>
- <if test="dataTime != null">data_time,</if>
- <if test="theorypower != null">theorypower,</if>
- <if test="isLimit != null">is_limit,</if>
- <if test="wtgstate != null">wtgstate,</if>
- <if test="dataFlag != null">data_flag,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="wturNo != null">#{wturNo},</if>
- <if test="dataTime != null">#{dataTime},</if>
- <if test="theorypower != null">#{theorypower},</if>
- <if test="isLimit != null">#{isLimit},</if>
- <if test="wtgstate != null">#{wtgstate},</if>
- <if test="dataFlag != null">#{dataFlag},</if>
- </trim>
- </insert>
- <update id="updateWtgTheorypowerData" parameterType="WtgTheorypowerData">
- update wtg_theorypower_data
- <trim prefix="SET" suffixOverrides=",">
- <if test="dataTime != null">data_time = #{dataTime},</if>
- <if test="theorypower != null">theorypower = #{theorypower},</if>
- <if test="isLimit != null">is_limit = #{isLimit},</if>
- <if test="wtgstate != null">wtgstate = #{wtgstate},</if>
- <if test="dataFlag != null">data_flag = #{dataFlag},</if>
- </trim>
- where wtur_no = #{wturNo}
- </update>
- <delete id="deleteWtgTheorypowerDataById" parameterType="Long">
- delete from wtg_theorypower_data where wtur_no = #{wturNo}
- </delete>
- <delete id="deleteWtgTheorypowerDataByIds" parameterType="String">
- delete from wtg_theorypower_data where wtur_no in
- <foreach item="wturNo" collection="array" open="(" separator="," close=")">
- #{wturNo}
- </foreach>
- </delete>
- </mapper>
|