add groovy script
This commit is contained in:
@@ -11,11 +11,16 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectActiveByStoreIdAndEventId" resultType="com.imyeyu.api.modules.gao.entity.GaoPointRule">
|
||||
<select id="selectActiveByTrigger" resultType="com.imyeyu.api.modules.gao.entity.GaoPointRule">
|
||||
SELECT *
|
||||
FROM `gao_point_rule`
|
||||
WHERE `store_id` = #{storeId}
|
||||
AND `event_id` = #{eventId}
|
||||
AND `trigger_source_type` = #{triggerSourceType}
|
||||
AND (`trigger_ref_id` IS NULL
|
||||
<if test="triggerRefId != null and triggerRefId != ''">
|
||||
OR `trigger_ref_id` = #{triggerRefId}
|
||||
</if>
|
||||
)
|
||||
AND `status` = 'ACTIVE'
|
||||
AND (`begin_at` IS NULL OR `begin_at` <= #{now})
|
||||
AND (`end_at` IS NULL OR #{now} <= `end_at`)
|
||||
|
||||
Reference in New Issue
Block a user