mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-12-16 19:14:11 +08:00
Initial commit
This commit is contained in:
153
src/main/resources/mybatis/mapper/CheckInMapper.xml
Normal file
153
src/main/resources/mybatis/mapper/CheckInMapper.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?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="cn.mafangui.hotel.mapper.CheckInMapper">
|
||||
<resultMap id="BaseResultMap" type="cn.mafangui.hotel.entity.CheckIn">
|
||||
<id column="check_in_id" jdbcType="INTEGER" property="checkInId" />
|
||||
<result column="order_id" jdbcType="INTEGER" property="orderId" />
|
||||
<result column="room_number" jdbcType="VARCHAR" property="roomNumber" />
|
||||
<result column="room_type" jdbcType="INTEGER" property="roomType" />
|
||||
<result column="person_num" jdbcType="INTEGER" property="personNum" />
|
||||
<result column="person_name" jdbcType="VARCHAR" property="personName" />
|
||||
<result column="id_numbers" jdbcType="VARCHAR" property="idNumbers" />
|
||||
<result column="check_in_time" jdbcType="TIMESTAMP" property="checkInTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
check_in_id, order_id, room_number, room_type, person_num, person_name, id_numbers,
|
||||
check_in_time, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from check_in
|
||||
where check_in_id = #{checkInId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from check_in
|
||||
where check_in_id = #{checkInId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="cn.mafangui.hotel.entity.CheckIn">
|
||||
insert into check_in (check_in_id, order_id, room_number,
|
||||
room_type, person_num, person_name,
|
||||
id_numbers, check_in_time, create_time,
|
||||
update_time)
|
||||
values (#{checkInId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, #{roomNumber,jdbcType=VARCHAR},
|
||||
#{roomType,jdbcType=INTEGER}, #{personNum,jdbcType=INTEGER}, #{personName,jdbcType=VARCHAR},
|
||||
#{idNumbers,jdbcType=VARCHAR}, #{checkInTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="cn.mafangui.hotel.entity.CheckIn">
|
||||
insert into check_in
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkInId != null">
|
||||
check_in_id,
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id,
|
||||
</if>
|
||||
<if test="roomNumber != null">
|
||||
room_number,
|
||||
</if>
|
||||
<if test="roomType != null">
|
||||
room_type,
|
||||
</if>
|
||||
<if test="personNum != null">
|
||||
person_num,
|
||||
</if>
|
||||
<if test="personName != null">
|
||||
person_name,
|
||||
</if>
|
||||
<if test="idNumbers != null">
|
||||
id_numbers,
|
||||
</if>
|
||||
<if test="checkInTime != null">
|
||||
check_in_time,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkInId != null">
|
||||
#{checkInId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
#{orderId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="roomNumber != null">
|
||||
#{roomNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="roomType != null">
|
||||
#{roomType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="personNum != null">
|
||||
#{personNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="personName != null">
|
||||
#{personName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="idNumbers != null">
|
||||
#{idNumbers,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkInTime != null">
|
||||
#{checkInTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="cn.mafangui.hotel.entity.CheckIn">
|
||||
update check_in
|
||||
<set>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="roomNumber != null">
|
||||
room_number = #{roomNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="roomType != null">
|
||||
room_type = #{roomType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="personNum != null">
|
||||
person_num = #{personNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="personName != null">
|
||||
person_name = #{personName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="idNumbers != null">
|
||||
id_numbers = #{idNumbers,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkInTime != null">
|
||||
check_in_time = #{checkInTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where check_in_id = #{checkInId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="cn.mafangui.hotel.entity.CheckIn">
|
||||
update check_in
|
||||
set order_id = #{orderId,jdbcType=INTEGER},
|
||||
room_number = #{roomNumber,jdbcType=VARCHAR},
|
||||
room_type = #{roomType,jdbcType=INTEGER},
|
||||
person_num = #{personNum,jdbcType=INTEGER},
|
||||
person_name = #{personName,jdbcType=VARCHAR},
|
||||
id_numbers = #{idNumbers,jdbcType=VARCHAR},
|
||||
check_in_time = #{checkInTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where check_in_id = #{checkInId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user