春风项目四线(合箱线、总装线)
jiang
2024-01-22 9a90543b32701590952806ed583347460bc04f76
提交 | 用户 | 时间
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"    />
1c7f83 11         <result property="lineCode"    column="line_code"    />
H 12         <result property="lineName"    column="line_name"    />
fd2207 13         <result property="productCode"    column="product_code"    />
14         <result property="productName"    column="product_name"    />
15         <result property="version"    column="version"    />
16         <result property="status"    column="status"    />
17         <result property="dataSource"    column="data_source"    />
18         <result property="remark"    column="remark"    />
19         <result property="createUser"    column="create_user"    />
20         <result property="createTime"    column="create_time"    />
21         <result property="updateUser"    column="update_user"    />
22         <result property="updateTime"    column="update_time"    />
23         <result property="spareField1"    column="spare_field_1"    />
24         <result property="spareField2"    column="spare_field_2"    />
25         <result property="spareField3"    column="spare_field_3"    />
26         <result property="spareField4"    column="spare_field_4"    />
27     </resultMap>
28
29     <sql id="selectBsTechnologyRouteInfoVo">
1c7f83 30         select id, route_code, route_name, line_code, line_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
fd2207 31     </sql>
32
33     <select id="selectBsTechnologyRouteInfoList" parameterType="BsTechnologyRouteInfo" resultMap="BsTechnologyRouteInfoResult">
34         <include refid="selectBsTechnologyRouteInfoVo"/>
35         <where>  
36             <if test="routeCode != null  and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if>
37             <if test="routeName != null  and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if>
38             <if test="productCode != null  and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
39             <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
40             <if test="status != null  and status != ''"> and status = #{status}</if>
1c7f83 41             <if test="lineCode != null  and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
H 42             <if test="lineName != null  and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
fd2207 43             <if test="dataSource != null  and dataSource != ''"> and data_source like concat('%', #{dataSource}, '%')</if>
44         </where>
45     </select>
46     
47     <select id="selectBsTechnologyRouteInfoById" parameterType="Long" resultMap="BsTechnologyRouteInfoResult">
48         <include refid="selectBsTechnologyRouteInfoVo"/>
49         where id = #{id}
50     </select>
51         
52     <insert id="insertBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo">
53         insert into bs_technology_route_info
54         <trim prefix="(" suffix=")" suffixOverrides=",">
55             <if test="id != null">id,</if>
56             <if test="routeCode != null and routeCode != ''">route_code,</if>
1c7f83 57             <if test="lineCode != null and lineCode != ''">line_code,</if>
H 58             <if test="lineName != null and lineName != ''">line_name,</if>
fd2207 59             <if test="routeName != null">route_name,</if>
60             <if test="productCode != null and productCode != ''">product_code,</if>
61             <if test="productName != null">product_name,</if>
62             <if test="version != null">version,</if>
63             <if test="status != null">status,</if>
64             <if test="dataSource != null">data_source,</if>
65             <if test="remark != null">remark,</if>
66             <if test="createUser != null">create_user,</if>
67             <if test="createTime != null">create_time,</if>
68             <if test="updateUser != null">update_user,</if>
69             <if test="updateTime != null">update_time,</if>
70             <if test="spareField1 != null">spare_field_1,</if>
71             <if test="spareField2 != null">spare_field_2,</if>
72             <if test="spareField3 != null">spare_field_3,</if>
73             <if test="spareField4 != null">spare_field_4,</if>
74          </trim>
75         <trim prefix="values (" suffix=")" suffixOverrides=",">
76             <if test="id != null">#{id},</if>
77             <if test="routeCode != null and routeCode != ''">#{routeCode},</if>
78             <if test="routeName != null">#{routeName},</if>
1c7f83 79             <if test="lineCode != null and lineCode != ''">#{lineCode},</if>
H 80             <if test="lineName != null and lineName != ''">#{lineName},</if>
fd2207 81             <if test="productCode != null and productCode != ''">#{productCode},</if>
82             <if test="productName != null">#{productName},</if>
83             <if test="version != null">#{version},</if>
84             <if test="status != null">#{status},</if>
85             <if test="dataSource != null">#{dataSource},</if>
86             <if test="remark != null">#{remark},</if>
87             <if test="createUser != null">#{createUser},</if>
88             <if test="createTime != null">#{createTime},</if>
89             <if test="updateUser != null">#{updateUser},</if>
90             <if test="updateTime != null">#{updateTime},</if>
91             <if test="spareField1 != null">#{spareField1},</if>
92             <if test="spareField2 != null">#{spareField2},</if>
93             <if test="spareField3 != null">#{spareField3},</if>
94             <if test="spareField4 != null">#{spareField4},</if>
95          </trim>
96     </insert>
97
98     <update id="updateBsTechnologyRouteInfo" parameterType="BsTechnologyRouteInfo">
99         update bs_technology_route_info
100         <trim prefix="SET" suffixOverrides=",">
101             <if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if>
1c7f83 102             <if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if>
H 103             <if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
fd2207 104             <if test="routeName != null">route_name = #{routeName},</if>
105             <if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
106             <if test="productName != null">product_name = #{productName},</if>
107             <if test="version != null">version = #{version},</if>
108             <if test="status != null">status = #{status},</if>
109             <if test="dataSource != null">data_source = #{dataSource},</if>
110             <if test="remark != null">remark = #{remark},</if>
111             <if test="createUser != null">create_user = #{createUser},</if>
112             <if test="createTime != null">create_time = #{createTime},</if>
113             <if test="updateUser != null">update_user = #{updateUser},</if>
114             <if test="updateTime != null">update_time = #{updateTime},</if>
115             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
116             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
117             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
118             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
119         </trim>
120         where id = #{id}
121     </update>
122
123     <delete id="deleteBsTechnologyRouteInfoById" parameterType="Long">
124         delete from bs_technology_route_info where id = #{id}
125     </delete>
126
127     <delete id="deleteBsTechnologyRouteInfoByIds" parameterType="String">
128         delete from bs_technology_route_info where id in 
129         <foreach item="id" collection="array" open="(" separator="," close=")">
130             #{id}
131         </foreach>
132     </delete>
133 </mapper>