FlowDataMapper.xml 25.8 KB
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
<?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.viontech.fanxing.query.mapper.FlowDataMapper" >
  <resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.FlowData" >
    <id column="flowData_id" property="id" />
    <result column="flowData_unid" property="unid" />
    <result column="flowData_event_id" property="eventId" />
    <result column="flowData_task_id" property="taskId" />
    <result column="flowData_detection_type" property="detectionType" />
    <result column="flowData_road_code" property="roadCode" />
    <result column="flowData_direction_code" property="directionCode" />
    <result column="flowData_sample_dura" property="sampleDura" />
    <result column="flowData_sample_num" property="sampleNum" />
    <result column="flowData_velocity" property="velocity" />
    <result column="flowData_velocity_unit" property="velocityUnit" />
    <result column="flowData_occupy" property="occupy" />
    <result column="flowData_distance" property="distance" />
    <result column="flowData_queue_length" property="queueLength" />
    <result column="flowData_region_id" property="regionId" />
    <result column="flowData_region_name" property="regionName" />
    <result column="flowData_area" property="area" />
    <result column="flowData_density" property="density" />
    <result column="flowData_sample_num_in" property="sampleNumIn" />
    <result column="flowData_sample_num_out" property="sampleNumOut" />
    <result column="flowData_event_time" property="eventTime" />
    <result column="flowData_dist_time" property="distTime" />
    <result column="flowData_time_occupy" property="timeOccupy" />
    <result column="flowData_status" property="status" />
  </resultMap>
  <resultMap id="BaseResultMap" type="com.viontech.fanxing.commons.model.FlowData" extends="BaseResultMapRoot" />
  <resultMap id="ResultMapWithBLOBs" type="com.viontech.fanxing.commons.model.FlowData" extends="BaseResultMap" >
    <result column="flowData_position_content" property="positionContent" jdbcType="LONGVARCHAR" />
    <result column="flowData_head_content" property="headContent" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause" >
    <where >
      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List_Root" >
    `flowData`.id as flowData_id, `flowData`.unid as flowData_unid, `flowData`.event_id as flowData_event_id, 
    `flowData`.task_id as flowData_task_id, `flowData`.detection_type as flowData_detection_type, 
    `flowData`.road_code as flowData_road_code, `flowData`.direction_code as flowData_direction_code, 
    `flowData`.sample_dura as flowData_sample_dura, `flowData`.sample_num as flowData_sample_num, 
    `flowData`.velocity as flowData_velocity, `flowData`.velocity_unit as flowData_velocity_unit, 
    `flowData`.occupy as flowData_occupy, `flowData`.distance as flowData_distance, `flowData`.queue_length as flowData_queue_length, 
    `flowData`.region_id as flowData_region_id, `flowData`.region_name as flowData_region_name, 
    `flowData`.area as flowData_area, `flowData`.density as flowData_density, `flowData`.sample_num_in as flowData_sample_num_in, 
    `flowData`.sample_num_out as flowData_sample_num_out, `flowData`.event_time as flowData_event_time, 
    `flowData`.dist_time as flowData_dist_time, `flowData`.time_occupy as flowData_time_occupy, 
    `flowData`.`status` as `flowData_status`
  </sql>
  <sql id="Base_Column_List" >
    <if test="!(_parameter.getClass().getSimpleName() == 'FlowDataExample')" >
      <include refid="com.viontech.fanxing.query.mapper.FlowDataMapper.Base_Column_List_Root" />
    </if>
    <if test="_parameter.getClass().getSimpleName() == 'FlowDataExample'" >
      <foreach collection="columnContainerSet" item="columns" separator="," >
        <choose >
          <when test="columns.tableName == 'd_flow_data'.toString()" >
            <if test="columns.valid" >
              ${columns.columnContainerStr}
            </if>
            <if test="!columns.valid" >
              <include refid="com.viontech.fanxing.query.mapper.FlowDataMapper.Base_Column_List_Root" />
            </if>
          </when>
        </choose>
      </foreach>
    </if>
  </sql>
  <sql id="Blob_Column_List" >
    `flowData`.position_content as flowData_position_content, `flowData`.head_content as flowData_head_content
  </sql>
  <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.viontech.fanxing.commons.model.FlowDataExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from `d_flow_data` `flowData`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="groupByClause != null" >
      group by ${groupByClause}
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.viontech.fanxing.commons.model.FlowDataExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from `d_flow_data` `flowData`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="groupByClause != null" >
      group by ${groupByClause}
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from `d_flow_data` `flowData`
    where `flowData`.id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete  from `d_flow_data` `flowData`
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.FlowDataExample" >
    delete  from `d_flow_data` `flowData`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.viontech.fanxing.commons.model.FlowData" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
    insert into `d_flow_data` (unid, event_id, task_id, 
      detection_type, road_code, direction_code, 
      sample_dura, sample_num, velocity, 
      velocity_unit, occupy, distance, 
      queue_length, region_id, region_name, 
      area, density, sample_num_in, 
      sample_num_out, event_time, dist_time, 
      time_occupy, `status`, position_content, 
      head_content)
    values (#{unid,jdbcType=VARCHAR}, #{eventId,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, 
      #{detectionType,jdbcType=VARCHAR}, #{roadCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR}, 
      #{sampleDura,jdbcType=BIGINT}, #{sampleNum,jdbcType=REAL}, #{velocity,jdbcType=REAL}, 
      #{velocityUnit,jdbcType=VARCHAR}, #{occupy,jdbcType=REAL}, #{distance,jdbcType=REAL}, 
      #{queueLength,jdbcType=REAL}, #{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, 
      #{area,jdbcType=REAL}, #{density,jdbcType=REAL}, #{sampleNumIn,jdbcType=REAL}, 
      #{sampleNumOut,jdbcType=REAL}, #{eventTime,jdbcType=TIMESTAMP}, #{distTime,jdbcType=REAL}, 
      #{timeOccupy,jdbcType=REAL}, #{status,jdbcType=INTEGER}, #{positionContent,jdbcType=LONGVARCHAR}, 
      #{headContent,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.viontech.fanxing.commons.model.FlowData" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
    insert into `d_flow_data`
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="unid != null" >
        unid,
      </if>
      <if test="eventId != null" >
        event_id,
      </if>
      <if test="taskId != null" >
        task_id,
      </if>
      <if test="detectionType != null" >
        detection_type,
      </if>
      <if test="roadCode != null" >
        road_code,
      </if>
      <if test="directionCode != null" >
        direction_code,
      </if>
      <if test="sampleDura != null" >
        sample_dura,
      </if>
      <if test="sampleNum != null" >
        sample_num,
      </if>
      <if test="velocity != null" >
        velocity,
      </if>
      <if test="velocityUnit != null" >
        velocity_unit,
      </if>
      <if test="occupy != null" >
        occupy,
      </if>
      <if test="distance != null" >
        distance,
      </if>
      <if test="queueLength != null" >
        queue_length,
      </if>
      <if test="regionId != null" >
        region_id,
      </if>
      <if test="regionName != null" >
        region_name,
      </if>
      <if test="area != null" >
        area,
      </if>
      <if test="density != null" >
        density,
      </if>
      <if test="sampleNumIn != null" >
        sample_num_in,
      </if>
      <if test="sampleNumOut != null" >
        sample_num_out,
      </if>
      <if test="eventTime != null" >
        event_time,
      </if>
      <if test="distTime != null" >
        dist_time,
      </if>
      <if test="timeOccupy != null" >
        time_occupy,
      </if>
      <if test="status != null" >
        `status`,
      </if>
      <if test="positionContent != null" >
        position_content,
      </if>
      <if test="headContent != null" >
        head_content,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="unid != null" >
        #{unid,jdbcType=VARCHAR},
      </if>
      <if test="eventId != null" >
        #{eventId,jdbcType=VARCHAR},
      </if>
      <if test="taskId != null" >
        #{taskId,jdbcType=BIGINT},
      </if>
      <if test="detectionType != null" >
        #{detectionType,jdbcType=VARCHAR},
      </if>
      <if test="roadCode != null" >
        #{roadCode,jdbcType=VARCHAR},
      </if>
      <if test="directionCode != null" >
        #{directionCode,jdbcType=VARCHAR},
      </if>
      <if test="sampleDura != null" >
        #{sampleDura,jdbcType=BIGINT},
      </if>
      <if test="sampleNum != null" >
        #{sampleNum,jdbcType=REAL},
      </if>
      <if test="velocity != null" >
        #{velocity,jdbcType=REAL},
      </if>
      <if test="velocityUnit != null" >
        #{velocityUnit,jdbcType=VARCHAR},
      </if>
      <if test="occupy != null" >
        #{occupy,jdbcType=REAL},
      </if>
      <if test="distance != null" >
        #{distance,jdbcType=REAL},
      </if>
      <if test="queueLength != null" >
        #{queueLength,jdbcType=REAL},
      </if>
      <if test="regionId != null" >
        #{regionId,jdbcType=VARCHAR},
      </if>
      <if test="regionName != null" >
        #{regionName,jdbcType=VARCHAR},
      </if>
      <if test="area != null" >
        #{area,jdbcType=REAL},
      </if>
      <if test="density != null" >
        #{density,jdbcType=REAL},
      </if>
      <if test="sampleNumIn != null" >
        #{sampleNumIn,jdbcType=REAL},
      </if>
      <if test="sampleNumOut != null" >
        #{sampleNumOut,jdbcType=REAL},
      </if>
      <if test="eventTime != null" >
        #{eventTime,jdbcType=TIMESTAMP},
      </if>
      <if test="distTime != null" >
        #{distTime,jdbcType=REAL},
      </if>
      <if test="timeOccupy != null" >
        #{timeOccupy,jdbcType=REAL},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="positionContent != null" >
        #{positionContent,jdbcType=LONGVARCHAR},
      </if>
      <if test="headContent != null" >
        #{headContent,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.viontech.fanxing.commons.model.FlowDataExample" resultType="java.lang.Integer" >
    select count(*) from `d_flow_data` `flowData`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update `d_flow_data` `flowData`
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.unid != null" >
        unid = #{record.unid,jdbcType=VARCHAR},
      </if>
      <if test="record.eventId != null" >
        event_id = #{record.eventId,jdbcType=VARCHAR},
      </if>
      <if test="record.taskId != null" >
        task_id = #{record.taskId,jdbcType=BIGINT},
      </if>
      <if test="record.detectionType != null" >
        detection_type = #{record.detectionType,jdbcType=VARCHAR},
      </if>
      <if test="record.roadCode != null" >
        road_code = #{record.roadCode,jdbcType=VARCHAR},
      </if>
      <if test="record.directionCode != null" >
        direction_code = #{record.directionCode,jdbcType=VARCHAR},
      </if>
      <if test="record.sampleDura != null" >
        sample_dura = #{record.sampleDura,jdbcType=BIGINT},
      </if>
      <if test="record.sampleNum != null" >
        sample_num = #{record.sampleNum,jdbcType=REAL},
      </if>
      <if test="record.velocity != null" >
        velocity = #{record.velocity,jdbcType=REAL},
      </if>
      <if test="record.velocityUnit != null" >
        velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
      </if>
      <if test="record.occupy != null" >
        occupy = #{record.occupy,jdbcType=REAL},
      </if>
      <if test="record.distance != null" >
        distance = #{record.distance,jdbcType=REAL},
      </if>
      <if test="record.queueLength != null" >
        queue_length = #{record.queueLength,jdbcType=REAL},
      </if>
      <if test="record.regionId != null" >
        region_id = #{record.regionId,jdbcType=VARCHAR},
      </if>
      <if test="record.regionName != null" >
        region_name = #{record.regionName,jdbcType=VARCHAR},
      </if>
      <if test="record.area != null" >
        area = #{record.area,jdbcType=REAL},
      </if>
      <if test="record.density != null" >
        density = #{record.density,jdbcType=REAL},
      </if>
      <if test="record.sampleNumIn != null" >
        sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
      </if>
      <if test="record.sampleNumOut != null" >
        sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
      </if>
      <if test="record.eventTime != null" >
        event_time = #{record.eventTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.distTime != null" >
        dist_time = #{record.distTime,jdbcType=REAL},
      </if>
      <if test="record.timeOccupy != null" >
        time_occupy = #{record.timeOccupy,jdbcType=REAL},
      </if>
      <if test="record.status != null" >
        `status` = #{record.status,jdbcType=INTEGER},
      </if>
      <if test="record.positionContent != null" >
        position_content = #{record.positionContent,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.headContent != null" >
        head_content = #{record.headContent,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map" >
    update `d_flow_data` `flowData`
    set `flowData`.id = #{record.id,jdbcType=BIGINT},
      `flowData`.unid = #{record.unid,jdbcType=VARCHAR},
      `flowData`.event_id = #{record.eventId,jdbcType=VARCHAR},
      `flowData`.task_id = #{record.taskId,jdbcType=BIGINT},
      `flowData`.detection_type = #{record.detectionType,jdbcType=VARCHAR},
      `flowData`.road_code = #{record.roadCode,jdbcType=VARCHAR},
      `flowData`.direction_code = #{record.directionCode,jdbcType=VARCHAR},
      `flowData`.sample_dura = #{record.sampleDura,jdbcType=BIGINT},
      `flowData`.sample_num = #{record.sampleNum,jdbcType=REAL},
      `flowData`.velocity = #{record.velocity,jdbcType=REAL},
      `flowData`.velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
      `flowData`.occupy = #{record.occupy,jdbcType=REAL},
      `flowData`.distance = #{record.distance,jdbcType=REAL},
      `flowData`.queue_length = #{record.queueLength,jdbcType=REAL},
      `flowData`.region_id = #{record.regionId,jdbcType=VARCHAR},
      `flowData`.region_name = #{record.regionName,jdbcType=VARCHAR},
      `flowData`.area = #{record.area,jdbcType=REAL},
      `flowData`.density = #{record.density,jdbcType=REAL},
      `flowData`.sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
      `flowData`.sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
      `flowData`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
      `flowData`.dist_time = #{record.distTime,jdbcType=REAL},
      `flowData`.time_occupy = #{record.timeOccupy,jdbcType=REAL},
      `flowData`.`status` = #{record.status,jdbcType=INTEGER},
      `flowData`.position_content = #{record.positionContent,jdbcType=LONGVARCHAR},
      `flowData`.head_content = #{record.headContent,jdbcType=LONGVARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update `d_flow_data` `flowData`
    set id = #{record.id,jdbcType=BIGINT},
      unid = #{record.unid,jdbcType=VARCHAR},
      event_id = #{record.eventId,jdbcType=VARCHAR},
      task_id = #{record.taskId,jdbcType=BIGINT},
      detection_type = #{record.detectionType,jdbcType=VARCHAR},
      road_code = #{record.roadCode,jdbcType=VARCHAR},
      direction_code = #{record.directionCode,jdbcType=VARCHAR},
      sample_dura = #{record.sampleDura,jdbcType=BIGINT},
      sample_num = #{record.sampleNum,jdbcType=REAL},
      velocity = #{record.velocity,jdbcType=REAL},
      velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
      occupy = #{record.occupy,jdbcType=REAL},
      distance = #{record.distance,jdbcType=REAL},
      queue_length = #{record.queueLength,jdbcType=REAL},
      region_id = #{record.regionId,jdbcType=VARCHAR},
      region_name = #{record.regionName,jdbcType=VARCHAR},
      area = #{record.area,jdbcType=REAL},
      density = #{record.density,jdbcType=REAL},
      sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
      sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
      event_time = #{record.eventTime,jdbcType=TIMESTAMP},
      dist_time = #{record.distTime,jdbcType=REAL},
      time_occupy = #{record.timeOccupy,jdbcType=REAL},
      `status` = #{record.status,jdbcType=INTEGER}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.viontech.fanxing.commons.model.FlowData" >
    update `d_flow_data`
    <set >
      <if test="unid != null" >
        unid = #{unid,jdbcType=VARCHAR},
      </if>
      <if test="eventId != null" >
        event_id = #{eventId,jdbcType=VARCHAR},
      </if>
      <if test="taskId != null" >
        task_id = #{taskId,jdbcType=BIGINT},
      </if>
      <if test="detectionType != null" >
        detection_type = #{detectionType,jdbcType=VARCHAR},
      </if>
      <if test="roadCode != null" >
        road_code = #{roadCode,jdbcType=VARCHAR},
      </if>
      <if test="directionCode != null" >
        direction_code = #{directionCode,jdbcType=VARCHAR},
      </if>
      <if test="sampleDura != null" >
        sample_dura = #{sampleDura,jdbcType=BIGINT},
      </if>
      <if test="sampleNum != null" >
        sample_num = #{sampleNum,jdbcType=REAL},
      </if>
      <if test="velocity != null" >
        velocity = #{velocity,jdbcType=REAL},
      </if>
      <if test="velocityUnit != null" >
        velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
      </if>
      <if test="occupy != null" >
        occupy = #{occupy,jdbcType=REAL},
      </if>
      <if test="distance != null" >
        distance = #{distance,jdbcType=REAL},
      </if>
      <if test="queueLength != null" >
        queue_length = #{queueLength,jdbcType=REAL},
      </if>
      <if test="regionId != null" >
        region_id = #{regionId,jdbcType=VARCHAR},
      </if>
      <if test="regionName != null" >
        region_name = #{regionName,jdbcType=VARCHAR},
      </if>
      <if test="area != null" >
        area = #{area,jdbcType=REAL},
      </if>
      <if test="density != null" >
        density = #{density,jdbcType=REAL},
      </if>
      <if test="sampleNumIn != null" >
        sample_num_in = #{sampleNumIn,jdbcType=REAL},
      </if>
      <if test="sampleNumOut != null" >
        sample_num_out = #{sampleNumOut,jdbcType=REAL},
      </if>
      <if test="eventTime != null" >
        event_time = #{eventTime,jdbcType=TIMESTAMP},
      </if>
      <if test="distTime != null" >
        dist_time = #{distTime,jdbcType=REAL},
      </if>
      <if test="timeOccupy != null" >
        time_occupy = #{timeOccupy,jdbcType=REAL},
      </if>
      <if test="status != null" >
        `status` = #{status,jdbcType=INTEGER},
      </if>
      <if test="positionContent != null" >
        position_content = #{positionContent,jdbcType=LONGVARCHAR},
      </if>
      <if test="headContent != null" >
        head_content = #{headContent,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.viontech.fanxing.commons.model.FlowData" >
    update `d_flow_data`
    set unid = #{unid,jdbcType=VARCHAR},
      event_id = #{eventId,jdbcType=VARCHAR},
      task_id = #{taskId,jdbcType=BIGINT},
      detection_type = #{detectionType,jdbcType=VARCHAR},
      road_code = #{roadCode,jdbcType=VARCHAR},
      direction_code = #{directionCode,jdbcType=VARCHAR},
      sample_dura = #{sampleDura,jdbcType=BIGINT},
      sample_num = #{sampleNum,jdbcType=REAL},
      velocity = #{velocity,jdbcType=REAL},
      velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
      occupy = #{occupy,jdbcType=REAL},
      distance = #{distance,jdbcType=REAL},
      queue_length = #{queueLength,jdbcType=REAL},
      region_id = #{regionId,jdbcType=VARCHAR},
      region_name = #{regionName,jdbcType=VARCHAR},
      area = #{area,jdbcType=REAL},
      density = #{density,jdbcType=REAL},
      sample_num_in = #{sampleNumIn,jdbcType=REAL},
      sample_num_out = #{sampleNumOut,jdbcType=REAL},
      event_time = #{eventTime,jdbcType=TIMESTAMP},
      dist_time = #{distTime,jdbcType=REAL},
      time_occupy = #{timeOccupy,jdbcType=REAL},
      `status` = #{status,jdbcType=INTEGER},
      position_content = #{positionContent,jdbcType=LONGVARCHAR},
      head_content = #{headContent,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.FlowData" >
    update `d_flow_data`
    set unid = #{unid,jdbcType=VARCHAR},
      event_id = #{eventId,jdbcType=VARCHAR},
      task_id = #{taskId,jdbcType=BIGINT},
      detection_type = #{detectionType,jdbcType=VARCHAR},
      road_code = #{roadCode,jdbcType=VARCHAR},
      direction_code = #{directionCode,jdbcType=VARCHAR},
      sample_dura = #{sampleDura,jdbcType=BIGINT},
      sample_num = #{sampleNum,jdbcType=REAL},
      velocity = #{velocity,jdbcType=REAL},
      velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
      occupy = #{occupy,jdbcType=REAL},
      distance = #{distance,jdbcType=REAL},
      queue_length = #{queueLength,jdbcType=REAL},
      region_id = #{regionId,jdbcType=VARCHAR},
      region_name = #{regionName,jdbcType=VARCHAR},
      area = #{area,jdbcType=REAL},
      density = #{density,jdbcType=REAL},
      sample_num_in = #{sampleNumIn,jdbcType=REAL},
      sample_num_out = #{sampleNumOut,jdbcType=REAL},
      event_time = #{eventTime,jdbcType=TIMESTAMP},
      dist_time = #{distTime,jdbcType=REAL},
      time_occupy = #{timeOccupy,jdbcType=REAL},
      `status` = #{status,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>