入住登记完成

This commit is contained in:
FreeeBird
2018-12-09 14:00:13 +08:00
parent 7ebdc00b16
commit c1591ad821
18 changed files with 184 additions and 45 deletions

View File

@@ -0,0 +1,24 @@
Manifest-Version: 1.0
Class-Path: jackson-datatype-jdk8-2.9.6.jar spring-boot-2.0.5.RELEASE.
jar spring-tx-5.0.9.RELEASE.jar mybatis-spring-boot-starter-1.3.2.jar
logback-core-1.2.3.jar jackson-annotations-2.9.0.jar spring-web-5.0.
9.RELEASE.jar slf4j-api-1.7.25.jar log4j-api-2.10.0.jar jboss-logging
-3.3.2.Final.jar snakeyaml-1.19.jar tomcat-embed-core-8.5.34.jar spri
ng-boot-starter-2.0.5.RELEASE.jar log4j-to-slf4j-2.10.0.jar mysql-con
nector-java-5.1.47.jar spring-boot-starter-web-2.0.5.RELEASE.jar tomc
at-embed-websocket-8.5.34.jar spring-boot-starter-json-2.0.5.RELEASE.
jar jul-to-slf4j-1.7.25.jar logback-classic-1.2.3.jar jackson-module-
parameter-names-2.9.6.jar hibernate-validator-6.0.12.Final.jar jackso
n-datatype-jsr310-2.9.6.jar spring-beans-5.0.9.RELEASE.jar spring-web
mvc-5.0.9.RELEASE.jar tomcat-embed-el-8.5.34.jar spring-expression-5.
0.9.RELEASE.jar spring-jdbc-5.0.9.RELEASE.jar spring-boot-starter-jdb
c-2.0.5.RELEASE.jar spring-context-5.0.9.RELEASE.jar HikariCP-2.7.9.j
ar spring-boot-starter-logging-2.0.5.RELEASE.jar spring-jcl-5.0.9.REL
EASE.jar jackson-core-2.9.6.jar spring-boot-autoconfigure-2.0.5.RELEA
SE.jar spring-boot-starter-tomcat-2.0.5.RELEASE.jar mybatis-spring-bo
ot-autoconfigure-1.3.2.jar jackson-databind-2.9.6.jar javax.annotatio
n-api-1.3.2.jar spring-core-5.0.9.RELEASE.jar validation-api-2.0.1.Fi
nal.jar mybatis-spring-1.3.2.jar mybatis-3.4.6.jar spring-aop-5.0.9.R
ELEASE.jar classmate-1.3.4.jar
Main-Class: cn.mafangui.hotel.HotelApplication

Binary file not shown.

View File

@@ -18,11 +18,17 @@
create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from check_in
where check_in_id = #{checkInId,jdbcType=INTEGER}
</select>
<select id="selectByRoomNumber" parameterType="String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from check_in
where room_number = #{roomNumber,jdbcType=VARCHAR}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
@@ -33,13 +39,13 @@
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,
insert into check_in (check_in_id, order_id, room_id, room_number,
peo_count, persons,
ids, check_in_time, create_time,
ids, check_in_time, create_time,
update_time)
values (#{checkInId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, #{roomNumber,jdbcType=VARCHAR},
values (#{checkInId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER},#{roomId,jdbcType=INTEGER}, #{roomNumber,jdbcType=VARCHAR},
#{peoCount,jdbcType=INTEGER}, #{persons,jdbcType=VARCHAR},
#{ids,jdbcType=VARCHAR}, #{checkInTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{ids,jdbcType=VARCHAR}, #{checkInTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="cn.mafangui.hotel.entity.CheckIn">
@@ -145,4 +151,4 @@
update_time = now()
where check_in_id = #{checkInId,jdbcType=INTEGER}
</update>
</mapper>
</mapper>

View File

@@ -32,6 +32,11 @@
<include refid="Base_Column_List" />
from order_info
</select>
<select id="selectByNameAndPhone" parameterType="String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from order_info where name = #{name,jdbcType=VARCHAR} and phone = #{phone,jdbcType=VARCHAR}
</select>
<select id="selectByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />

View File

@@ -23,6 +23,12 @@
from room_info
where room_id = #{roomId,jdbcType=INTEGER}
</select>
<select id="selectByNumber" parameterType="String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from room_info
where room_number = #{roomNumber,jdbcType=VARCHAR}
</select>
<select id="selectByType" parameterType="Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />

View File

@@ -9,18 +9,17 @@
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="gender" jdbcType="CHAR" property="gender" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="department" jdbcType="INTEGER" property="department" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
worker_id, role, username, password, name, gender, phone, department, email, address,
worker_id, role, username, password, name, gender, phone, email, address,
create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from worker_info
where worker_id = #{workerId,jdbcType=INTEGER}
@@ -47,14 +46,14 @@
where worker_id = #{workerId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="cn.mafangui.hotel.entity.Worker">
insert into worker_info (worker_id, role, username,
password, name, gender,
phone, department, email,
insert into worker_info (worker_id, role, username,
password, name, gender,
phone,, email,
address, create_time, update_time
)
values (#{workerId,jdbcType=INTEGER}, #{role,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
#{phone,jdbcType=VARCHAR}, #{department,jdbcType=INTEGER}, #{email,jdbcType=VARCHAR},
values (#{workerId,jdbcType=INTEGER}, #{role,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
#{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, now(),now()
)
</insert>
@@ -82,9 +81,6 @@
<if test="phone != null">
phone,
</if>
<if test="department != null">
department,
</if>
<if test="email != null">
email,
</if>
@@ -116,9 +112,6 @@
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="department != null">
#{department,jdbcType=INTEGER},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
@@ -150,9 +143,6 @@
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="department != null">
department = #{department,jdbcType=INTEGER},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
@@ -170,10 +160,9 @@
name = #{name,jdbcType=VARCHAR},
gender = #{gender,jdbcType=CHAR},
phone = #{phone,jdbcType=VARCHAR},
department = #{department,jdbcType=INTEGER},
email = #{email,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
where worker_id = #{workerId,jdbcType=INTEGER}
</update>
</mapper>
</mapper>