<?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 >= #{goodsQuantity}
|
</update>
|
|
</mapper>
|