This commit is contained in:
FreeeBird
2018-12-13 19:46:45 +08:00
parent 3aba922a10
commit 08c024b0c3
14 changed files with 85 additions and 69 deletions

View File

@@ -9,8 +9,8 @@ server:
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
username: muamua
password: muamua
username: root
password: liyiyong1997
url: jdbc:mysql://localhost:3306/hotel?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=true
mybatis:
type-aliases-package: classpath*:cn.mafangui.hotel.entity

View File

@@ -45,7 +45,7 @@
update_time)
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}, now(),now())
#{ids,jdbcType=VARCHAR}, now(), now(),now())
</insert>
<insert id="insertSelective" parameterType="cn.mafangui.hotel.entity.CheckIn">
insert into check_in

View File

@@ -32,10 +32,11 @@
<include refid="Base_Column_List" />
from order_info
</select>
<select id="selectByNameAndPhone" parameterType="String" resultMap="BaseResultMap">
<select id="selectByNameAndPhone" parameterType="cn.mafangui.hotel.entity.Order" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from order_info where name = #{name,jdbcType=VARCHAR} and phone = #{phone,jdbcType=VARCHAR}
and order_status = #{orderStatus,jdbcType=INTEGER}
</select>
<select id="selectByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select

View File

@@ -34,6 +34,10 @@
select * from worker_info
where username = #{username,jdbcType=VARCHAR} and password = #{password,jdbcType=VARCHAR} and role = #{role,jdbcType=VARCHAR}
</select>
<select id="selectByUsernamePassword" parameterType="String" resultMap="BaseResultMap">
select * from worker_info
where username = #{username,jdbcType=VARCHAR} and password = #{password,jdbcType=VARCHAR}
</select>
<select id="selectByRole" parameterType="String" resultMap="BaseResultMap">
select * from worker_info
where role = #{role,jdbcType=VARCHAR}