会员 充值活动 奖励 赠送商品

This commit is contained in:
2024-08-21 09:29:50 +08:00
parent 9fcee207d5
commit fbb69e60d9
15 changed files with 856 additions and 56 deletions

View File

@@ -9,9 +9,10 @@
<result column="handsel_num" jdbcType="DECIMAL" property="handselNum" />
<result column="handsel_type" jdbcType="VARCHAR" property="handselType" />
<result column="is_del" jdbcType="VARCHAR" property="isDel" />
<result column="is_gift_pro" jdbcType="INTEGER" property="isGiftPro" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, min_num, max_num, handsel_num, handsel_type, is_del
id, shop_id, min_num, max_num, handsel_num, handsel_type, is_del,is_gift_pro
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -116,10 +117,16 @@
</update>
<select id="selectByAmount" resultMap="BaseResultMap">
select * from tb_activate where shop_id=#{shopId} and is_del=0 and min_num &lt;= #{amount} and max_num &gt;= #{amount}
</select>
select *
from tb_activate
where shop_id = #{shopId}
and is_del = 0
and min_num &lt;= #{amount}
and max_num &gt;= #{amount}
order by max_num desc limit 1
</select>
<select id="selectByShpopId" resultMap="BaseResultMap">
<select id="selectByShopId" resultMap="BaseResultMap">
select * from tb_activate where shop_id=#{shopId}
</select>
</mapper>