feiyu02
2023-11-15 45fdeee912088efbd07a748a011682c6c6d1ce51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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.flightfeather.monitor.domain.ds1.mapper.RiskValueMapper">
  <resultMap id="BaseResultMap" type="com.flightfeather.monitor.domain.ds1.entity.RiskValue">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="mn_code" jdbcType="VARCHAR" property="mnCode" />
    <result column="lst" jdbcType="DATE" property="lst" />
    <result column="online_risk" jdbcType="DOUBLE" property="onlineRisk" />
    <result column="valid_risk" jdbcType="DOUBLE" property="validRisk" />
    <result column="exceed_risk" jdbcType="DOUBLE" property="exceedRisk" />
    <result column="exception_type_aggregation" jdbcType="DOUBLE" property="exceptionTypeAggregation" />
    <result column="typical_exception_repetition_rate" jdbcType="DOUBLE" property="typicalExceptionRepetitionRate" />
    <result column="type" jdbcType="VARCHAR" property="type" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, mn_code, lst, online_risk, valid_risk, exceed_risk, exception_type_aggregation, 
    typical_exception_repetition_rate, type
  </sql>
 
  <select id="queryRiskDataByMonth" resultType="com.flightfeather.monitor.pojo.RiskValuePojo">
    select b.name,a.*
    from du_js_t_risk_value as a left join ja_t_dust_site_info as b on a.mn_code = b.mn_code
    <where>
      <if test="mnCode != null and mnCode != '' ">
        a.mn_code = #{mnCode}
      </if>
 
      <if test="month != null">
        and  a.lst = #{month}
      </if>
 
      <if test="type != null and type != '' ">
        and a.type = #{type}
      </if>
    </where>
  </select>
</mapper>