<?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="cn.superdesk.uniorder.dao.mapper.accounting.AccountingAppealMapperEx">

        <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.accounting.AccountingAppeal">
        <!--


          This element was generated on Tue Oct 20 13:49:38 CST 2020.
        -->
        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
            SELECT LAST_INSERT_ID()
        </selectKey>
        insert into accounting_appeal
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="accountingOrderId != null">
                accounting_order_id,
            </if>
            <if test="accountingOrderSn != null">
                accounting_order_sn,
            </if>
            <if test="accountingType != null">
                accounting_type,
            </if>
            <if test="accountingSubType != null">
                accounting_sub_type,
            </if>
            <if test="remark != null">
                remark,
            </if>
            <if test="img != null">
                img,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="createUserId != null">
                create_user_id,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
            <if test="updateUserId != null">
                update_user_id,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=BIGINT},
            </if>
            <if test="accountingOrderId != null">
                #{accountingOrderId,jdbcType=BIGINT},
            </if>
            <if test="accountingOrderSn != null">
                #{accountingOrderSn,jdbcType=VARCHAR},
            </if>
            <if test="accountingType != null">
                #{accountingType,jdbcType=VARCHAR},
            </if>
            <if test="accountingSubType != null">
                #{accountingSubType,jdbcType=VARCHAR},
            </if>
            <if test="remark != null">
                #{remark,jdbcType=VARCHAR},
            </if>
            <if test="img != null">
                #{img,jdbcType=OTHER,typeHandler=cn.superdesk.uniorder.dao.typehandler.MySqlJsonType2ArrayHandler},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUserId != null">
                #{createUserId,jdbcType=BIGINT},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateUserId != null">
                #{updateUserId,jdbcType=BIGINT},
            </if>
        </trim>
    </insert>
</mapper>