xiaoyong931011
2021-11-10 feda6b70c8381453bab437d73341b1e7dd60bf10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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.xzx.gc.shop.mapper.ScoreGoodsSkuMapper">
 
 
    <select id="selectScoreGoodsSkuByGoodsIdAndStyleId" resultType="com.xzx.gc.shop.vo.ScoreGoodsSkuVo">
        SELECT
            a.*
        FROM
            xzx_score_goods_sku a
        WHERE 1 = 1
          and a.goods_id = #{id}
          and a.style_id = #{styleId}
          and a.del_flag != 1
    </select>
 
 
    <update id="updateDelFlagById">
        update xzx_score_goods_sku set del_flag=#{delFlag}
        where id=#{id}
    </update>
 
    <select id="selectScoreGoodsSkuMapperByGoodId" resultType="java.lang.Integer">
        SELECT
            ifnull(sum(a.stock),0) stock
        FROM
            xzx_score_goods_sku a
        WHERE 1 = 1
          and a.goods_id = #{id}
    </select>
 
</mapper>