增加工单配置文件
This commit is contained in:
107
ems-system/src/main/resources/mapper/ems/EmsTicketMapper.xml
Normal file
107
ems-system/src/main/resources/mapper/ems/EmsTicketMapper.xml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?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.xzzn.ems.mapper.EmsTicketMapper">
|
||||||
|
|
||||||
|
<resultMap type="EmsTicket" id="EmsTicketResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="ticketNo" column="ticket_no" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="title" column="title" />
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<result property="images" column="images" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="completeTime" column="complete_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="workUserId" column="work_user_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectEmsTicketVo">
|
||||||
|
select id, ticket_no, user_id, title, content, images, status, create_time, complete_time, create_by, update_by, update_time, work_user_id from ems_ticket
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectEmsTicketList" parameterType="EmsTicket" resultMap="EmsTicketResult">
|
||||||
|
<include refid="selectEmsTicketVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="ticketNo != null and ticketNo != ''"> and ticket_no = #{ticketNo}</if>
|
||||||
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||||
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
|
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="completeTime != null "> and complete_time = #{completeTime}</if>
|
||||||
|
<if test="workUserId != null "> and work_user_id = #{workUserId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEmsTicketById" parameterType="String" resultMap="EmsTicketResult">
|
||||||
|
<include refid="selectEmsTicketVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertEmsTicket" parameterType="EmsTicket" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into ems_ticket
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="ticketNo != null and ticketNo != ''">ticket_no,</if>
|
||||||
|
<if test="userId != null and userId != ''">user_id,</if>
|
||||||
|
<if test="title != null and title != ''">title,</if>
|
||||||
|
<if test="content != null and content != ''">content,</if>
|
||||||
|
<if test="images != null">images,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="completeTime != null">complete_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="workUserId != null">work_user_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="ticketNo != null and ticketNo != ''">#{ticketNo},</if>
|
||||||
|
<if test="userId != null and userId != ''">#{userId},</if>
|
||||||
|
<if test="title != null and title != ''">#{title},</if>
|
||||||
|
<if test="content != null and content != ''">#{content},</if>
|
||||||
|
<if test="images != null">#{images},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="completeTime != null">#{completeTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="workUserId != null">#{workUserId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateEmsTicket" parameterType="EmsTicket">
|
||||||
|
update ems_ticket
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="ticketNo != null and ticketNo != ''">ticket_no = #{ticketNo},</if>
|
||||||
|
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
||||||
|
<if test="title != null and title != ''">title = #{title},</if>
|
||||||
|
<if test="content != null and content != ''">content = #{content},</if>
|
||||||
|
<if test="images != null">images = #{images},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="completeTime != null">complete_time = #{completeTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="workUserId != null">work_user_id = #{workUserId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteEmsTicketById" parameterType="String">
|
||||||
|
delete from ems_ticket where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteEmsTicketByIds" parameterType="String">
|
||||||
|
delete from ems_ticket where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Reference in New Issue
Block a user