| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?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.system.mapper.SchemeExplorationMapper">
-
- <resultMap type="SchemeExploration" id="SchemeExplorationResult">
- <id property="id" column="id"/>
- <result property="explorationData" column="exploration_data"/>
- <result property="explorationType" column="exploration_type"/>
- <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="selectSchemeExplorationVo">
- select id, exploration_data, exploration_type, create_by, create_time, update_by, update_time
- from scheme_exploration
- </sql>
-
- <select id="selectSchemeExplorationList" parameterType="SchemeExploration" resultMap="SchemeExplorationResult">
- <include refid="selectSchemeExplorationVo"/>
- <where>
- <if test="userId != null and userId != ''">
- AND user_id = #{userId}
- </if>
- <if test="params.beginTime != null and params.beginTime != ''">
- and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
- </if>
- <if test="params.endTime != null and params.endTime != ''">
- and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
- </if>
- </where>
- </select>
-
- <select id="selectSchemeExplorationById" parameterType="Long" resultMap="SchemeExplorationResult">
- <include refid="selectSchemeExplorationVo"/>
- where create_by = #{createBy}
- </select>
-
- <insert id="insertSchemeExploration" parameterType="SchemeExploration">
- insert into scheme_exploration (
- <if test="explorationData != null">exploration_data,</if>
- <if test="explorationType != null">exploration_type,</if>
- <if test="createBy != null">create_by,</if>
- create_time
- )values(
- <if test="explorationData != null">#{explorationData},</if>
- <if test="explorationType != null">#{explorationType},</if>
- <if test="createBy != null">#{createBy},</if>
- sysdate()
- )
- </insert>
-
- <update id="updateSchemeExploration" parameterType="SchemeExploration">
- update scheme_exploration
- <set>
- <if test="explorationData != null">exploration_data = #{explorationData},</if>
- <if test="explorationType != null">exploration_type = #{explorationType},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- update_time = sysdate()
- </set>
- where id = #{id}
- </update>
-
- <delete id="deleteSchemeExplorationById" parameterType="Long">
- delete from scheme_exploration where id = #{id}
- </delete>
-
- <delete id="deleteSchemeExplorationByIds" parameterType="Long">
- delete from scheme_exploration where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- </mapper>
|