92 lines
4.3 KiB
XML
92 lines
4.3 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.TbShopOpenIdMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopOpenId">
|
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
|
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
|
<result property="openId" column="open_id" jdbcType="VARCHAR"/>
|
|
<result property="status" column="status" jdbcType="TINYINT"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,shop_id,open_id,
|
|
status,create_time,update_time
|
|
</sql>
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from tb_shop_open_id
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from tb_shop_open_id
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOpenId" useGeneratedKeys="true">
|
|
insert into tb_shop_open_id
|
|
( id,shop_id,open_id
|
|
,status,create_time,update_time
|
|
)
|
|
values (#{id,jdbcType=INTEGER},#{shopId,jdbcType=INTEGER},#{openId,jdbcType=VARCHAR}
|
|
,#{status,jdbcType=TINYINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOpenId" useGeneratedKeys="true">
|
|
insert into tb_shop_open_id
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="shopId != null">shop_id,</if>
|
|
<if test="openId != null">open_id,</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="id != null">#{id,jdbcType=INTEGER},</if>
|
|
<if test="shopId != null">#{shopId,jdbcType=INTEGER},</if>
|
|
<if test="openId != null">#{openId,jdbcType=VARCHAR},</if>
|
|
<if test="status != null">#{status,jdbcType=TINYINT},</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.TbShopOpenId">
|
|
update tb_shop_open_id
|
|
<set>
|
|
<if test="shopId != null">
|
|
shop_id = #{shopId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="openId != null">
|
|
open_id = #{openId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopOpenId">
|
|
update tb_shop_open_id
|
|
set
|
|
shop_id = #{shopId,jdbcType=INTEGER},
|
|
open_id = #{openId,jdbcType=VARCHAR},
|
|
status = #{status,jdbcType=TINYINT},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper>
|