106 lines
4.0 KiB
XML
106 lines
4.0 KiB
XML
<?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="com.chaozhanggui.system.cashierservice.dao.TbShopOnlineMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
|
|
<id column="shop_id" jdbcType="INTEGER" property="shopId" />
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
shop_id, start_time, end_time, status, create_time, update_time
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from tb_shop_online
|
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
delete from tb_shop_online
|
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
|
|
insert into tb_shop_online (shop_id, start_time, end_time,
|
|
status, create_time, update_time
|
|
)
|
|
values (#{shopId,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
|
|
insert into tb_shop_online
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="shopId != null">
|
|
shop_id,
|
|
</if>
|
|
<if test="startTime != null">
|
|
start_time,
|
|
</if>
|
|
<if test="endTime != null">
|
|
end_time,
|
|
</if>
|
|
<if test="status != null">
|
|
status,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="shopId != null">
|
|
#{shopId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="startTime != null">
|
|
#{startTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="endTime != null">
|
|
#{endTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
|
|
update tb_shop_online
|
|
<set>
|
|
<if test="startTime != null">
|
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="endTime != null">
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOnline">
|
|
update tb_shop_online
|
|
set start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
status = #{status,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
where shop_id = #{shopId,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper> |