|
@@ -0,0 +1,70 @@
|
|
|
|
+<?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.gqy.document.mapper.DcSystemMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="DcSystem" id="DcSystemResult">
|
|
|
|
+ <id property="sys_id" column="sys_id" />
|
|
|
|
+ <result property="sys_name" column="sys_name" />
|
|
|
|
+ <result property="sys_remark" column="sys_remark" />
|
|
|
|
+ <result property="sys_products" column="sys_products" />
|
|
|
|
+ <result property="user_id" column="user_id" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectDcSystemVo">
|
|
|
|
+ select sys_id, sys_name, sys_remark, sys_products, user_id
|
|
|
|
+ from dc_system
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectDcSystemList" parameterType="DcSystem" resultMap="DcSystemResult">
|
|
|
|
+ <include refid="selectDcSystemVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="sys_name != null and sys_name != ''">
|
|
|
|
+ AND sys_name like concat('%', #{sys_name}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="user_id != null">
|
|
|
|
+ AND user_id = #{user_id}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectDcSystemById" parameterType="Long" resultMap="DcSystemResult">
|
|
|
|
+ <include refid="selectDcSystemVo"/>
|
|
|
|
+ where sys_id = #{sys_id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertDcSystem" parameterType="DcSystem" useGeneratedKeys="true" keyProperty="sys_id">
|
|
|
|
+ insert into dc_system (
|
|
|
|
+ <if test="sys_name != null">sys_name,</if>
|
|
|
|
+ <if test="sys_remark != null">sys_remark,</if>
|
|
|
|
+ <if test="sys_products != null">sys_products,</if>
|
|
|
|
+ <if test="user_id != null">user_id</if>
|
|
|
|
+ )values(
|
|
|
|
+ <if test="sys_name != null">#{sys_name},</if>
|
|
|
|
+ <if test="sys_remark != null">#{sys_remark},</if>
|
|
|
|
+ <if test="sys_products != null">#{sys_products},</if>
|
|
|
|
+ <if test="user_id != null">#{user_id}</if>
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateDcSystem" parameterType="DcSystem">
|
|
|
|
+ update dc_system
|
|
|
|
+ <set>
|
|
|
|
+ <if test="sys_name != null">sys_name = #{sys_name},</if>
|
|
|
|
+ <if test="sys_remark != null">sys_remark = #{sys_remark},</if>
|
|
|
|
+ <if test="sys_products != null">sys_products = #{sys_products},</if>
|
|
|
|
+ <if test="user_id != null">user_id = #{user_id},</if>
|
|
|
|
+ </set>
|
|
|
|
+ where sys_id = #{sys_id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteDcSystemById" parameterType="Long">
|
|
|
|
+ delete from dc_system where sys_id = #{sys_id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteDcSystemByIds" parameterType="String">
|
|
|
|
+ delete from dc_system where sys_id in
|
|
|
|
+ <foreach item="sys_id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{sys_id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|