liusheng
2025-02-17 32d595cb8c9b608f089c800815bf44210e25117c
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
<?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.smartor.mapper.ServiceOutPathMapper">
 
    <resultMap type="com.smartor.domain.ServiceOutPath" id="ServiceOutPathResult">
        <result property="id" column="id"/>
        <result property="param1" column="param1"/>
        <result property="param2" column="param2"/>
        <result property="param3" column="param3"/>
        <result property="param5" column="param5"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="radix" column="radix"/>
        <result property="guid" column="guid"/>
        <result property="orgid" column="orgid"/>
    </resultMap>
 
    <sql id="selectServiceOutPathVo">
        select id,
               param1,
               param2,
               param3,
               param5,
               create_time,
               update_time,
               radix,
               guid,
               orgid,
               del_flag
        from service_out_path
    </sql>
 
    <select id="selectServiceOutPathList" parameterType="com.smartor.domain.ServiceOutPath"
            resultMap="ServiceOutPathResult">
        <include refid="selectServiceOutPathVo"/>
        <where>
            <if test="param1 != null ">
                and param1 = #{param1}
            </if>
            <if test="param2 != null ">
                and param2 = #{param2}
            </if>
            <if test="param3 != null  and param3 != ''">
                and param3 = #{param3}
            </if>
            <if test="param5 != null  and param5 != ''">
                and param5 = #{param5}
            </if>
            <if test="createTime != null">
                and create_time = #{createTime}
            </if>
            <if test="param5 != null  and param5 != ''">
                and param5 = #{param5}
            </if>
            <if test="radix != null  and radix != ''">
                and radix=#{radix}
            </if>
 
        </where>
    </select>
 
    <select id="selectServiceOutPathById" parameterType="Long"
            resultMap="ServiceOutPathResult">
        <include refid="selectServiceOutPathVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertServiceOutPath" parameterType="com.smartor.domain.ServiceOutPath" useGeneratedKeys="true"
            keyProperty="id">
        insert into service_out_path
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="param1 != null">param1,
            </if>
            <if test="param2 != null">param2,
            </if>
            <if test="param3 != null">param3,
            </if>
            <if test="param5 != null">param5,
            </if>
            <if test="radix != null">radix,
            </if>
            <if test="createTime != null">create_time,
            </if>
            <if test="guid != null">guid,
            </if>
            <if test="orgid != null">orgid,
            </if>
 
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="param1 != null">#{param1},
            </if>
            <if test="param2 != null">#{param2},
            </if>
            <if test="param3 != null">#{param3},
            </if>
            <if test="param5 != null">#{param5},
            </if>
            <if test="radix != null">#{radix},
            </if>
            <if test="createTime != null">#{createTime},
            </if>
            <if test="guid != null">#{guid},
            </if>
            <if test="orgid != null">#{orgid},
            </if>
        </trim>
    </insert>
 
    <update id="updateServiceOutPath" parameterType="com.smartor.domain.ServiceOutPath">
        update service_out_path
        <trim prefix="SET" suffixOverrides=",">
            <if test="param1 != null">param1 =
                #{param1},
            </if>
            <if test="param2 != null">param2 =
                #{param2},
            </if>
            <if test="param3 != null">param3 =
                #{param3},
            </if>
            <if test="param5 != null">param5 =
                #{param5},
            </if>
            <if test="radix != null">radix =
                #{radix},
            </if>
            <if test="guid != null">guid =
                #{guid},
            </if>
            <if test="orgid != null">orgid =
                #{orgid},
            </if>
        </trim>
        where id = #{id}
    </update>
 
    <update id="deleteServiceOutPathById" parameterType="Long">
        update service_out_path
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where id = #{id}
    </update>
 
    <update id="deleteServiceOutPathByIds" parameterType="String">
        update service_out_path
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
 
 
</mapper>