|
@@ -0,0 +1,68 @@
|
|
|
|
+<?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.matter.mapper.MatterMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="com.sooka.jnb.matter.domin.Matter" id="MatterResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="title" column="title" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ <result property="department" column="department" />
|
|
|
|
+ <result property="operation" column="operation" />
|
|
|
|
+ <result property="address" column="address" />
|
|
|
|
+ <result property="phone" column="phone" />
|
|
|
|
+ <result property="picture" column="picture" />
|
|
|
|
+ <result property="examine" column="examine" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="selectSysMatterVo" resultMap="MatterResult">
|
|
|
|
+ select id,title, type, department,operation,address,phone,picture,examine from jnb_list_of_matters
|
|
|
|
+ <where>
|
|
|
|
+ <if test="title != null and title !=''">
|
|
|
|
+ AND title LIKE '%' #{title} '%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="examine != null and examine !=''">
|
|
|
|
+ AND examine LIKE '%' #{examine} '%'
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectSysMatterById" resultMap="MatterResult">
|
|
|
|
+ select id ,title, type, department,operation,address,phone,picture,examine from jnb_list_of_matters
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertSysMatter">
|
|
|
|
+ INSERT INTO
|
|
|
|
+ jnb_list_of_matters (title, type, department,operation,address,phone,picture )
|
|
|
|
+ VALUE (#{title},#{type},#{department},#{operation},#{address},#{phone},#{picture} )
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateSysMatter" parameterType="SysDept">
|
|
|
|
+ update jnb_list_of_matters
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="title != null">title = #{title},</if>
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
|
+ <if test="department != null">department = #{department},</if>
|
|
|
|
+ <if test="operation != null">operation = #{operation},</if>
|
|
|
|
+ <if test="address != null">address = #{address},</if>
|
|
|
|
+ <if test="picture != null">picture = #{picture},</if>
|
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="examine" parameterType="SysDept">
|
|
|
|
+ update jnb_list_of_matters
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="examine != null">examine = #{examine}</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteSysMatterByDeptId" parameterType="Long">
|
|
|
|
+ delete from jnb_list_of_matters where id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|