feat: 天气系统规则引擎
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?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.central.order.weather.mapper.WeatherCheckLogMapper">
|
||||
|
||||
<resultMap id="WeatherCheckLogResultMap" type="com.central.order.weather.model.WeatherCheckLog">
|
||||
<id column="id" property="id"/>
|
||||
<result column="check_id" property="checkId"/>
|
||||
<result column="biz_type" property="bizType"/>
|
||||
<result column="biz_id" property="bizId"/>
|
||||
<result column="device_sn" property="deviceSn"/>
|
||||
<result column="tourism_id" property="tourismId"/>
|
||||
<result column="location_key" property="locationKey"/>
|
||||
<result column="check_result" property="checkResult"/>
|
||||
<result column="rule_code" property="ruleCode"/>
|
||||
<result column="fail_reasons" property="failReasons"
|
||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||||
<result column="weather_snapshot" property="weatherSnapshot"
|
||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||||
<result column="check_time" property="checkTime"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findList" resultMap="WeatherCheckLogResultMap">
|
||||
SELECT * FROM weather_check_log
|
||||
<where>
|
||||
<if test="p.checkId != null and p.checkId != ''">
|
||||
AND check_id = #{p.checkId}
|
||||
</if>
|
||||
<if test="p.bizType != null">
|
||||
AND biz_type = #{p.bizType}
|
||||
</if>
|
||||
<if test="p.bizId != null and p.bizId != ''">
|
||||
AND biz_id = #{p.bizId}
|
||||
</if>
|
||||
<if test="p.deviceSn != null and p.deviceSn != ''">
|
||||
AND device_sn = #{p.deviceSn}
|
||||
</if>
|
||||
<if test="p.tourismId != null">
|
||||
AND tourism_id = #{p.tourismId}
|
||||
</if>
|
||||
<if test="p.checkResult != null">
|
||||
AND check_result = #{p.checkResult}
|
||||
</if>
|
||||
<if test="p.startTime != null and p.startTime != ''">
|
||||
AND check_time >= #{p.startTime}
|
||||
</if>
|
||||
<if test="p.endTime != null and p.endTime != ''">
|
||||
AND check_time <= #{p.endTime}
|
||||
</if>
|
||||
<if test="p.tenantId != null and p.tenantId != ''">
|
||||
AND tenant_id = #{p.tenantId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY check_time DESC
|
||||
</select>
|
||||
|
||||
<select id="findByBizId" resultMap="WeatherCheckLogResultMap">
|
||||
SELECT * FROM weather_check_log
|
||||
WHERE biz_type = #{bizType}
|
||||
AND biz_id = #{bizId}
|
||||
ORDER BY check_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user