Blame view

urbanops-module-gloabl/src/main/resources/mapper/roadinfo/RoadInfoMapper.xml 1.66 KB
57dda2d9   戈灵虎   迁移
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
  <?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.zteits.urbanops.module.gloabl.dal.mapper.roadinfo.RoadInfoMapper">
      <resultMap id="BaseResultMap" type="com.zteits.urbanops.module.gloabl.dal.dataobject.roadinfo.RoadInfoDO">
          <result column="m_code" jdbcType="VARCHAR" property="mCode"/>
          <result column="sz_id" jdbcType="VARCHAR" property="szId"/>
          <result column="yl_id" jdbcType="VARCHAR" property="ylId"/>
          <result column="wy_id" jdbcType="VARCHAR" property="wyId"/>
          <result column="road_name" jdbcType="VARCHAR" property="roadName"/>
          <result column="street_code" jdbcType="VARCHAR" property="streetCode"/>
          <result column="street_name" jdbcType="VARCHAR" property="streetName"/>
      </resultMap>
      <select id="selectRoadInfoByCondition"
              parameterType="com.zteits.urbanops.module.gloabl.controller.admin.roadinfo.vo.RoadInfoReqVO"
              resultMap="BaseResultMap">
          select * from global_master_road_info
          <where>
              <if test="streetCode != null  and streetCode != ''">
                  and street_code = #{streetCode}
              </if>
              <if test="mCode != null  and mCode != ''">
                  and m_code = #{mCode}
              </if>
              <if test="roadName != null  and roadName != ''">
                  and road_name like CONCAT('%', #{roadName}, '%')
              </if>
              <if test="streetName != null  and streetName != ''">
                  and street_name like CONCAT('%', #{streetName}, '%')
              </if>
          </where>
      </select>
  </mapper>