GoodsDonSkuMapper.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.cyksj.mapper.GoodsDonSkuMapper">
  4. <select id="selectAIMonthSkuIds" resultType="java.lang.Long">
  5. select id from goods_don_sku where goods_id in
  6. <foreach collection="list" item="item" open="(" separator="," close=")">
  7. #{item}
  8. </foreach>
  9. and `months` = 1
  10. </select>
  11. <select id="getSpecificSkuIdsByGoodsIds" resultType="java.lang.Long">
  12. select id from goods_don_sku where goods_id in
  13. <foreach collection="list" item="item" open="(" separator="," close=")">
  14. #{item}
  15. </foreach>
  16. and `months` = #{months}
  17. </select>
  18. <select id="getSpecificSkuIdsByGoodsId" resultType="java.lang.Long">
  19. select id
  20. from goods_don_sku
  21. where goods_id = #{goodsId}
  22. and num = #{num}
  23. and `months` = #{months}
  24. </select>
  25. <select id="selectSkuShops" resultType="com.cyksj.model.entity.YhShopGoodsSku">
  26. select id as skuId,goods_id,price from goods_don_sku where goods_id in
  27. <foreach collection="list" item="item" open="(" separator="," close=")">
  28. #{item}
  29. </foreach>
  30. and status = true
  31. </select>
  32. </mapper>