mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-09-14 11:19:45 +08:00
完成预订方式接口编写
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
from order_type
|
||||
where type_id = #{typeId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select * from order_type
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from order_type
|
||||
where type_id = #{typeId,jdbcType=INTEGER}
|
||||
@@ -39,12 +42,8 @@
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeId != null">
|
||||
@@ -56,12 +55,8 @@
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
now(),
|
||||
now(),
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="cn.mafangui.hotel.entity.OrderType">
|
||||
@@ -73,12 +68,7 @@
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
update_time = now(),
|
||||
</set>
|
||||
where type_id = #{typeId,jdbcType=INTEGER}
|
||||
</update>
|
||||
@@ -86,8 +76,7 @@
|
||||
update order_type
|
||||
set type = #{type,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
update_time = now()
|
||||
where type_id = #{typeId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@@ -25,6 +25,12 @@
|
||||
from worker_info
|
||||
where worker_id = #{workerId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByUsername" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from worker_info
|
||||
where username = #{username,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectByUsernameAndPassword" parameterType="String" resultMap="BaseResultMap">
|
||||
select * from worker_info
|
||||
where username = #{username,jdbcType=VARCHAR} and password = #{password,jdbcType=VARCHAR} and role = #{role,jdbcType=VARCHAR}
|
||||
|
Reference in New Issue
Block a user