提交 | 用户 | 时间
|
fd2207
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
懒 |
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.jcdm.main.bs.technologyRoute.mapper.BsTechnologyRouteInfoMapper"> |
|
6 |
|
|
7 |
<resultMap type="BsTechnologyRouteInfo" id="BsTechnologyRouteInfoResult"> |
|
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="createUser" column="create_user" /> |
|
18 |
<result property="createTime" column="create_time" /> |
|
19 |
<result property="updateUser" column="update_user" /> |
|
20 |
<result property="updateTime" column="update_time" /> |
|
21 |
<result property="spareField1" column="spare_field_1" /> |
|
22 |
<result property="spareField2" column="spare_field_2" /> |
|
23 |
<result property="spareField3" column="spare_field_3" /> |
|
24 |
<result property="spareField4" column="spare_field_4" /> |
|
25 |
</resultMap> |
|
26 |
|
|
27 |
<sql id="selectBsTechnologyRouteInfoVo"> |
|
28 |
select id, route_code, route_name, product_code, product_name, version, status, data_source, remark, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_technology_route_info |
|
29 |
</sql> |
|
30 |
|
|
31 |
<select id="selectBsTechnologyRouteInfoList" parameterType="BsTechnologyRouteInfo" resultMap="BsTechnologyRouteInfoResult"> |
|
32 |
<include refid="selectBsTechnologyRouteInfoVo"/> |
|
33 |
<where> |
|
34 |
<if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if> |
|
35 |
<if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if> |
|
36 |
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
|
37 |
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
|
38 |
<if test="status != null and status != ''"> and status = #{status}</if> |
|
39 |
<if test="dataSource != null and dataSource != ''"> and data_source like concat('%', #{dataSource}, '%')</if> |
|
40 |
</where> |
|
41 |
</select> |
|
42 |
|
|
43 |
<select id="selectBsTechnologyRouteInfoById" parameterType="Long" resultMap="BsTechnologyRouteInfoResult"> |
|
44 |
<include refid="selectBsTechnologyRouteInfoVo"/> |
|
45 |
where id = #{id} |
|
46 |
</select> |
|
47 |
|
|
48 |
<insert id="insertBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo"> |
|
49 |
insert into bs_technology_route_info |
|
50 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
51 |
<if test="id != null">id,</if> |
|
52 |
<if test="routeCode != null and routeCode != ''">route_code,</if> |
|
53 |
<if test="routeName != null">route_name,</if> |
|
54 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
55 |
<if test="productName != null">product_name,</if> |
|
56 |
<if test="version != null">version,</if> |
|
57 |
<if test="status != null">status,</if> |
|
58 |
<if test="dataSource != null">data_source,</if> |
|
59 |
<if test="remark != null">remark,</if> |
|
60 |
<if test="createUser != null">create_user,</if> |
|
61 |
<if test="createTime != null">create_time,</if> |
|
62 |
<if test="updateUser != null">update_user,</if> |
|
63 |
<if test="updateTime != null">update_time,</if> |
|
64 |
<if test="spareField1 != null">spare_field_1,</if> |
|
65 |
<if test="spareField2 != null">spare_field_2,</if> |
|
66 |
<if test="spareField3 != null">spare_field_3,</if> |
|
67 |
<if test="spareField4 != null">spare_field_4,</if> |
|
68 |
</trim> |
|
69 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
70 |
<if test="id != null">#{id},</if> |
|
71 |
<if test="routeCode != null and routeCode != ''">#{routeCode},</if> |
|
72 |
<if test="routeName != null">#{routeName},</if> |
|
73 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
74 |
<if test="productName != null">#{productName},</if> |
|
75 |
<if test="version != null">#{version},</if> |
|
76 |
<if test="status != null">#{status},</if> |
|
77 |
<if test="dataSource != null">#{dataSource},</if> |
|
78 |
<if test="remark != null">#{remark},</if> |
|
79 |
<if test="createUser != null">#{createUser},</if> |
|
80 |
<if test="createTime != null">#{createTime},</if> |
|
81 |
<if test="updateUser != null">#{updateUser},</if> |
|
82 |
<if test="updateTime != null">#{updateTime},</if> |
|
83 |
<if test="spareField1 != null">#{spareField1},</if> |
|
84 |
<if test="spareField2 != null">#{spareField2},</if> |
|
85 |
<if test="spareField3 != null">#{spareField3},</if> |
|
86 |
<if test="spareField4 != null">#{spareField4},</if> |
|
87 |
</trim> |
|
88 |
</insert> |
|
89 |
|
|
90 |
<update id="updateBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo"> |
|
91 |
update bs_technology_route_info |
|
92 |
<trim prefix="SET" suffixOverrides=","> |
|
93 |
<if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if> |
|
94 |
<if test="routeName != null">route_name = #{routeName},</if> |
|
95 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
96 |
<if test="productName != null">product_name = #{productName},</if> |
|
97 |
<if test="version != null">version = #{version},</if> |
|
98 |
<if test="status != null">status = #{status},</if> |
|
99 |
<if test="dataSource != null">data_source = #{dataSource},</if> |
|
100 |
<if test="remark != null">remark = #{remark},</if> |
|
101 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
102 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
103 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
104 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
105 |
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
|
106 |
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
|
107 |
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
|
108 |
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
|
109 |
</trim> |
|
110 |
where id = #{id} |
|
111 |
</update> |
|
112 |
|
|
113 |
<delete id="deleteBsTechnologyRouteInfoById" parameterType="Long"> |
|
114 |
delete from bs_technology_route_info where id = #{id} |
|
115 |
</delete> |
|
116 |
|
|
117 |
<delete id="deleteBsTechnologyRouteInfoByIds" parameterType="String"> |
|
118 |
delete from bs_technology_route_info where id in |
|
119 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
120 |
#{id} |
|
121 |
</foreach> |
|
122 |
</delete> |
|
123 |
</mapper> |