|
@@ -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.sooka.jnb.handleAffairs.mapper.TopicTypeMapper">
|
|
|
+
|
|
|
+ <resultMap type="TopicType" id="TopicTypeResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <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" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="version" column="version" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ <result property="yesOrNoShow" column="yes_or_no_show" />
|
|
|
+ <result property="objectOfHandling" column="object_of_handling" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTopicTypeVo">
|
|
|
+ select id, create_by, create_time, update_by, update_time, remark, del_flag, version, dept_name, yes_or_no_show, object_of_handling from jnb_topic_type
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTopicTypeList" parameterType="TopicType" resultMap="TopicTypeResult">
|
|
|
+ <include refid="selectTopicTypeVo"/>
|
|
|
+ <where>
|
|
|
+ and del_flag = 0
|
|
|
+ <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="yesOrNoShow != null and yesOrNoShow != ''"> and yes_or_no_show = #{yesOrNoShow}</if>
|
|
|
+ <if test="objectOfHandling != null and objectOfHandling != ''"> and object_of_handling = #{objectOfHandling}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTopicTypeById" parameterType="Long" resultMap="TopicTypeResult">
|
|
|
+ <include refid="selectTopicTypeVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTopicType" parameterType="TopicType" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into jnb_topic_type
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <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="delFlag != null">del_flag,</if>
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
+ <if test="yesOrNoShow != null">yes_or_no_show,</if>
|
|
|
+ <if test="objectOfHandling != null">object_of_handling,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <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="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
+ <if test="yesOrNoShow != null">#{yesOrNoShow},</if>
|
|
|
+ <if test="objectOfHandling != null">#{objectOfHandling},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTopicType" parameterType="TopicType">
|
|
|
+ update jnb_topic_type
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <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="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
+ <if test="yesOrNoShow != null">yes_or_no_show = #{yesOrNoShow},</if>
|
|
|
+ <if test="objectOfHandling != null">object_of_handling = #{objectOfHandling},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTopicTypeById" parameterType="Long">
|
|
|
+ update jnb_topic_type set del_flag = 2 where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTopicTypeByIds" parameterType="String">
|
|
|
+ update jnb_topic_type set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|