mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-09-14 11:19:45 +08:00
添加酒店信息的基本操作
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
)
|
||||
values (#{hotelId,jdbcType=INTEGER}, #{hotelName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
||||
#{telephone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{website,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
#{website,jdbcType=VARCHAR}, now(),now()
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="cn.mafangui.hotel.entity.Hotel">
|
||||
@@ -59,12 +59,8 @@
|
||||
<if test="website != null">
|
||||
website,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="hotelId != null">
|
||||
@@ -88,12 +84,8 @@
|
||||
<if test="website != null">
|
||||
#{website,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.Hotel">
|
||||
@@ -138,4 +130,15 @@
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where hotel_id = #{hotelId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hotel_info
|
||||
</select>
|
||||
<select id="selectByName" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hotel_info
|
||||
where hotel_name = #{hotelName,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user