123456789101112131415161718192021222324252627282930313233343536 |
- <?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.gyee.wisdom.alarm.sharding.mapper.FeatureStatMapper">
- <select id="searchByCondition" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.FeatureStat">
- select * from FEATURE_STAT a
- <where>
- 1=1
- <if test="starttime !=null and endtime !=null">
- and statdate >= #{starttime,jdbcType=DATE} and statdate < #{endtime,jdbcType=DATE}
- </if>
- <if test="stationId !=null and stationId !=''">
- and a.stationid=#{stationId}
- </if>
- </where>
- order by a.id desc
- </select>
- <select id="searchAll" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.FeatureStat">
- select * from FEATURE_STAT a order by a.id desc
- </select>
- <select id="searchByCondition2" resultType="com.gyee.wisdom.alarm.sharding.entity.FeatureStat">
- select * from FEATURE_STAT a
- <where>
- and statdate >= #{currentDate,jdbcType=DATE}
- <if test="stationId !=null and stationId !=''">
- and a.stationid=#{stationId}
- </if>
- </where>
- order by a.id desc
- </select>
- </mapper>
|