emis-service/emis-biz/src/main/resources/mapper/EmisGoodsMapper.xml
2024-06-02 15:34:21 +08:00

363 lines
27 KiB
XML

<?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.xdadan.erp.emis.mapper.EmisGoodsMapper">
<resultMap type="EmisGoods" id="EmisGoodsResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="id" column="id" />
<result property="goodsCode" column="goods_code" />
<result property="goodsName" column="goods_name" />
<result property="goodsNameEn" column="goods_name_en" />
<result property="goodsCat" column="goods_cat" />
<result property="goodsType" column="goods_type" />
<result property="goodsModel" column="goods_model" />
<result property="barcode" column="barcode" />
<result property="nationArea" column="nation_area" />
<result property="picUrl" column="pic_url" />
<result property="ownerCode" column="owner_code" />
<result property="isRealGoods" column="is_real_goods" />
<result property="isBigCat" column="is_big_cat" />
<result property="brand" column="brand" />
<result property="material" column="material" />
<result property="grossWeight" column="gross_weight" />
<result property="netWeight" column="net_weight" />
<result property="singleVolume" column="single_volume" />
<result property="singleLength" column="single_length" />
<result property="singleWidth" column="single_width" />
<result property="singleHeight" column="single_height" />
<result property="pkgPcs" column="pkg_pcs" />
<result property="pkgVolume" column="pkg_volume" />
<result property="pkgLength" column="pkg_length" />
<result property="pkgWidth" column="pkg_width" />
<result property="pkgHeight" column="pkg_height" />
<result property="taxNo" column="tax_no" />
<result property="hsCode" column="hs_code" />
<result property="isCode" column="is_code" />
<result property="unit" column="unit" />
<result property="unit1" column="unit1" />
<result property="unit2" column="unit2" />
<result property="price" column="price" />
<result property="currency" column="currency" />
<result property="ruleNation" column="rule_nation" />
<result property="manufEnterprise" column="manuf_enterprise" />
<result property="ebcCode" column="ebc_code" />
<result property="ciqCode" column="ciq_code" />
<result property="function" column="function" />
<result property="ingredients" column="ingredients" />
<result property="purpose" column="purpose" />
<result property="productValidity" column="product_validity" />
<result property="cebpMode" column="cebp_mode" />
<result property="supplier" column="supplier" />
<result property="serialNumber" column="serial_number" />
<result property="status" column="status" />
<result property="statusMessage" column="status_message" />
<result property="goodsSn2" column="goods_sn2" />
<result property="goodsNo2" column="goods_no2" />
<result property="licNo" column="lic_no" />
<result property="materialPath" column="material_path" />
<result property="pd" column="pd" />
<result property="saleUrl" column="sale_url" />
<result property="portCode" column="port_code" />
<result property="orderNum" column="order_num" />
</resultMap>
<sql id="selectEmisGoodsVo">
select id, goods_code, goods_name, goods_name_en, goods_cat, goods_type, goods_model, barcode, nation_area, pic_url, owner_code, is_real_goods, is_big_cat, brand, material, gross_weight, net_weight, single_volume, single_length, single_width, single_height, pkg_pcs, pkg_volume, pkg_length, pkg_width, pkg_height, tax_no, hs_code, is_code, unit, unit1, unit2, price, currency, rule_nation, manuf_enterprise, ebc_code, ciq_code, function, ingredients, purpose, product_validity, cebp_mode, supplier, serial_number, status, status_message, goods_sn2, goods_no2, lic_no, material_path, pd, sale_url, port_code, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_goods
</sql>
<select id="selectEmisGoodsList" parameterType="EmisGoods" resultMap="EmisGoodsResult">
<include refid="selectEmisGoodsVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="goodsCode != null and goodsCode != ''"> and goods_code like concat('%', #{goodsCode}, '%')</if>
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
<if test="goodsNameEn != null and goodsNameEn != ''"> and goods_name_en like concat('%', #{goodsNameEn}, '%')</if>
<if test="goodsCat != null and goodsCat != ''"> and goods_cat like concat('%', #{goodsCat}, '%')</if>
<if test="goodsType != null and goodsType != ''"> and goods_type like concat('%', #{goodsType}, '%')</if>
<if test="goodsModel != null and goodsModel != ''"> and goods_model like concat('%', #{goodsModel}, '%')</if>
<if test="barcode != null and barcode != ''"> and barcode like concat('%', #{barcode}, '%')</if>
<if test="nationArea != null and nationArea != ''"> and nation_area like concat('%', #{nationArea}, '%')</if>
<if test="picUrl != null and picUrl != ''"> and pic_url like concat('%', #{picUrl}, '%')</if>
<if test="ownerCode != null and ownerCode != ''"> and owner_code like concat('%', #{ownerCode}, '%')</if>
<if test="isRealGoods != null "> and is_real_goods = #{isRealGoods}</if>
<if test="isBigCat != null "> and is_big_cat = #{isBigCat}</if>
<if test="brand != null and brand != ''"> and brand like concat('%', #{brand}, '%')</if>
<if test="material != null and material != ''"> and material like concat('%', #{material}, '%')</if>
<if test="grossWeight != null "> and gross_weight like concat('%', #{grossWeight}, '%')</if>
<if test="netWeight != null "> and net_weight like concat('%', #{netWeight}, '%')</if>
<if test="singleVolume != null and singleVolume != ''"> and single_volume like concat('%', #{singleVolume}, '%')</if>
<if test="singleLength != null "> and single_length = #{singleLength}</if>
<if test="singleWidth != null "> and single_width = #{singleWidth}</if>
<if test="singleHeight != null "> and single_height = #{singleHeight}</if>
<if test="pkgPcs != null "> and pkg_pcs = #{pkgPcs}</if>
<if test="pkgVolume != null "> and pkg_volume like concat('%', #{pkgVolume}, '%')</if>
<if test="pkgLength != null "> and pkg_length = #{pkgLength}</if>
<if test="pkgWidth != null "> and pkg_width = #{pkgWidth}</if>
<if test="pkgHeight != null "> and pkg_height = #{pkgHeight}</if>
<if test="taxNo != null and taxNo != ''"> and tax_no like concat('%', #{taxNo}, '%')</if>
<if test="hsCode != null and hsCode != ''"> and hs_code like concat('%', #{hsCode}, '%')</if>
<if test="isCode != null and isCode != ''"> and is_code like concat('%', #{isCode}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="unit1 != null and unit1 != ''"> and unit1 like concat('%', #{unit1}, '%')</if>
<if test="unit2 != null and unit2 != ''"> and unit2 like concat('%', #{unit2}, '%')</if>
<if test="price != null "> and price like concat('%', #{price}, '%')</if>
<if test="currency != null and currency != ''"> and currency like concat('%', #{currency}, '%')</if>
<if test="ruleNation != null and ruleNation != ''"> and rule_nation like concat('%', #{ruleNation}, '%')</if>
<if test="manufEnterprise != null and manufEnterprise != ''"> and manuf_enterprise like concat('%', #{manufEnterprise}, '%')</if>
<if test="ebcCode != null and ebcCode != ''"> and ebc_code like concat('%', #{ebcCode}, '%')</if>
<if test="ciqCode != null and ciqCode != ''"> and ciq_code like concat('%', #{ciqCode}, '%')</if>
<if test="function != null and function != ''"> and function like concat('%', #{function}, '%')</if>
<if test="ingredients != null and ingredients != ''"> and ingredients like concat('%', #{ingredients}, '%')</if>
<if test="purpose != null and purpose != ''"> and purpose like concat('%', #{purpose}, '%')</if>
<if test="productValidity != null and productValidity != ''"> and product_validity like concat('%', #{productValidity}, '%')</if>
<if test="cebpMode != null and cebpMode != ''"> and cebp_mode like concat('%', #{cebpMode}, '%')</if>
<if test="supplier != null and supplier != ''"> and supplier like concat('%', #{supplier}, '%')</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number like concat('%', #{serialNumber}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="statusMessage != null and statusMessage != ''"> and status_message like concat('%', #{statusMessage}, '%')</if>
<if test="goodsSn2 != null and goodsSn2 != ''"> and goods_sn2 like concat('%', #{goodsSn2}, '%')</if>
<if test="goodsNo2 != null and goodsNo2 != ''"> and goods_no2 like concat('%', #{goodsNo2}, '%')</if>
<if test="licNo != null and licNo != ''"> and lic_no like concat('%', #{licNo}, '%')</if>
<if test="materialPath != null and materialPath != ''"> and material_path like concat('%', #{materialPath}, '%')</if>
<if test="pd != null and pd != ''"> and pd like concat('%', #{pd}, '%')</if>
<if test="saleUrl != null and saleUrl != ''"> and sale_url like concat('%', #{saleUrl}, '%')</if>
<if test="portCode != null and portCode != ''"> and port_code like concat('%', #{portCode}, '%')</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisGoodsById" parameterType="Long" resultMap="EmisGoodsResult">
select id, goods_code, goods_name, goods_name_en, goods_cat, goods_type, goods_model, barcode, nation_area, pic_url, owner_code, is_real_goods, is_big_cat, brand, material, gross_weight, net_weight, single_volume, single_length, single_width, single_height, pkg_pcs, pkg_volume, pkg_length, pkg_width, pkg_height, tax_no, hs_code, is_code, unit, unit1, unit2, price, currency, rule_nation, manuf_enterprise, ebc_code, ciq_code, function, ingredients, purpose, product_validity, cebp_mode, supplier, serial_number, status, status_message, goods_sn2, goods_no2, lic_no, material_path, pd, sale_url, port_code, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_goods a
where a.id = #{id}
</select>
<insert id="insertEmisGoods" parameterType="EmisGoods">
insert into emis_goods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="goodsCode != null and goodsCode != ''">goods_code,</if>
<if test="goodsName != null and goodsName != ''">goods_name,</if>
<if test="goodsNameEn != null and goodsNameEn != ''">goods_name_en,</if>
<if test="goodsCat != null and goodsCat != ''">goods_cat,</if>
<if test="goodsType != null and goodsType != ''">goods_type,</if>
<if test="goodsModel != null and goodsModel != ''">goods_model,</if>
<if test="barcode != null and barcode != ''">barcode,</if>
<if test="nationArea != null and nationArea != ''">nation_area,</if>
<if test="picUrl != null and picUrl != ''">pic_url,</if>
<if test="ownerCode != null and ownerCode != ''">owner_code,</if>
<if test="isRealGoods != null">is_real_goods,</if>
<if test="isBigCat != null">is_big_cat,</if>
<if test="brand != null and brand != ''">brand,</if>
<if test="material != null and material != ''">material,</if>
<if test="grossWeight != null">gross_weight,</if>
<if test="netWeight != null">net_weight,</if>
<if test="singleVolume != null and singleVolume != ''">single_volume,</if>
<if test="singleLength != null">single_length,</if>
<if test="singleWidth != null">single_width,</if>
<if test="singleHeight != null">single_height,</if>
<if test="pkgPcs != null">pkg_pcs,</if>
<if test="pkgVolume != null">pkg_volume,</if>
<if test="pkgLength != null">pkg_length,</if>
<if test="pkgWidth != null">pkg_width,</if>
<if test="pkgHeight != null">pkg_height,</if>
<if test="taxNo != null and taxNo != ''">tax_no,</if>
<if test="hsCode != null and hsCode != ''">hs_code,</if>
<if test="isCode != null and isCode != ''">is_code,</if>
<if test="unit != null and unit != ''">unit,</if>
<if test="unit1 != null and unit1 != ''">unit1,</if>
<if test="unit2 != null and unit2 != ''">unit2,</if>
<if test="price != null">price,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="ruleNation != null and ruleNation != ''">rule_nation,</if>
<if test="manufEnterprise != null and manufEnterprise != ''">manuf_enterprise,</if>
<if test="ebcCode != null and ebcCode != ''">ebc_code,</if>
<if test="ciqCode != null and ciqCode != ''">ciq_code,</if>
<if test="function != null and function != ''">function,</if>
<if test="ingredients != null and ingredients != ''">ingredients,</if>
<if test="purpose != null and purpose != ''">purpose,</if>
<if test="productValidity != null and productValidity != ''">product_validity,</if>
<if test="cebpMode != null and cebpMode != ''">cebp_mode,</if>
<if test="supplier != null and supplier != ''">supplier,</if>
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
<if test="status != null">status,</if>
<if test="statusMessage != null and statusMessage != ''">status_message,</if>
<if test="goodsSn2 != null and goodsSn2 != ''">goods_sn2,</if>
<if test="goodsNo2 != null and goodsNo2 != ''">goods_no2,</if>
<if test="licNo != null and licNo != ''">lic_no,</if>
<if test="materialPath != null and materialPath != ''">material_path,</if>
<if test="pd != null and pd != ''">pd,</if>
<if test="saleUrl != null and saleUrl != ''">sale_url,</if>
<if test="portCode != null and portCode != ''">port_code,</if>
<if test="orderNum != null">order_num,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
<if test="goodsNameEn != null and goodsNameEn != ''">#{goodsNameEn},</if>
<if test="goodsCat != null and goodsCat != ''">#{goodsCat},</if>
<if test="goodsType != null and goodsType != ''">#{goodsType},</if>
<if test="goodsModel != null and goodsModel != ''">#{goodsModel},</if>
<if test="barcode != null and barcode != ''">#{barcode},</if>
<if test="nationArea != null and nationArea != ''">#{nationArea},</if>
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
<if test="ownerCode != null and ownerCode != ''">#{ownerCode},</if>
<if test="isRealGoods != null">#{isRealGoods},</if>
<if test="isBigCat != null">#{isBigCat},</if>
<if test="brand != null and brand != ''">#{brand},</if>
<if test="material != null and material != ''">#{material},</if>
<if test="grossWeight != null">#{grossWeight},</if>
<if test="netWeight != null">#{netWeight},</if>
<if test="singleVolume != null and singleVolume != ''">#{singleVolume},</if>
<if test="singleLength != null">#{singleLength},</if>
<if test="singleWidth != null">#{singleWidth},</if>
<if test="singleHeight != null">#{singleHeight},</if>
<if test="pkgPcs != null">#{pkgPcs},</if>
<if test="pkgVolume != null">#{pkgVolume},</if>
<if test="pkgLength != null">#{pkgLength},</if>
<if test="pkgWidth != null">#{pkgWidth},</if>
<if test="pkgHeight != null">#{pkgHeight},</if>
<if test="taxNo != null and taxNo != ''">#{taxNo},</if>
<if test="hsCode != null and hsCode != ''">#{hsCode},</if>
<if test="isCode != null and isCode != ''">#{isCode},</if>
<if test="unit != null and unit != ''">#{unit},</if>
<if test="unit1 != null and unit1 != ''">#{unit1},</if>
<if test="unit2 != null and unit2 != ''">#{unit2},</if>
<if test="price != null">#{price},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="ruleNation != null and ruleNation != ''">#{ruleNation},</if>
<if test="manufEnterprise != null and manufEnterprise != ''">#{manufEnterprise},</if>
<if test="ebcCode != null and ebcCode != ''">#{ebcCode},</if>
<if test="ciqCode != null and ciqCode != ''">#{ciqCode},</if>
<if test="function != null and function != ''">#{function},</if>
<if test="ingredients != null and ingredients != ''">#{ingredients},</if>
<if test="purpose != null and purpose != ''">#{purpose},</if>
<if test="productValidity != null and productValidity != ''">#{productValidity},</if>
<if test="cebpMode != null and cebpMode != ''">#{cebpMode},</if>
<if test="supplier != null and supplier != ''">#{supplier},</if>
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
<if test="status != null">#{status},</if>
<if test="statusMessage != null and statusMessage != ''">#{statusMessage},</if>
<if test="goodsSn2 != null and goodsSn2 != ''">#{goodsSn2},</if>
<if test="goodsNo2 != null and goodsNo2 != ''">#{goodsNo2},</if>
<if test="licNo != null and licNo != ''">#{licNo},</if>
<if test="materialPath != null and materialPath != ''">#{materialPath},</if>
<if test="pd != null and pd != ''">#{pd},</if>
<if test="saleUrl != null and saleUrl != ''">#{saleUrl},</if>
<if test="portCode != null and portCode != ''">#{portCode},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisGoods" parameterType="EmisGoods">
update emis_goods
<trim prefix="SET" suffixOverrides=",">
<if test="goodsCode != null and goodsCode != ''">goods_code = #{goodsCode},</if>
<if test="goodsName != null and goodsName != ''">goods_name = #{goodsName},</if>
<if test="goodsNameEn != null and goodsNameEn != ''">goods_name_en = #{goodsNameEn},</if>
<if test="goodsCat != null and goodsCat != ''">goods_cat = #{goodsCat},</if>
<if test="goodsType != null and goodsType != ''">goods_type = #{goodsType},</if>
<if test="goodsModel != null and goodsModel != ''">goods_model = #{goodsModel},</if>
<if test="barcode != null and barcode != ''">barcode = #{barcode},</if>
<if test="nationArea != null and nationArea != ''">nation_area = #{nationArea},</if>
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</if>
<if test="ownerCode != null and ownerCode != ''">owner_code = #{ownerCode},</if>
<if test="isRealGoods != null">is_real_goods = #{isRealGoods},</if>
<if test="isBigCat != null">is_big_cat = #{isBigCat},</if>
<if test="brand != null and brand != ''">brand = #{brand},</if>
<if test="material != null and material != ''">material = #{material},</if>
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
<if test="netWeight != null">net_weight = #{netWeight},</if>
<if test="singleVolume != null and singleVolume != ''">single_volume = #{singleVolume},</if>
<if test="singleLength != null">single_length = #{singleLength},</if>
<if test="singleWidth != null">single_width = #{singleWidth},</if>
<if test="singleHeight != null">single_height = #{singleHeight},</if>
<if test="pkgPcs != null">pkg_pcs = #{pkgPcs},</if>
<if test="pkgVolume != null">pkg_volume = #{pkgVolume},</if>
<if test="pkgLength != null">pkg_length = #{pkgLength},</if>
<if test="pkgWidth != null">pkg_width = #{pkgWidth},</if>
<if test="pkgHeight != null">pkg_height = #{pkgHeight},</if>
<if test="taxNo != null and taxNo != ''">tax_no = #{taxNo},</if>
<if test="hsCode != null and hsCode != ''">hs_code = #{hsCode},</if>
<if test="isCode != null and isCode != ''">is_code = #{isCode},</if>
<if test="unit != null and unit != ''">unit = #{unit},</if>
<if test="unit1 != null and unit1 != ''">unit1 = #{unit1},</if>
<if test="unit2 != null and unit2 != ''">unit2 = #{unit2},</if>
<if test="price != null">price = #{price},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="ruleNation != null and ruleNation != ''">rule_nation = #{ruleNation},</if>
<if test="manufEnterprise != null and manufEnterprise != ''">manuf_enterprise = #{manufEnterprise},</if>
<if test="ebcCode != null and ebcCode != ''">ebc_code = #{ebcCode},</if>
<if test="ciqCode != null and ciqCode != ''">ciq_code = #{ciqCode},</if>
<if test="function != null and function != ''">function = #{function},</if>
<if test="ingredients != null and ingredients != ''">ingredients = #{ingredients},</if>
<if test="purpose != null and purpose != ''">purpose = #{purpose},</if>
<if test="productValidity != null and productValidity != ''">product_validity = #{productValidity},</if>
<if test="cebpMode != null and cebpMode != ''">cebp_mode = #{cebpMode},</if>
<if test="supplier != null and supplier != ''">supplier = #{supplier},</if>
<if test="serialNumber != null and serialNumber != ''">serial_number = #{serialNumber},</if>
<if test="status != null">status = #{status},</if>
<if test="statusMessage != null and statusMessage != ''">status_message = #{statusMessage},</if>
<if test="goodsSn2 != null and goodsSn2 != ''">goods_sn2 = #{goodsSn2},</if>
<if test="goodsNo2 != null and goodsNo2 != ''">goods_no2 = #{goodsNo2},</if>
<if test="licNo != null and licNo != ''">lic_no = #{licNo},</if>
<if test="materialPath != null and materialPath != ''">material_path = #{materialPath},</if>
<if test="pd != null and pd != ''">pd = #{pd},</if>
<if test="saleUrl != null and saleUrl != ''">sale_url = #{saleUrl},</if>
<if test="portCode != null and portCode != ''">port_code = #{portCode},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisGoodsById" parameterType="Long">
delete from emis_goods where id = #{id}
</delete>
<delete id="deleteEmisGoodsByIds" parameterType="String">
delete from emis_goods where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>