微信小程序分类查询(优惠券错误)完成

This commit is contained in:
yovinchen 2023-10-07 14:41:35 +08:00
parent e06c84fc4d
commit cfeefe2dc6
2 changed files with 10 additions and 9 deletions

View File

@ -216,6 +216,4 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
}); });
return result; return result;
} }
} }

View File

@ -58,7 +58,7 @@
<!--//根据skuId进行查询查询sku对应活动里面规则列表--> <!--//根据skuId进行查询查询sku对应活动里面规则列表-->
<select id="findActivityRule" resultMap="ActivityRuleMap"> <select id="findActivityRule" resultMap="ActivityRuleMap">
select DISTINCT rule.id, select rule.id,
info.activity_type as activityType, info.activity_type as activityType,
rule.activity_id, rule.activity_id,
rule.condition_amount, rule.condition_amount,
@ -70,6 +70,9 @@
inner join activity_rule rule on info.id = rule.activity_id inner join activity_rule rule on info.id = rule.activity_id
where sku.sku_id = #{skuId} where sku.sku_id = #{skuId}
and now() between info.start_time and info.end_time and now() between info.start_time and info.end_time
and sku.is_deleted = 0
and info.is_deleted = 0
and rule.is_deleted = 0
order by rule.condition_amount desc order by rule.condition_amount desc
</select> </select>