|
@@ -0,0 +1,89 @@
|
|
|
+<?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.zkqy.system.mapper.ExcelSheetMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.zkqy.system.entity.ExcelSheet" id="ExcelSheetResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="excelJson" column="excel_json" />
|
|
|
+ <result property="excelTableConfig" column="excel_table_config" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectExcelSheetVo">
|
|
|
+ select id, name, excel_json, excel_table_config, del_flag, create_time, create_by, update_time, update_by from excel_sheet
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectExcelSheetList" parameterType="com.zkqy.system.entity.ExcelSheet" resultMap="ExcelSheetResult">
|
|
|
+ <include refid="selectExcelSheetVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="excelJson != null and excelJson != ''"> and excel_json = #{excelJson}</if>
|
|
|
+ <if test="excelTableConfig != null and excelTableConfig != ''"> and excel_table_config = #{excelTableConfig}</if>
|
|
|
+ </where>
|
|
|
+ order by update_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectExcelSheetById" parameterType="Long" resultMap="ExcelSheetResult">
|
|
|
+ <include refid="selectExcelSheetVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertExcelSheet" parameterType="com.zkqy.system.entity.ExcelSheet">
|
|
|
+ insert into excel_sheet
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="excelJson != null">excel_json,</if>
|
|
|
+ <if test="excelTableConfig != null">excel_table_config,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="excelJson != null">#{excelJson},</if>
|
|
|
+ <if test="excelTableConfig != null">#{excelTableConfig},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateExcelSheet" parameterType="com.zkqy.system.entity.ExcelSheet">
|
|
|
+ update excel_sheet
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="excelJson != null">excel_json = #{excelJson},</if>
|
|
|
+ <if test="excelTableConfig != null">excel_table_config = #{excelTableConfig},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteExcelSheetById" parameterType="Long">
|
|
|
+ delete from excel_sheet where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteExcelSheetByIds" parameterType="String">
|
|
|
+ delete from excel_sheet where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|