提交 | 用户 | 时间
|
849473
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
A |
2 |
<!DOCTYPE mapper |
|
3 |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
4 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
5 |
<mapper namespace="com.billion.main.bs.mapper.BsRouteInfoMapper"> |
|
6 |
|
|
7 |
<resultMap type="BsRouteInfo" id="BsRouteInfoResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="routeCode" column="route_code" /> |
|
10 |
<result property="routeName" column="route_name" /> |
|
11 |
<result property="productCode" column="product_code" /> |
|
12 |
<result property="productName" column="product_name" /> |
|
13 |
<result property="version" column="version" /> |
|
14 |
<result property="status" column="status" /> |
|
15 |
<result property="dataSource" column="data_source" /> |
|
16 |
<result property="remark" column="remark" /> |
|
17 |
<result property="createBy" column="create_by" /> |
|
18 |
<result property="createTime" column="create_time" /> |
|
19 |
<result property="updateBy" column="update_by" /> |
|
20 |
<result property="updateTime" column="update_time" /> |
|
21 |
<result property="delFlag" column="del_flag" /> |
|
22 |
</resultMap> |
|
23 |
|
|
24 |
<sql id="selectBsRouteInfoVo"> |
|
25 |
select id, route_code, route_name, product_code, product_name, version, status, data_source, remark, create_by, create_time, update_by, update_time, del_flag from bs_route_info |
|
26 |
</sql> |
|
27 |
|
|
28 |
<select id="selectBsRouteInfoList" parameterType="BsRouteInfo" resultMap="BsRouteInfoResult"> |
|
29 |
<include refid="selectBsRouteInfoVo"/> |
|
30 |
<where> |
|
31 |
<if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if> |
|
32 |
<if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if> |
|
33 |
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
|
34 |
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
|
35 |
<if test="version != null and version != ''"> and version like concat('%', #{version}, '%')</if> |
|
36 |
<if test="status != null and status != ''"> and status = #{status}</if> |
|
37 |
</where> |
|
38 |
</select> |
|
39 |
|
|
40 |
<select id="selectBsRouteInfoById" parameterType="Long" resultMap="BsRouteInfoResult"> |
|
41 |
<include refid="selectBsRouteInfoVo"/> |
|
42 |
where id = #{id} |
|
43 |
</select> |
|
44 |
|
|
45 |
<insert id="insertBsRouteInfo" parameterType="BsRouteInfo"> |
|
46 |
insert into bs_route_info |
|
47 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
48 |
<if test="id != null">id,</if> |
|
49 |
<if test="routeCode != null and routeCode != ''">route_code,</if> |
|
50 |
<if test="routeName != null">route_name,</if> |
|
51 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
52 |
<if test="productName != null">product_name,</if> |
|
53 |
<if test="version != null">version,</if> |
|
54 |
<if test="status != null">status,</if> |
|
55 |
<if test="dataSource != null">data_source,</if> |
|
56 |
<if test="remark != null">remark,</if> |
|
57 |
<if test="createBy != null">create_by,</if> |
|
58 |
<if test="createTime != null">create_time,</if> |
|
59 |
<if test="updateBy != null">update_by,</if> |
|
60 |
<if test="updateTime != null">update_time,</if> |
|
61 |
<if test="delFlag != null">del_flag,</if> |
|
62 |
</trim> |
|
63 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
64 |
<if test="id != null">#{id},</if> |
|
65 |
<if test="routeCode != null and routeCode != ''">#{routeCode},</if> |
|
66 |
<if test="routeName != null">#{routeName},</if> |
|
67 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
68 |
<if test="productName != null">#{productName},</if> |
|
69 |
<if test="version != null">#{version},</if> |
|
70 |
<if test="status != null">#{status},</if> |
|
71 |
<if test="dataSource != null">#{dataSource},</if> |
|
72 |
<if test="remark != null">#{remark},</if> |
|
73 |
<if test="createBy != null">#{createBy},</if> |
|
74 |
<if test="createTime != null">#{createTime},</if> |
|
75 |
<if test="updateBy != null">#{updateBy},</if> |
|
76 |
<if test="updateTime != null">#{updateTime},</if> |
|
77 |
<if test="delFlag != null">#{delFlag},</if> |
|
78 |
</trim> |
|
79 |
</insert> |
|
80 |
|
|
81 |
<update id="updateBsRouteInfo" parameterType="BsRouteInfo"> |
|
82 |
update bs_route_info |
|
83 |
<trim prefix="SET" suffixOverrides=","> |
|
84 |
<if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if> |
|
85 |
<if test="routeName != null">route_name = #{routeName},</if> |
|
86 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
87 |
<if test="productName != null">product_name = #{productName},</if> |
|
88 |
<if test="version != null">version = #{version},</if> |
|
89 |
<if test="status != null">status = #{status},</if> |
|
90 |
<if test="dataSource != null">data_source = #{dataSource},</if> |
|
91 |
<if test="remark != null">remark = #{remark},</if> |
|
92 |
<if test="createBy != null">create_by = #{createBy},</if> |
|
93 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
94 |
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
95 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
96 |
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|
97 |
</trim> |
|
98 |
where id = #{id} |
|
99 |
</update> |
|
100 |
|
|
101 |
<delete id="deleteBsRouteInfoById" parameterType="Long"> |
|
102 |
delete from bs_route_info where id = #{id} |
|
103 |
</delete> |
|
104 |
|
|
105 |
<delete id="deleteBsRouteInfoByIds" parameterType="String"> |
|
106 |
delete from bs_route_info where id in |
|
107 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
108 |
#{id} |
|
109 |
</foreach> |
|
110 |
</delete> |
|
111 |
</mapper> |