123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.DragTableMapper">
-
- <resultMap type="com.ruoyi.system.entity.DragTable" id="DragTableResult">
- <result property="tId" column="t_id" />
- <result property="dtName" column="dt_name" />
- <result property="dtNickname" column="dt_nickname" />
- <result property="tableKey" column="table_key" />
- <result property="sqlKey" column="sql_key" />
- <result property="dtTableName" column="dt_table_name" />
- <result property="dtNotes" column="dt_notes" />
- <result property="dtColumnName" column="dt_column_name" />
- <result property="spare" column="spare" />
- <result property="spare1" column="spare1" />
- <result property="delFlag" column="del_flag" />
- <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="selectDragTableVo">
- select t_id, dt_name, dt_nickname, table_key, sql_key, dt_table_name, dt_notes, dt_column_name, spare, spare1, del_flag, create_by, create_time, update_by, update_time from drag_table
- </sql>
- <select id="selectDragTableList" parameterType="com.ruoyi.system.entity.DragTable" resultMap="DragTableResult">
- <include refid="selectDragTableVo"/>
- <where>
- <if test="dtName != null and dtName != ''"> and dt_name like concat('%', #{dtName}, '%')</if>
- <if test="dtNickname != null and dtNickname != ''"> and dt_nickname like concat('%', #{dtNickname}, '%')</if>
- <if test="tableKey != null and tableKey != ''"> and table_key = #{tableKey}</if>
- <if test="sqlKey != null and sqlKey != ''"> and sql_key = #{sqlKey}</if>
- <if test="dtTableName != null and dtTableName != ''"> and dt_table_name like concat('%', #{dtTableName}, '%')</if>
- <if test="dtNotes != null and dtNotes != ''"> and dt_notes = #{dtNotes}</if>
- <if test="dtColumnName != null and dtColumnName != ''"> and dt_column_name like concat('%', #{dtColumnName}, '%')</if>
- <if test="spare != null and spare != ''"> and spare = #{spare}</if>
- <if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
- </where>
- </select>
-
- <select id="selectDragTableByTId" parameterType="Long" resultMap="DragTableResult">
- <include refid="selectDragTableVo"/>
- where t_id = #{tId}
- </select>
-
- <insert id="insertDragTable" parameterType="com.ruoyi.system.entity.DragTable" useGeneratedKeys="true" keyProperty="tId">
- insert into drag_table
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dtName != null">dt_name,</if>
- <if test="dtNickname != null">dt_nickname,</if>
- <if test="tableKey != null">table_key,</if>
- <if test="sqlKey != null">sql_key,</if>
- <if test="dtTableName != null">dt_table_name,</if>
- <if test="dtNotes != null">dt_notes,</if>
- <if test="dtColumnName != null">dt_column_name,</if>
- <if test="spare != null">spare,</if>
- <if test="spare1 != null">spare1,</if>
- <if test="delFlag != null">del_flag,</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>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dtName != null">#{dtName},</if>
- <if test="dtNickname != null">#{dtNickname},</if>
- <if test="tableKey != null">#{tableKey},</if>
- <if test="sqlKey != null">#{sqlKey},</if>
- <if test="dtTableName != null">#{dtTableName},</if>
- <if test="dtNotes != null">#{dtNotes},</if>
- <if test="dtColumnName != null">#{dtColumnName},</if>
- <if test="spare != null">#{spare},</if>
- <if test="spare1 != null">#{spare1},</if>
- <if test="delFlag != null">#{delFlag},</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>
- </trim>
- </insert>
- <update id="updateDragTable" parameterType="com.ruoyi.system.entity.DragTable">
- update drag_table
- <trim prefix="SET" suffixOverrides=",">
- <if test="dtName != null">dt_name = #{dtName},</if>
- <if test="dtNickname != null">dt_nickname = #{dtNickname},</if>
- <if test="tableKey != null">table_key = #{tableKey},</if>
- <if test="sqlKey != null">sql_key = #{sqlKey},</if>
- <if test="dtTableName != null">dt_table_name = #{dtTableName},</if>
- <if test="dtNotes != null">dt_notes = #{dtNotes},</if>
- <if test="dtColumnName != null">dt_column_name = #{dtColumnName},</if>
- <if test="spare != null">spare = #{spare},</if>
- <if test="spare1 != null">spare1 = #{spare1},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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>
- </trim>
- where t_id = #{tId}
- </update>
- <delete id="deleteDragTableByTId" parameterType="Long">
- delete from drag_table where t_id = #{tId}
- </delete>
- <delete id="deleteDragTableByTIds" parameterType="String">
- delete from drag_table where t_id in
- <foreach item="tId" collection="array" open="(" separator="," close=")">
- #{tId}
- </foreach>
- </delete>
- </mapper>
|