mitao
2025-03-14 392b42c4891cf2e6beda57ab32c51598f290f4b7
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
<?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.ruoyi.promotion.mapper.PromotionWishRecommendMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.api.domain.PromotionWishRecommend">
        <id column="id" property="id" />
        <result column="wish_id" property="wishId" />
        <result column="goods_name" property="goodsName" />
        <result column="selling_price" property="sellingPrice" />
        <result column="available_num" property="availableNum" />
        <result column="goods_image_url" property="goodsImageUrl" />
        <result column="expire_time" property="expireTime" />
        <result column="purchase_status" property="purchaseStatus" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="del_flag" property="delFlag" />
    </resultMap>
    <update id="subRecommendAvailableNum">
        UPDATE t_promotion_wish_recommend SET available_num = available_num - #{goodsQuantity}
        WHERE id = #{id} AND available_num &gt;= #{goodsQuantity}
    </update>
 
</mapper>