| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?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.cyksj.mapper.GoodsDonSkuMapper">
- <select id="selectAIMonthSkuIds" resultType="java.lang.Long">
- select id from goods_don_sku where goods_id in
- <foreach collection="list" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- and `months` = 1
- </select>
- <select id="getSpecificSkuIdsByGoodsIds" resultType="java.lang.Long">
- select id from goods_don_sku where goods_id in
- <foreach collection="list" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- and `months` = #{months}
- </select>
- <select id="getSpecificSkuIdsByGoodsId" resultType="java.lang.Long">
- select id
- from goods_don_sku
- where goods_id = #{goodsId}
- and num = #{num}
- and `months` = #{months}
- </select>
- <select id="selectSkuShops" resultType="com.cyksj.model.entity.YhShopGoodsSku">
- select id as skuId,goods_id,price from goods_don_sku where goods_id in
- <foreach collection="list" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- and status = true
- </select>
- <select id="selectSingleSkuIdsByGoodsId" resultType="java.lang.Long">
- select id from goods_don_sku where goods_id = #{goodsId} and num = 1
- </select>
- <select id="checkAndReturnMinPriceUserOwnsSku" resultType="com.cyksj.model.entity.GoodsDonSku">
- select id,price,months,days
- from goods_don_sku
- where goods_id = #{goodsId}
- and status is true
- and (user_owns is null
- <if test="dsUserId != 0">
- or JSON_CONTAINS(user_owns, '${dsUserId}')
- </if>) order by price limit 1
- </select>
- <select id="selectRenewOriSku" resultType="com.cyksj.model.dto.OriSkuDto">
- select *
- from goods_don_sku
- where id = #{skuId}
- limit 1
- </select>
- </mapper>
|