Files
cashier-client/src/main/resources/mapper/TbPlussShopStaffMapper.xml
wangw 3e6cb81b46 购物车 多规格商品返回规格信息
团购卷列表
团购卷退款
员工登录管理
2024-05-24 15:56:41 +08:00

205 lines
7.4 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.TbPlussShopStaffMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="max_discount_amount" jdbcType="DECIMAL" property="maxDiscountAmount" />
<result column="status" jdbcType="BIT" property="status" />
<result column="employee" jdbcType="VARCHAR" property="employee" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="is_manage" jdbcType="INTEGER" property="isManage" />
<result column="is_pc" jdbcType="INTEGER" property="isPc" />
</resultMap>
<sql id="Base_Column_List">
id
, code, name, account, password, max_discount_amount, status, employee, shop_id,
created_at, updated_at, type,is_manage,is_pc
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_pluss_shop_staff
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_shop_staff
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
insert into tb_pluss_shop_staff (id, code, name,
account, password, max_discount_amount,
status, employee, shop_id,
created_at, updated_at, type,is_manage,is_pc
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{maxDiscountAmount,jdbcType=DECIMAL},
#{status,jdbcType=BIT}, #{employee,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
#{isManage,jdbcType=INTEGER},#{isPc,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
insert into tb_pluss_shop_staff
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
<if test="account != null">
account,
</if>
<if test="password != null">
password,
</if>
<if test="maxDiscountAmount != null">
max_discount_amount,
</if>
<if test="status != null">
status,
</if>
<if test="employee != null">
employee,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="type != null">
type,
</if>
<if test="isManage != null">
is_manage,
</if>
<if test="isPc != null">
is_pc,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="maxDiscountAmount != null">
#{maxDiscountAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=BIT},
</if>
<if test="employee != null">
#{employee,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="isManage != null">
#{isManage,jdbcType=INTEGER},
</if>
<if test="isPc != null">
#{isPc,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
update tb_pluss_shop_staff
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="maxDiscountAmount != null">
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=BIT},
</if>
<if test="employee != null">
employee = #{employee,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="isManage != null">
is_manage = #{isManage,jdbcType=INTEGER},
</if>
<if test="isPc != null">
is_pc = #{isPc,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff">
update tb_pluss_shop_staff
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
max_discount_amount = #{maxDiscountAmount,jdbcType=DECIMAL},
status = #{status,jdbcType=BIT},
employee = #{employee,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR},
is_manage = #{isManage,jdbcType=INTEGER},
is_pc = #{isPc,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAccount" resultMap="BaseResultMap">
select * from tb_pluss_shop_staff where account=#{account}
</select>
</mapper>