liusheng
2023-06-14 d6f2f458d9c8156981880c987d861423ce9af146
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
<?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.ruoyi.project.mapper.BaseTravelcityMapper">
    
    <resultMap type="BaseTravelcity" id="BaseTravelcityResult">
        <result property="id"    column="id"    />
        <result property="citycode"    column="citycode"    />
        <result property="cityname"    column="cityname"    />
        <result property="province"    column="province"    />
        <result property="transport"    column="transport"    />
        <result property="hotel"    column="hotel"    />
        <result property="others"    column="others"    />
        <result property="food"    column="food"    />
        <result property="remark"    column="remark"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
 
    <sql id="selectBaseTravelcityVo">
        select id, citycode, cityname, province, transport, hotel, others, food, remark, del_flag, create_by, create_time, update_by, update_time from base_travelcity
    </sql>
 
    <select id="selectBaseTravelcityList" parameterType="BaseTravelcity" resultMap="BaseTravelcityResult">
        <include refid="selectBaseTravelcityVo"/>
        <where>
            <if test="citycode != null  and citycode != ''"> and citycode = #{citycode}</if>
            <if test="cityname != null  and cityname != ''"> and cityname like concat('%', #{cityname}, '%')</if>
            <if test="province != null  and province != ''"> and province = #{province}</if>
            <if test="transport != null "> and transport = #{transport}</if>
            <if test="hotel != null "> and hotel = #{hotel}</if>
            <if test="others != null "> and others = #{others}</if>
            <if test="food != null "> and food = #{food}</if>
        </where>
    </select>
 
</mapper>