WbMerchShopInveMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.emato.biz.mapper.warehouse.WbMerchShopInveMapper">
  6. <resultMap type="com.emato.biz.domain.warehouse.OWbMerchShopInve" id="OWbMerchShopInveResult">
  7. <result property="shopName" column="shop_name" />
  8. <result property="shopInveSn" column="shop_inve_sn" />
  9. <result property="shopSn" column="shop_sn" />
  10. <result property="merchSn" column="merch_sn" />
  11. <result property="merchName" column="merch_name" />
  12. <result property="thirdPartyMerchCode" column="third_party_merch_code" />
  13. <result property="thirdPartyMerchName" column="third_party_merch_name" />
  14. <result property="sku" column="sku" />
  15. <result property="cusCode" column="cus_code" />
  16. <result property="bondedCode" column="bonded_code" />
  17. <result property="wareSn" column="ware_sn" />
  18. <result property="goodsBizType" column="goods_biz_type" />
  19. <result property="shopInve" column="shop_inve" />
  20. <result property="shopValid" column="shop_valid" />
  21. <result property="shopFreezeNum" column="shop_freeze_num" />
  22. <result property="shopDamageNum" column="shop_damage_num" />
  23. <result property="shopDestroyLostNum" column="shop_destroy_lost_num" />
  24. <result property="shopExpireNum" column="shop_expire_num" />
  25. <result property="shopSampleFreezeNum" column="shop_sample_freeze_num" />
  26. <result property="shopMinus" column="shop_minus" />
  27. <result property="shopSupp" column="shop_supp" />
  28. <result property="inQty" column="in_qty" />
  29. <result property="outQty" column="out_qty" />
  30. <result property="returnQty" column="return_qty" />
  31. <result property="saleQty" column="sale_qty" />
  32. <result property="locInQty" column="loc_in_qty" />
  33. <result property="locOutQty" column="loc_out_qty" />
  34. <result property="isValid" column="is_valid" />
  35. <result property="createrSn" column="creater_sn" />
  36. <result property="createTime" column="create_time" />
  37. <result property="moderSn" column="moder_sn" />
  38. <result property="modTime" column="mod_time" />
  39. </resultMap>
  40. <sql id="selectWbMerchShopInveColumn">
  41. t.shop_inve_sn,
  42. t.shop_sn,
  43. t.merch_sn,
  44. t.merch_name,
  45. t.third_party_merch_code,
  46. t.third_party_merch_name,
  47. t.sku,
  48. t.cus_code,
  49. t.bonded_code,
  50. t.ware_sn,
  51. t.goods_biz_type,
  52. t.shop_inve,
  53. t.shop_valid,
  54. t.shop_freeze_num,
  55. t.shop_damage_num,
  56. t.shop_destroy_lost_num,
  57. t.shop_expire_num,
  58. t.shop_sample_freeze_num,
  59. t.shop_minus,
  60. t.shop_supp,
  61. t.in_qty,
  62. t.out_qty,
  63. t.return_qty,
  64. t.sale_qty,
  65. t.loc_in_qty,
  66. t.loc_out_qty,
  67. t.is_valid,
  68. t.creater_sn,
  69. t.create_time,
  70. t.moder_sn,
  71. t.mod_time
  72. </sql>
  73. <!-- 查询门店库存 -->
  74. <select id="selectWbMerchShopInveList" resultType="com.emato.biz.domain.warehouse.OWbMerchShopInve">
  75. SELECT
  76. <include refid="selectWbMerchShopInveColumn"/>,
  77. t1.shop_name
  78. FROM
  79. wb_merch_shop_inve t
  80. LEFT JOIN o_wb_shop_base t1 ON t1.shop_sn = t.shop_sn
  81. <where>
  82. <if test="shopSn != null and shopSn != ''"> and t.shop_sn = #{shopSn}</if>
  83. <if test="merchSn != null and merchSn != ''"> and t.merch_sn = #{merchSn}</if>
  84. <if test="merchName != null and merchName != ''"> and t.merch_name like concat('%', #{merchName}, '%')</if>
  85. <if test="thirdPartyMerchCode != null and thirdPartyMerchCode != ''"> and t.third_party_merch_code = #{thirdPartyMerchCode}</if>
  86. <if test="thirdPartyMerchName != null and thirdPartyMerchName != ''"> and t.third_party_merch_name like concat('%', #{thirdPartyMerchName}, '%')</if>
  87. <if test="sku != null and sku != ''"> and t.sku = #{sku}</if>
  88. <if test="cusCode != null and cusCode != ''"> and t.cus_code = #{cusCode}</if>
  89. <if test="bondedCode != null and bondedCode != ''"> and t.bonded_code = #{bondedCode}</if>
  90. <if test="wareSn != null and wareSn != ''"> and t.ware_sn = #{wareSn}</if>
  91. <if test="goodsBizType != null and goodsBizType != ''"> and t.goods_biz_type = #{goodsBizType}</if>
  92. <if test="isValid != null and isValid != ''"> and t.is_valid = #{isValid}</if>
  93. <if test="shopName != null and shopName != ''"> and t1.shop_name like concat('%', #{shopName}, '%') </if>
  94. </where>
  95. </select>
  96. </mapper>