123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- <?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.emato.biz.mapper.mall.MallShopInveMngMapper">
- <resultMap type="MallShopInveMng" id="MallShopInveMngResult">
- <result property="shopInveSn" column="shop_inve_sn" />
- <result property="shopSn" column="shop_sn" />
- <result property="shopName" column="shop_name" />
- <result property="merchSn" column="merch_sn" />
- <result property="merchName" column="merch_name" />
- <result property="thirdPartyMerchCode" column="third_party_merch_code" />
- <result property="thirdPartyMerchName" column="third_party_merch_name" />
- <result property="sku" column="sku" />
- <result property="cusCode" column="cus_code" />
- <result property="goodsBizType" column="goods_biz_type" />
- <result property="shopInve" column="shop_inve" />
- <result property="shopValid" column="shop_valid" />
- <result property="shopFreezeNum" column="shop_freeze_num" />
- <result property="shopDamageNum" column="shop_damage_num" />
- <result property="shopDestroyLostNum" column="shop_destroy_lost_num" />
- <result property="shopExpireNum" column="shop_expire_num" />
- <result property="shopSampleFreezeNum" column="shop_sample_freeze_num" />
- <result property="shopMinus" column="shop_minus" />
- <result property="shopSupp" column="shop_supp" />
- <result property="inQty" column="in_qty" />
- <result property="outQty" column="out_qty" />
- <result property="returnQty" column="return_qty" />
- <result property="saleQty" column="sale_qty" />
- <result property="locInQty" column="loc_in_qty" />
- <result property="locOutQty" column="loc_out_qty" />
- <result property="isValid" column="is_valid" />
- <result property="createrSn" column="creater_sn" />
- <result property="createTime" column="create_time" />
- <result property="moderSn" column="moder_sn" />
- <result property="modTime" column="mod_time" />
- <result property="tstm" column="tstm" />
- </resultMap>
- <sql id="selectMallShopInveMngVo">
- SELECT
- t1.shop_inve_sn,
- t1.shop_sn,
- t2.store_name as shop_name,
- t1.merch_sn,
- t2.merch_name ,
- t2.third_party_merch_code,
- t2.third_party_merch_name,
- t1.sku,
- t1.cus_code,
- t1.goods_biz_type,
- t1.shop_inve,
- t1.shop_valid,
- t1.shop_freeze_num,
- t1.shop_damage_num,
- t1.shop_destroy_lost_num,
- t1.shop_expire_num,
- t1.shop_sample_freeze_num,
- t1.shop_minus,
- t1.shop_supp,
- t1.in_qty,
- t1.out_qty,
- t1.return_qty,
- t1.sale_qty,
- t1.loc_in_qty,
- t1.loc_out_qty,
- t1.is_valid
- FROM
- mall_shop_inve_mng t1,
- mall_store t2
- </sql>
- <select id="selectMallShopInveMngList" parameterType="MallShopInveMng" resultMap="MallShopInveMngResult">
- <include refid="selectMallShopInveMngVo"/>
- <where>
- t1.shop_sn = t2.id
- <if test="shopName != null and shopName != ''"> and t2.store_name like concat('%', #{shopName}, '%')</if>
- <if test="merchName != null and merchName != ''"> and t2.third_party_merch_name like concat('%', #{merchName}, '%')</if>
- <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''"> and t2.third_party_merch_code = #{thirdPartyMerchCode}</if>
- <if test="thirdPartyMerchName != null and thirdPartyMerchName != ''"> and t2.third_party_merch_name like concat('%', #{thirdPartyMerchName}, '%')</if>
- <if test="sku != null and sku != ''"> and t1.sku = #{sku}</if>
- <if test="cusCode != null and cusCode != ''"> and t1.cus_code = #{cusCode}</if>
- <if test="goodsBizType != null and goodsBizType != ''"> and t1.goods_biz_type = #{goodsBizType}</if>
- <if test="isValid != null and isValid != ''"> and t1.is_valid = #{isValid}</if>
- </where>
- </select>
- <select id="selectMallShopInveMngById" parameterType="String" resultMap="MallShopInveMngResult">
- <include refid="selectMallShopInveMngVo"/>
- where shop_inve_sn = #{shopInveSn} and t1.shop_sn = t2.id
- </select>
- <insert id="insertMallShopInveMng" parameterType="MallShopInveMng">
- insert into mall_shop_inve_mng
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="shopInveSn != null">shop_inve_sn,</if>
- <if test="shopSn != null">shop_sn,</if>
- <if test="shopName != null">shop_name,</if>
- <if test="merchSn != null">merch_sn,</if>
- <if test="merchName != null">merch_name,</if>
- <if test="thirdPartyMerchCode != null">third_party_merch_code,</if>
- <if test="thirdPartyMerchName != null">third_party_merch_name,</if>
- <if test="sku != null">sku,</if>
- <if test="cusCode != null">cus_code,</if>
- <if test="goodsBizType != null">goods_biz_type,</if>
- <if test="shopInve != null">shop_inve,</if>
- <if test="shopValid != null">shop_valid,</if>
- <if test="shopFreezeNum != null">shop_freeze_num,</if>
- <if test="shopDamageNum != null">shop_damage_num,</if>
- <if test="shopDestroyLostNum != null">shop_destroy_lost_num,</if>
- <if test="shopExpireNum != null">shop_expire_num,</if>
- <if test="shopSampleFreezeNum != null">shop_sample_freeze_num,</if>
- <if test="shopMinus != null">shop_minus,</if>
- <if test="shopSupp != null">shop_supp,</if>
- <if test="inQty != null">in_qty,</if>
- <if test="outQty != null">out_qty,</if>
- <if test="returnQty != null">return_qty,</if>
- <if test="saleQty != null">sale_qty,</if>
- <if test="locInQty != null">loc_in_qty,</if>
- <if test="locOutQty != null">loc_out_qty,</if>
- <if test="isValid != null">is_valid,</if>
- <if test="createrSn != null">creater_sn,</if>
- <if test="createTime != null">create_time,</if>
- <if test="moderSn != null">moder_sn,</if>
- <if test="modTime != null">mod_time,</if>
- <if test="tstm != null">tstm,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="shopInveSn != null">#{shopInveSn},</if>
- <if test="shopSn != null">#{shopSn},</if>
- <if test="shopName != null">#{shopName},</if>
- <if test="merchSn != null">#{merchSn},</if>
- <if test="merchName != null">#{merchName},</if>
- <if test="thirdPartyMerchCode != null">#{thirdPartyMerchCode},</if>
- <if test="thirdPartyMerchName != null">#{thirdPartyMerchName},</if>
- <if test="sku != null">#{sku},</if>
- <if test="cusCode != null">#{cusCode},</if>
- <if test="goodsBizType != null">#{goodsBizType},</if>
- <if test="shopInve != null">#{shopInve},</if>
- <if test="shopValid != null">#{shopValid},</if>
- <if test="shopFreezeNum != null">#{shopFreezeNum},</if>
- <if test="shopDamageNum != null">#{shopDamageNum},</if>
- <if test="shopDestroyLostNum != null">#{shopDestroyLostNum},</if>
- <if test="shopExpireNum != null">#{shopExpireNum},</if>
- <if test="shopSampleFreezeNum != null">#{shopSampleFreezeNum},</if>
- <if test="shopMinus != null">#{shopMinus},</if>
- <if test="shopSupp != null">#{shopSupp},</if>
- <if test="inQty != null">#{inQty},</if>
- <if test="outQty != null">#{outQty},</if>
- <if test="returnQty != null">#{returnQty},</if>
- <if test="saleQty != null">#{saleQty},</if>
- <if test="locInQty != null">#{locInQty},</if>
- <if test="locOutQty != null">#{locOutQty},</if>
- <if test="isValid != null">#{isValid},</if>
- <if test="createrSn != null">#{createrSn},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="moderSn != null">#{moderSn},</if>
- <if test="modTime != null">#{modTime},</if>
- <if test="tstm != null">#{tstm},</if>
- </trim>
- </insert>
- <update id="updateMallShopInveMng" parameterType="MallShopInveMng">
- update mall_shop_inve_mng
- <trim prefix="SET" suffixOverrides=",">
- <if test="shopSn != null">shop_sn = #{shopSn},</if>
- <if test="shopName != null">shop_name = #{shopName},</if>
- <if test="merchSn != null">merch_sn = #{merchSn},</if>
- <if test="merchName != null">merch_name = #{merchName},</if>
- <if test="thirdPartyMerchCode != null">third_party_merch_code = #{thirdPartyMerchCode},</if>
- <if test="thirdPartyMerchName != null">third_party_merch_name = #{thirdPartyMerchName},</if>
- <if test="sku != null">sku = #{sku},</if>
- <if test="cusCode != null">cus_code = #{cusCode},</if>
- <if test="goodsBizType != null">goods_biz_type = #{goodsBizType},</if>
- <if test="shopInve != null">shop_inve = #{shopInve},</if>
- <if test="shopValid != null">shop_valid = #{shopValid},</if>
- <if test="shopFreezeNum != null">shop_freeze_num = #{shopFreezeNum},</if>
- <if test="shopDamageNum != null">shop_damage_num = #{shopDamageNum},</if>
- <if test="shopDestroyLostNum != null">shop_destroy_lost_num = #{shopDestroyLostNum},</if>
- <if test="shopExpireNum != null">shop_expire_num = #{shopExpireNum},</if>
- <if test="shopSampleFreezeNum != null">shop_sample_freeze_num = #{shopSampleFreezeNum},</if>
- <if test="shopMinus != null">shop_minus = #{shopMinus},</if>
- <if test="shopSupp != null">shop_supp = #{shopSupp},</if>
- <if test="inQty != null">in_qty = #{inQty},</if>
- <if test="outQty != null">out_qty = #{outQty},</if>
- <if test="returnQty != null">return_qty = #{returnQty},</if>
- <if test="saleQty != null">sale_qty = #{saleQty},</if>
- <if test="locInQty != null">loc_in_qty = #{locInQty},</if>
- <if test="locOutQty != null">loc_out_qty = #{locOutQty},</if>
- <if test="isValid != null">is_valid = #{isValid},</if>
- <if test="createrSn != null">creater_sn = #{createrSn},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="moderSn != null">moder_sn = #{moderSn},</if>
- <if test="modTime != null">mod_time = #{modTime},</if>
- <if test="tstm != null">tstm = #{tstm},</if>
- </trim>
- where shop_inve_sn = #{shopInveSn}
- </update>
- <delete id="deleteMallShopInveMngById" parameterType="String">
- delete from mall_shop_inve_mng where shop_inve_sn = #{shopInveSn}
- </delete>
- <delete id="deleteMallShopInveMngByIds" parameterType="String">
- delete from mall_shop_inve_mng where shop_inve_sn in
- <foreach item="shopInveSn" collection="array" open="(" separator="," close=")">
- #{shopInveSn}
- </foreach>
- </delete>
- <insert id="saveOrUpdate" parameterType="MallShopInveMng">
- insert into mall_shop_inve_mng
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="shopInveSn != null">shop_inve_sn,</if>
- <if test="shopSn != null">shop_sn,</if>
- <if test="shopName != null">shop_name,</if>
- <if test="merchSn != null">merch_sn,</if>
- <if test="merchName != null">merch_name,</if>
- <if test="thirdPartyMerchCode != null">third_party_merch_code,</if>
- <if test="thirdPartyMerchName != null">third_party_merch_name,</if>
- <if test="sku != null">sku,</if>
- <if test="cusCode != null">cus_code,</if>
- <if test="goodsBizType != null">goods_biz_type,</if>
- <if test="shopInve != null">shop_inve,</if>
- <if test="shopValid != null">shop_valid,</if>
- <if test="shopFreezeNum != null">shop_freeze_num,</if>
- <if test="shopDamageNum != null">shop_damage_num,</if>
- <if test="shopDestroyLostNum != null">shop_destroy_lost_num,</if>
- <if test="shopExpireNum != null">shop_expire_num,</if>
- <if test="shopSampleFreezeNum != null">shop_sample_freeze_num,</if>
- <if test="shopMinus != null">shop_minus,</if>
- <if test="shopSupp != null">shop_supp,</if>
- <if test="inQty != null">in_qty,</if>
- <if test="outQty != null">out_qty,</if>
- <if test="returnQty != null">return_qty,</if>
- <if test="saleQty != null">sale_qty,</if>
- <if test="locInQty != null">loc_in_qty,</if>
- <if test="locOutQty != null">loc_out_qty,</if>
- <if test="isValid != null">is_valid,</if>
- <if test="createrSn != null">creater_sn,</if>
- <if test="createTime != null">create_time,</if>
- <if test="moderSn != null">moder_sn,</if>
- <if test="modTime != null">mod_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="shopInveSn != null">#{shopInveSn},</if>
- <if test="shopSn != null">#{shopSn},</if>
- <if test="shopName != null">#{shopName},</if>
- <if test="merchSn != null">#{merchSn},</if>
- <if test="merchName != null">#{merchName},</if>
- <if test="thirdPartyMerchCode != null">#{thirdPartyMerchCode},</if>
- <if test="thirdPartyMerchName != null">#{thirdPartyMerchName},</if>
- <if test="sku != null">#{sku},</if>
- <if test="cusCode != null">#{cusCode},</if>
- <if test="goodsBizType != null">#{goodsBizType},</if>
- <if test="shopInve != null">#{shopInve},</if>
- <if test="shopValid != null">#{shopValid},</if>
- <if test="shopFreezeNum != null">#{shopFreezeNum},</if>
- <if test="shopDamageNum != null">#{shopDamageNum},</if>
- <if test="shopDestroyLostNum != null">#{shopDestroyLostNum},</if>
- <if test="shopExpireNum != null">#{shopExpireNum},</if>
- <if test="shopSampleFreezeNum != null">#{shopSampleFreezeNum},</if>
- <if test="shopMinus != null">#{shopMinus},</if>
- <if test="shopSupp != null">#{shopSupp},</if>
- <if test="inQty != null">#{inQty},</if>
- <if test="outQty != null">#{outQty},</if>
- <if test="returnQty != null">#{returnQty},</if>
- <if test="saleQty != null">#{saleQty},</if>
- <if test="locInQty != null">#{locInQty},</if>
- <if test="locOutQty != null">#{locOutQty},</if>
- <if test="isValid != null">#{isValid},</if>
- <if test="createrSn != null">#{createrSn},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="moderSn != null">#{moderSn},</if>
- <if test="modTime != null">#{modTime},</if>
- </trim>
- ON DUPLICATE KEY UPDATE
- <trim prefix="" suffixOverrides=",">
- <if test="shopSn != null">shop_sn = #{shopSn},</if>
- <if test="shopName != null">shop_name = #{shopName},</if>
- <if test="merchSn != null">merch_sn = #{merchSn},</if>
- <if test="merchName != null">merch_name = #{merchName},</if>
- <if test="thirdPartyMerchCode != null">third_party_merch_code = #{thirdPartyMerchCode},</if>
- <if test="thirdPartyMerchName != null">third_party_merch_name = #{thirdPartyMerchName},</if>
- <if test="sku != null">sku = #{sku},</if>
- <if test="cusCode != null">cus_code = #{cusCode},</if>
- <if test="goodsBizType != null">goods_biz_type = #{goodsBizType},</if>
- <if test="shopInve != null">shop_inve = #{shopInve},</if>
- <if test="shopValid != null">shop_valid = #{shopValid},</if>
- <if test="shopFreezeNum != null">shop_freeze_num = #{shopFreezeNum},</if>
- <if test="shopDamageNum != null">shop_damage_num = #{shopDamageNum},</if>
- <if test="shopDestroyLostNum != null">shop_destroy_lost_num = #{shopDestroyLostNum},</if>
- <if test="shopExpireNum != null">shop_expire_num = #{shopExpireNum},</if>
- <if test="shopSampleFreezeNum != null">shop_sample_freeze_num = #{shopSampleFreezeNum},</if>
- <if test="shopMinus != null">shop_minus = #{shopMinus},</if>
- <if test="shopSupp != null">shop_supp = #{shopSupp},</if>
- <if test="inQty != null">in_qty = #{inQty},</if>
- <if test="outQty != null">out_qty = #{outQty},</if>
- <if test="returnQty != null">return_qty = #{returnQty},</if>
- <if test="saleQty != null">sale_qty = #{saleQty},</if>
- <if test="locInQty != null">loc_in_qty = #{locInQty},</if>
- <if test="locOutQty != null">loc_out_qty = #{locOutQty},</if>
- <if test="isValid != null">is_valid = #{isValid},</if>
- <if test="createrSn != null">creater_sn = #{createrSn},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="moderSn != null">moder_sn = #{moderSn},</if>
- <if test="modTime != null">mod_time = #{modTime},</if>
- </trim>
- </insert>
- </mapper>
|