|
@@ -0,0 +1,74 @@
|
|
|
|
+<?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="edp.davinci.dao.DataSubjectMapper">
|
|
|
|
+
|
|
|
|
+ <insert id="insert" parameterType="edp.davinci.model.DataSubject">
|
|
|
|
+ insert into `data_subject`
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="standardCode != null">
|
|
|
|
+ standard_code,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="standardName != null">
|
|
|
|
+ standard_name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="standardAlias != null">
|
|
|
|
+ standard_alias,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="englishName != null">
|
|
|
|
+ english_name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptName != null">
|
|
|
|
+ `dept_name`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="management != null">
|
|
|
|
+ `management`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="pId != null">
|
|
|
|
+ `p_id`,
|
|
|
|
+ </if>
|
|
|
|
+ `create_by`,
|
|
|
|
+ `create_time`
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="standardCode != null">
|
|
|
|
+ #{standardCode,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="standardName != null">
|
|
|
|
+ #{standardName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="standardAlias != null">
|
|
|
|
+ #{standardAlias,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="englishName != null">
|
|
|
|
+ #{englishName,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptName != null">
|
|
|
|
+ #{deptName,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="management != null">
|
|
|
|
+ #{management,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="pId != null">
|
|
|
|
+ #{pId,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ #{createBy,jdbcType=BIGINT},
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="update" parameterType="edp.davinci.model.DataSubject">
|
|
|
|
+ UPDATE data_subject
|
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
|
+ <if test="standardCode!=null">standard_code=#{standardCode},</if>
|
|
|
|
+ <if test="standardName!=null">standard_name=#{standardName},</if>
|
|
|
|
+ <if test="standardAlias!=null">standard_alias=#{standardAlias},</if>
|
|
|
|
+ <if test="englishName!=null">english_name=#{englishName},</if>
|
|
|
|
+ <if test="deptName!=null">dept_name=#{deptName},</if>
|
|
|
|
+ <if test="management!=null">management=#{management},</if>
|
|
|
|
+ <if test="pId!=null">p_id=#{pId},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ WHERE id=#{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|