|
@@ -0,0 +1,147 @@
|
|
|
+<?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.MobilePageTableListMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.zkqy.system.entity.MobilePageTableList" id="MobilePageTableListResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="pageId" column="page_id" />
|
|
|
+ <result property="tableNameDes" column="table_name_des" />
|
|
|
+ <result property="isSingleTable" column="isSingleTable" />
|
|
|
+ <result property="tableNames" column="table_names" />
|
|
|
+ <result property="tableColumnName" column="table_column_name" />
|
|
|
+ <result property="tableColumnDesc" column="table_column_desc" />
|
|
|
+ <result property="tableJoin" column="table_join" />
|
|
|
+ <result property="tableQueryConditions" column="table_query_conditions" />
|
|
|
+ <result property="timeRangeFilters" column="timeRangeFilters" />
|
|
|
+ <result property="tablelistSort" column="tablelistSort" />
|
|
|
+ <result property="listMapValue" column="list_map_value" />
|
|
|
+ <result property="extensions" column="extensions" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="createById" column="create_by_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateById" column="update_by_id" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectMobilePageTableListVo">
|
|
|
+ select id, page_id, table_name_des, isSingleTable, table_names, table_column_name, table_column_desc, table_join, table_query_conditions, timeRangeFilters, tablelistSort, list_map_value, extensions, create_time, create_by_id, create_by, update_by, update_by_id, update_time from {DBNAME}.mobile_page_table_list
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMobilePageTableListList" parameterType="com.zkqy.system.entity.MobilePageTableList" resultMap="MobilePageTableListResult">
|
|
|
+ <include refid="selectMobilePageTableListVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="pageId != null "> and page_id = #{pageId}</if>
|
|
|
+ <if test="tableNameDes != null and tableNameDes != ''"> and table_name_des = #{tableNameDes}</if>
|
|
|
+ <if test="isSingleTable != null and isSingleTable != ''"> and isSingleTable = #{isSingleTable}</if>
|
|
|
+ <if test="tableNames != null and tableNames != ''"> and table_names = #{tableNames}</if>
|
|
|
+ <if test="tableColumnName != null and tableColumnName != ''"> and table_column_name like concat('%', #{tableColumnName}, '%')</if>
|
|
|
+ <if test="tableColumnDesc != null and tableColumnDesc != ''"> and table_column_desc = #{tableColumnDesc}</if>
|
|
|
+ <if test="tableJoin != null and tableJoin != ''"> and table_join = #{tableJoin}</if>
|
|
|
+ <if test="tableQueryConditions != null and tableQueryConditions != ''"> and table_query_conditions = #{tableQueryConditions}</if>
|
|
|
+ <if test="timeRangeFilters != null and timeRangeFilters != ''"> and timeRangeFilters = #{timeRangeFilters}</if>
|
|
|
+ <if test="tablelistSort != null and tablelistSort != ''"> and tablelistSort = #{tablelistSort}</if>
|
|
|
+ <if test="listMapValue != null and listMapValue != ''"> and list_map_value = #{listMapValue}</if>
|
|
|
+ <if test="extensions != null and extensions != ''"> and extensions = #{extensions}</if>
|
|
|
+ <if test="createById != null "> and create_by_id = #{createById}</if>
|
|
|
+ <if test="updateById != null "> and update_by_id = #{updateById}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMobilePageTableListById" parameterType="Long" resultMap="MobilePageTableListResult">
|
|
|
+ <include refid="selectMobilePageTableListVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMobilePageTableListByPageId" parameterType="Long" resultMap="MobilePageTableListResult">
|
|
|
+ <include refid="selectMobilePageTableListVo"/>
|
|
|
+ where page_id = #{pageId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMobilePageTableList" parameterType="com.zkqy.system.entity.MobilePageTableList">
|
|
|
+ insert into {DBNAME}.mobile_page_table_list
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="pageId != null">page_id,</if>
|
|
|
+ <if test="tableNameDes != null">table_name_des,</if>
|
|
|
+ <if test="isSingleTable != null">isSingleTable,</if>
|
|
|
+ <if test="tableNames != null">table_names,</if>
|
|
|
+ <if test="tableColumnName != null">table_column_name,</if>
|
|
|
+ <if test="tableColumnDesc != null">table_column_desc,</if>
|
|
|
+ <if test="tableJoin != null">table_join,</if>
|
|
|
+ <if test="tableQueryConditions != null">table_query_conditions,</if>
|
|
|
+ <if test="timeRangeFilters != null">timeRangeFilters,</if>
|
|
|
+ <if test="tablelistSort != null">tablelistSort,</if>
|
|
|
+ <if test="listMapValue != null">list_map_value,</if>
|
|
|
+ <if test="extensions != null">extensions,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createById != null">create_by_id,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateById != null">update_by_id,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="pageId != null">#{pageId},</if>
|
|
|
+ <if test="tableNameDes != null">#{tableNameDes},</if>
|
|
|
+ <if test="isSingleTable != null">#{isSingleTable},</if>
|
|
|
+ <if test="tableNames != null">#{tableNames},</if>
|
|
|
+ <if test="tableColumnName != null">#{tableColumnName},</if>
|
|
|
+ <if test="tableColumnDesc != null">#{tableColumnDesc},</if>
|
|
|
+ <if test="tableJoin != null">#{tableJoin},</if>
|
|
|
+ <if test="tableQueryConditions != null">#{tableQueryConditions},</if>
|
|
|
+ <if test="timeRangeFilters != null">#{timeRangeFilters},</if>
|
|
|
+ <if test="tablelistSort != null">#{tablelistSort},</if>
|
|
|
+ <if test="listMapValue != null">#{listMapValue},</if>
|
|
|
+ <if test="extensions != null">#{extensions},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createById != null">#{createById},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateById != null">#{updateById},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateMobilePageTableList" parameterType="com.zkqy.system.entity.MobilePageTableList">
|
|
|
+ update {DBNAME}.mobile_page_table_list
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="pageId != null">page_id = #{pageId},</if>
|
|
|
+ <if test="tableNameDes != null">table_name_des = #{tableNameDes},</if>
|
|
|
+ <if test="isSingleTable != null">isSingleTable = #{isSingleTable},</if>
|
|
|
+ <if test="tableNames != null">table_names = #{tableNames},</if>
|
|
|
+ <if test="tableColumnName != null">table_column_name = #{tableColumnName},</if>
|
|
|
+ <if test="tableColumnDesc != null">table_column_desc = #{tableColumnDesc},</if>
|
|
|
+ <if test="tableJoin != null">table_join = #{tableJoin},</if>
|
|
|
+ <if test="tableQueryConditions != null">table_query_conditions = #{tableQueryConditions},</if>
|
|
|
+ <if test="timeRangeFilters != null">timeRangeFilters = #{timeRangeFilters},</if>
|
|
|
+ <if test="tablelistSort != null">tablelistSort = #{tablelistSort},</if>
|
|
|
+ <if test="listMapValue != null">list_map_value = #{listMapValue},</if>
|
|
|
+ <if test="extensions != null">extensions = #{extensions},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createById != null">create_by_id = #{createById},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateById != null">update_by_id = #{updateById},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMobilePageTableListById" parameterType="Long">
|
|
|
+ delete from {DBNAME}.mobile_page_table_list where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMobilePageTableListByIds" parameterType="String">
|
|
|
+ delete from {DBNAME}.mobile_page_table_list where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteMobilePageTableListByPageId">
|
|
|
+ delete from {DBNAME}.mobile_page_table_list where page_id = #{id}
|
|
|
+ </delete>
|
|
|
+</mapper>
|