315 lines
11 KiB
XML
315 lines
11 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.TbmerchantAccountMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="account" jdbcType="VARCHAR" property="account" />
|
|
<result column="password" jdbcType="VARCHAR" property="password" />
|
|
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
|
<result column="shop_snap" jdbcType="VARCHAR" property="shopSnap" />
|
|
<result column="is_admin" jdbcType="TINYINT" property="isAdmin" />
|
|
<result column="is_mercantile" jdbcType="TINYINT" property="isMercantile" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="sex" jdbcType="TINYINT" property="sex" />
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
|
|
<result column="status" jdbcType="BIT" property="status" />
|
|
<result column="sort" jdbcType="INTEGER" property="sort" />
|
|
<result column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
<result column="last_login_at" jdbcType="INTEGER" property="lastLoginAt" />
|
|
<result column="mp_open_id" jdbcType="VARCHAR" property="mpOpenId" />
|
|
<result column="msg_able" jdbcType="TINYINT" property="msgAble" />
|
|
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
|
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
|
</resultMap>
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
<result column="head_img" jdbcType="LONGVARCHAR" property="headImg" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile,
|
|
name, sex, email, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able,
|
|
created_at, updated_at
|
|
</sql>
|
|
<sql id="Blob_Column_List">
|
|
head_img
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
,
|
|
<include refid="Blob_Column_List" />
|
|
from tb_merchant_account
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
delete from tb_merchant_account
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
insert into tb_merchant_account (id, account, password,
|
|
merchant_id, shop_id, shop_snap,
|
|
is_admin, is_mercantile, name,
|
|
sex, email, telephone,
|
|
status, sort, role_id, last_login_at,
|
|
mp_open_id, msg_able, created_at,
|
|
updated_at, head_img)
|
|
values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
#{merchantId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{shopSnap,jdbcType=VARCHAR},
|
|
#{isAdmin,jdbcType=TINYINT}, #{isMercantile,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR},
|
|
#{sex,jdbcType=TINYINT}, #{email,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR},
|
|
#{status,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{lastLoginAt,jdbcType=INTEGER},
|
|
#{mpOpenId,jdbcType=VARCHAR}, #{msgAble,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT},
|
|
#{updatedAt,jdbcType=BIGINT}, #{headImg,jdbcType=LONGVARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
insert into tb_merchant_account
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="account != null">
|
|
account,
|
|
</if>
|
|
<if test="password != null">
|
|
password,
|
|
</if>
|
|
<if test="merchantId != null">
|
|
merchant_id,
|
|
</if>
|
|
<if test="shopId != null">
|
|
shop_id,
|
|
</if>
|
|
<if test="shopSnap != null">
|
|
shop_snap,
|
|
</if>
|
|
<if test="isAdmin != null">
|
|
is_admin,
|
|
</if>
|
|
<if test="isMercantile != null">
|
|
is_mercantile,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="sex != null">
|
|
sex,
|
|
</if>
|
|
<if test="email != null">
|
|
email,
|
|
</if>
|
|
<if test="telephone != null">
|
|
telephone,
|
|
</if>
|
|
<if test="status != null">
|
|
status,
|
|
</if>
|
|
<if test="sort != null">
|
|
sort,
|
|
</if>
|
|
<if test="roleId != null">
|
|
role_id,
|
|
</if>
|
|
<if test="lastLoginAt != null">
|
|
last_login_at,
|
|
</if>
|
|
<if test="mpOpenId != null">
|
|
mp_open_id,
|
|
</if>
|
|
<if test="msgAble != null">
|
|
msg_able,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="headImg != null">
|
|
head_img,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="account != null">
|
|
#{account,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="password != null">
|
|
#{password,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="merchantId != null">
|
|
#{merchantId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="shopId != null">
|
|
#{shopId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="shopSnap != null">
|
|
#{shopSnap,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="isAdmin != null">
|
|
#{isAdmin,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="isMercantile != null">
|
|
#{isMercantile,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sex != null">
|
|
#{sex,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="email != null">
|
|
#{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="telephone != null">
|
|
#{telephone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=BIT},
|
|
</if>
|
|
<if test="sort != null">
|
|
#{sort,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="roleId != null">
|
|
#{roleId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="lastLoginAt != null">
|
|
#{lastLoginAt,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="mpOpenId != null">
|
|
#{mpOpenId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="msgAble != null">
|
|
#{msgAble,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
#{createdAt,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
#{updatedAt,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="headImg != null">
|
|
#{headImg,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
update tb_merchant_account
|
|
<set>
|
|
<if test="account != null">
|
|
account = #{account,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="password != null">
|
|
password = #{password,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="merchantId != null">
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="shopId != null">
|
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="shopSnap != null">
|
|
shop_snap = #{shopSnap,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="isAdmin != null">
|
|
is_admin = #{isAdmin,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="isMercantile != null">
|
|
is_mercantile = #{isMercantile,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sex != null">
|
|
sex = #{sex,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="email != null">
|
|
email = #{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="telephone != null">
|
|
telephone = #{telephone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status,jdbcType=BIT},
|
|
</if>
|
|
<if test="sort != null">
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="roleId != null">
|
|
role_id = #{roleId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="lastLoginAt != null">
|
|
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="mpOpenId != null">
|
|
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="msgAble != null">
|
|
msg_able = #{msgAble,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at = #{createdAt,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at = #{updatedAt,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="headImg != null">
|
|
head_img = #{headImg,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
update tb_merchant_account
|
|
set account = #{account,jdbcType=VARCHAR},
|
|
password = #{password,jdbcType=VARCHAR},
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
|
shop_snap = #{shopSnap,jdbcType=VARCHAR},
|
|
is_admin = #{isAdmin,jdbcType=TINYINT},
|
|
is_mercantile = #{isMercantile,jdbcType=TINYINT},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
sex = #{sex,jdbcType=TINYINT},
|
|
email = #{email,jdbcType=VARCHAR},
|
|
telephone = #{telephone,jdbcType=VARCHAR},
|
|
status = #{status,jdbcType=BIT},
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
role_id = #{roleId,jdbcType=INTEGER},
|
|
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
|
|
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
|
|
msg_able = #{msgAble,jdbcType=TINYINT},
|
|
created_at = #{createdAt,jdbcType=BIGINT},
|
|
updated_at = #{updatedAt,jdbcType=BIGINT},
|
|
head_img = #{headImg,jdbcType=LONGVARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount">
|
|
update tb_merchant_account
|
|
set account = #{account,jdbcType=VARCHAR},
|
|
password = #{password,jdbcType=VARCHAR},
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
|
shop_snap = #{shopSnap,jdbcType=VARCHAR},
|
|
is_admin = #{isAdmin,jdbcType=TINYINT},
|
|
is_mercantile = #{isMercantile,jdbcType=TINYINT},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
sex = #{sex,jdbcType=TINYINT},
|
|
email = #{email,jdbcType=VARCHAR},
|
|
telephone = #{telephone,jdbcType=VARCHAR},
|
|
status = #{status,jdbcType=BIT},
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
role_id = #{roleId,jdbcType=INTEGER},
|
|
last_login_at = #{lastLoginAt,jdbcType=INTEGER},
|
|
mp_open_id = #{mpOpenId,jdbcType=VARCHAR},
|
|
msg_able = #{msgAble,jdbcType=TINYINT},
|
|
created_at = #{createdAt,jdbcType=BIGINT},
|
|
updated_at = #{updatedAt,jdbcType=BIGINT}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
|
|
<select id="selectByAccount" resultMap="BaseResultMap">
|
|
select * from tb_merchant_account where account=#{account}
|
|
</select>
|
|
</mapper> |