-
admin
2024-06-21 d76bbaa8a9a70124045dc4c9753e5a868ac4e7d2
提交 | 用户 | 时间
e57a89 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.processes.mapper.BsProcessesInfoMapper">
6     
7     <resultMap type="BsProcessesInfo" id="BsProcessesInfoResult">
8         <result property="id"    column="id"    />
9         <result property="processesCode"    column="processes_code"    />
10         <result property="processesName"    column="processes_name"    />
11         <result property="processesType"    column="processes_type"    />
12         <result property="preparationTime"    column="preparation_time"    />
13         <result property="productiveTime"    column="productive_time"    />
14         <result property="status"    column="status"    />
5316c5 15         <result property="spareField1"    column="spare_field1"    />
A 16         <result property="spareField2"    column="spare_field2"    />
17         <result property="spareField3"    column="spare_field3"    />
18         <result property="spareField4"    column="spare_field4"    />
e57a89 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="remarks"    column="remarks"    />
24     </resultMap>
25
26     <sql id="selectBsProcessesInfoVo">
5316c5 27         select id, processes_code, processes_name, processes_type, preparation_time, productive_time, status, spare_field1, spare_field2, spare_field3, spare_field4, create_user, create_time, update_user, update_time, remarks from bs_processes_info
e57a89 28     </sql>
29
30     <select id="selectBsProcessesInfoList" parameterType="BsProcessesInfo" resultMap="BsProcessesInfoResult">
31         <include refid="selectBsProcessesInfoVo"/>
32         <where>
33             <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
34             <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
35             <if test="processesType != null  and processesType != ''"> and processes_type like concat('%', #{processesType}, '%')</if>
36             <if test="status != null  and status != ''"> and status = #{status}</if>
37         </where>
38     </select>
39     
40     <select id="selectBsProcessesInfoById" parameterType="Long" resultMap="BsProcessesInfoResult">
41         <include refid="selectBsProcessesInfoVo"/>
42         where id = #{id}
43     </select>
44         
45     <insert id="insertBsProcessesInfo" parameterType="BsProcessesInfo">
46         insert into bs_processes_info
47         <trim prefix="(" suffix=")" suffixOverrides=",">
48             <if test="id != null">id,</if>
49             <if test="processesCode != null and processesCode != ''">processes_code,</if>
50             <if test="processesName != null">processes_name,</if>
51             <if test="processesType != null and processesType != ''">processes_type,</if>
52             <if test="preparationTime != null">preparation_time,</if>
53             <if test="productiveTime != null">productive_time,</if>
54             <if test="status != null">status,</if>
55             <if test="createUser != null">create_user,</if>
56             <if test="createTime != null">create_time,</if>
57             <if test="updateUser != null">update_user,</if>
58             <if test="updateTime != null">update_time,</if>
59             <if test="remarks != null">remarks,</if>
60          </trim>
61         <trim prefix="values (" suffix=")" suffixOverrides=",">
62             <if test="id != null">#{id},</if>
63             <if test="processesCode != null and processesCode != ''">#{processesCode},</if>
64             <if test="processesName != null">#{processesName},</if>
65             <if test="processesType != null and processesType != ''">#{processesType},</if>
66             <if test="preparationTime != null">#{preparationTime},</if>
67             <if test="productiveTime != null">#{productiveTime},</if>
68             <if test="status != null">#{status},</if>
69             <if test="createUser != null">#{createUser},</if>
70             <if test="createTime != null">#{createTime},</if>
71             <if test="updateUser != null">#{updateUser},</if>
72             <if test="updateTime != null">#{updateTime},</if>
73             <if test="remarks != null">#{remarks},</if>
74          </trim>
75     </insert>
76
77     <update id="updateBsProcessesInfo" parameterType="BsProcessesInfo">
78         update bs_processes_info
79         <trim prefix="SET" suffixOverrides=",">
80             <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
81             <if test="processesName != null">processes_name = #{processesName},</if>
82             <if test="processesType != null and processesType != ''">processes_type = #{processesType},</if>
83             <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
84             <if test="productiveTime != null">productive_time = #{productiveTime},</if>
85             <if test="status != null">status = #{status},</if>
86             <if test="createUser != null">create_user = #{createUser},</if>
87             <if test="createTime != null">create_time = #{createTime},</if>
88             <if test="updateUser != null">update_user = #{updateUser},</if>
89             <if test="updateTime != null">update_time = #{updateTime},</if>
90             <if test="remarks != null">remarks = #{remarks},</if>
91         </trim>
92         where id = #{id}
93     </update>
94
95     <delete id="deleteBsProcessesInfoById" parameterType="Long">
96         delete from bs_processes_info where id = #{id}
97     </delete>
98
99     <delete id="deleteBsProcessesInfoByIds" parameterType="String">
100         delete from bs_processes_info where id in 
101         <foreach item="id" collection="array" open="(" separator="," close=")">
102             #{id}
103         </foreach>
104     </delete>
105 </mapper>