12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.InvestigateTableMapper">
-
- <resultMap type="InvestigateTable" id="InvestigateTableResult">
- <result property="investigateTableId" column="investigate_table_id" />
- <result property="investigateName" column="investigate_name" />
- <result property="content" column="content" />
- <result property="endTime" column="end_time" />
- <result property="cipher" column="cipher" />
- <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="selectInvestigateTableVo">
- select investigate_table_id, investigate_name, content, end_time, cipher, create_by, create_time, update_by, update_time, remark from investigate_table
- </sql>
- <select id="selectInvestigateTableList" parameterType="InvestigateTable" resultMap="InvestigateTableResult">
- <include refid="selectInvestigateTableVo"/>
- <where>
- <if test="investigateName != null and investigateName != ''"> and investigate_name like concat('%', #{investigateName}, '%')</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="endTime != null "> and end_time = #{endTime}</if>
- <if test="cipher != null and cipher != ''"> and cipher = #{cipher}</if>
- </where>
- </select>
-
- <select id="selectInvestigateTableById" parameterType="Long" resultMap="InvestigateTableResult">
- <include refid="selectInvestigateTableVo"/>
- where investigate_table_id = #{investigateTableId}
- </select>
-
- <insert id="insertInvestigateTable" parameterType="InvestigateTable" useGeneratedKeys="true" keyProperty="id">
- insert into investigate_table
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="investigateName != null">investigate_name,</if>
- <if test="content != null">content,</if>
- <if test="endTime != null">end_time,</if>
- <if test="cipher != null">cipher,</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="investigateName != null">#{investigateName},</if>
- <if test="content != null">#{content},</if>
- <if test="endTime != null">#{endTime},</if>
- <if test="cipher != null">#{cipher},</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="updateInvestigateTable" parameterType="InvestigateTable">
- update investigate_table
- <trim prefix="SET" suffixOverrides=",">
- <if test="investigateName != null">investigate_name = #{investigateName},</if>
- <if test="content != null">content = #{content},</if>
- <if test="endTime != null">end_time = #{endTime},</if>
- <if test="cipher != null">cipher = #{cipher},</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>
- where investigate_table_id = #{investigateTableId}
- </update>
- <delete id="deleteInvestigateTableById" parameterType="Long">
- delete from investigate_table where investigate_table_id = #{investigateTableId}
- </delete>
- <delete id="deleteInvestigateTableByIds" parameterType="String">
- delete from investigate_table where investigate_table_id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|