|
@@ -0,0 +1,111 @@
|
|
|
+<?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.slibra.business.mapper.TXinyiCarbonExtraMapper">
|
|
|
+
|
|
|
+ <resultMap type="TXinyiCarbonExtra" id="TXinyiCarbonExtraResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="majorId" column="major_id" />
|
|
|
+ <result property="dictCode" column="dict_code" />
|
|
|
+ <result property="dictLabel" column="dict_label" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="amount" column="amount" />
|
|
|
+ <result property="val" column="val" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="revision" column="revision" />
|
|
|
+ <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="selectTXinyiCarbonExtraVo">
|
|
|
+ select id, major_id, dict_code, dict_label, type, amount, val, del_flag, revision, create_by, create_time, update_by, update_time from t_xinyi_carbon_extra
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTXinyiCarbonExtraList" parameterType="TXinyiCarbonExtra" resultMap="TXinyiCarbonExtraResult">
|
|
|
+ <include refid="selectTXinyiCarbonExtraVo"/>
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="majorId != null "> and major_id = #{majorId}</if>
|
|
|
+ <if test="dictCode != null "> and dict_code = #{dictCode}</if>
|
|
|
+ <if test="dictLabel != null and dictLabel != ''"> and dict_label = #{dictLabel}</if>
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
+ <if test="amount != null "> and amount = #{amount}</if>
|
|
|
+ <if test="val != null "> and val = #{val}</if>
|
|
|
+ <if test="revision != null "> and revision = #{revision}</if>
|
|
|
+ </where>
|
|
|
+ and del_flag = 0 order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTXinyiCarbonExtraById" parameterType="Long" resultMap="TXinyiCarbonExtraResult">
|
|
|
+ <include refid="selectTXinyiCarbonExtraVo"/>
|
|
|
+ where id = #{id} and del_flag = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTXinyiCarbonExtra" parameterType="TXinyiCarbonExtra" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_xinyi_carbon_extra
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="majorId != null">major_id,</if>
|
|
|
+ <if test="dictCode != null">dict_code,</if>
|
|
|
+ <if test="dictLabel != null">dict_label,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="amount != null">amount,</if>
|
|
|
+ <if test="val != null">val,</if>
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
+ <if test="revision != null">revision,</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="majorId != null">#{majorId},</if>
|
|
|
+ <if test="dictCode != null">#{dictCode},</if>
|
|
|
+ <if test="dictLabel != null">#{dictLabel},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="amount != null">#{amount},</if>
|
|
|
+ <if test="val != null">#{val},</if>
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="revision != null">#{revision},</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="updateTXinyiCarbonExtra" parameterType="TXinyiCarbonExtra">
|
|
|
+ update t_xinyi_carbon_extra
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="majorId != null">major_id = #{majorId},</if>
|
|
|
+ <if test="dictCode != null">dict_code = #{dictCode},</if>
|
|
|
+ <if test="dictLabel != null">dict_label = #{dictLabel},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="amount != null">amount = #{amount},</if>
|
|
|
+ <if test="val != null">val = #{val},</if>
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
+ <if test="revision != null">revision = #{revision},</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>
|
|
|
+ ,revision = revision + 1
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiCarbonExtraById" parameterType="Long">
|
|
|
+ update t_xinyi_carbon_extra set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTXinyiCarbonExtraByIds" parameterType="String">
|
|
|
+ update t_xinyi_carbon_extra set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|