|
@@ -0,0 +1,84 @@
|
|
|
+<?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.onemap.system.mapper.TJscSqlMapper">
|
|
|
+
|
|
|
+ <resultMap type="TJscSql" id="TJscSqlResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="jscType" column="jsc_type" />
|
|
|
+ <result property="jscView" column="jsc_view" />
|
|
|
+ <result property="jscSql" column="jsc_sql" />
|
|
|
+ <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="selectTJscSqlVo">
|
|
|
+ select id, jsc_type, jsc_view, jsc_sql, create_by, create_time, update_by, update_time from t_jsc_sql
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTJscSqlList" parameterType="TJscSql" resultMap="TJscSqlResult">
|
|
|
+ <include refid="selectTJscSqlVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="jscType != null and jscType != ''"> and jsc_type = #{jscType}</if>
|
|
|
+ <if test="jscView != null and jscView != ''"> and jsc_view = #{jscView}</if>
|
|
|
+ <if test="jscSql != null and jscSql != ''"> and jsc_sql = #{jscSql}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTJscSqlById" parameterType="String" resultMap="TJscSqlResult">
|
|
|
+ <include refid="selectTJscSqlVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTJscSql" parameterType="TJscSql" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_jsc_sql
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null and id != ''">id,</if>
|
|
|
+ <if test="jscType != null and jscType != ''">jsc_type,</if>
|
|
|
+ <if test="jscView != null">jsc_view,</if>
|
|
|
+ <if test="jscSql != null and jscSql != ''">jsc_sql,</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="id != null and id != ''">#{id},</if>
|
|
|
+ <if test="jscType != null and jscType != ''">#{jscType},</if>
|
|
|
+ <if test="jscView != null">#{jscView},</if>
|
|
|
+ <if test="jscSql != null and jscSql != ''">#{jscSql},</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="updateTJscSql" parameterType="TJscSql">
|
|
|
+ update t_jsc_sql
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="jscType != null and jscType != ''">jsc_type = #{jscType},</if>
|
|
|
+ <if test="jscView != null">jsc_view = #{jscView},</if>
|
|
|
+ <if test="jscSql != null and jscSql != ''">jsc_sql = #{jscSql},</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 id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTJscSqlById" parameterType="String">
|
|
|
+ delete from t_jsc_sql where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTJscSqlByIds" parameterType="String">
|
|
|
+ delete from t_jsc_sql where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|