Commit 566d9ae7 by fz

1.过滤只处理含有时间触发条件的场景

1 parent 6208583b
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
<!-- 查询符合周期(每天+当天类型)且满足任意条件触发 --> <!-- 查询符合周期(每天+当天类型)且满足任意条件触发 -->
<select id="getScenseAnyCondition" resultMap="BaseResultMap"> <select id="getScenseAnyCondition" resultMap="BaseResultMap">
select smsd.* from smart_scene sms INNER JOIN smart_scene_data smsd on sms.id = smsd.scene_id where sms.status = 1 and smsd.param_key = scene_condition_time and sms.execute_cycle in (1,#{executeCycle}) and sms.condition_rule = 1 and smsd.type = 1 select smsd.* from smart_scene sms INNER JOIN smart_scene_data smsd on sms.id = smsd.scene_id where sms.status = 1 and smsd.param_key = 'scene_condition_time' and sms.execute_cycle in (1,#{executeCycle}) and sms.condition_rule = 1 and smsd.type = 1
</select> </select>
<!-- 查询符合周期(每天+当天类型)且满足全部条件触发 --> <!-- 查询符合周期(每天+当天类型)且满足全部条件触发 -->
<select id="getScenseAllCondition" resultMap="BaseResultMap"> <select id="getScenseAllCondition" resultMap="BaseResultMap">
select smsd.* from smart_scene sms INNER JOIN smart_scene_data smsd on sms.id = smsd.scene_id where sms.status = 1 and smsd.param_key = scene_condition_time and sms.execute_cycle in (1,#{executeCycle}) and sms.condition_rule = 2 and smsd.type = 1 select smsd.* from smart_scene sms INNER JOIN smart_scene_data smsd on sms.id = smsd.scene_id where sms.status = 1 and smsd.param_key = 'scene_condition_time' and sms.execute_cycle in (1,#{executeCycle}) and sms.condition_rule = 2 and smsd.type = 1
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!