tangzy
2021-09-13 bc76e975aae3837eae625a2e3ffff7d02a5fc3f3
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
<?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="org.springblade.modules.mountain.mapper.MountainMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="mountainResultMap" type="org.springblade.modules.mountain.entity.Mountain">
        <result column="id" property="id"/>
        <result column="cenconding" property="cenconding"/>
        <result column="crainfall" property="crainfall"/>
        <result column="aconding" property="aconding"/>
        <result column="arainfall" property="arainfall"/>
        <result column="township" property="township"/>
        <result column="village" property="village"/>
        <result column="village_group" property="villageGroup"/>
        <result column="dj" property="dj"/>
        <result column="bw" property="bw"/>
        <result column="fyear" property="fyear"/>
        <result column="tyear" property="tyear"/>
        <result column="oyear" property="oyear"/>
        <result column="county" property="county"/>
        <result column="gohour" property="gohour"/>
        <result column="gthour" property="gthour"/>
        <result column="gshour" property="gshour"/>
        <result column="imohour" property="imohour"/>
        <result column="imthour" property="imthour"/>
        <result column="imshour" property="imshour"/>
    </resultMap>
 
 
    <select id="selectMountainPage" resultMap="mountainResultMap">
        select * from blade_mountain where is_deleted = 0
    </select>
 
 
    <!--通过站码查询数据-->
     <select id="selectCode" resultMap="mountainResultMap">
         select id,cenconding,aconding,township,village,village_group,dj,bw from blade_mountain where 1=1
         <if test="cenconding!=null and cenconding!=''">
             and cenconding=#{cenconding}
         </if>
     </select>
 
    <select id="selectCodes" resultMap="mountainResultMap">
        select id,cenconding,aconding,township,village,village_group,dj,bw from blade_mountain where 1=1
        <if test="aconding!=null and aconding!=''">
            and aconding=#{aconding}
        </if>
    </select>
 
</mapper>