insert into tb_merchant_account(account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile, name, sex, email, head_img, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able, created_at, updated_at)
values (#{account}, #{password}, #{merchantId}, #{shopId}, #{shopSnap}, #{isAdmin}, #{isMercantile}, #{name}, #{sex}, #{email}, #{headImg}, #{telephone}, #{status}, #{sort}, #{roleId}, #{lastLoginAt}, #{mpOpenId}, #{msgAble}, #{createdAt}, #{updatedAt})
insert into tb_merchant_account(account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile, name, sex, email, head_img, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able, created_at, updated_at)
values
(#{entity.account}, #{entity.password}, #{entity.merchantId}, #{entity.shopId}, #{entity.shopSnap}, #{entity.isAdmin}, #{entity.isMercantile}, #{entity.name}, #{entity.sex}, #{entity.email}, #{entity.headImg}, #{entity.telephone}, #{entity.status}, #{entity.sort}, #{entity.roleId}, #{entity.lastLoginAt}, #{entity.mpOpenId}, #{entity.msgAble}, #{entity.createdAt}, #{entity.updatedAt})
insert into tb_merchant_account(account, password, merchant_id, shop_id, shop_snap, is_admin, is_mercantile, name, sex, email, head_img, telephone, status, sort, role_id, last_login_at, mp_open_id, msg_able, created_at, updated_at)
values
(#{entity.account}, #{entity.password}, #{entity.merchantId}, #{entity.shopId}, #{entity.shopSnap}, #{entity.isAdmin}, #{entity.isMercantile}, #{entity.name}, #{entity.sex}, #{entity.email}, #{entity.headImg}, #{entity.telephone}, #{entity.status}, #{entity.sort}, #{entity.roleId}, #{entity.lastLoginAt}, #{entity.mpOpenId}, #{entity.msgAble}, #{entity.createdAt}, #{entity.updatedAt})
on duplicate key update
account = values(account),
password = values(password),
merchant_id = values(merchant_id),
shop_id = values(shop_id),
shop_snap = values(shop_snap),
is_admin = values(is_admin),
is_mercantile = values(is_mercantile),
name = values(name),
sex = values(sex),
email = values(email),
head_img = values(head_img),
telephone = values(telephone),
status = values(status),
sort = values(sort),
role_id = values(role_id),
last_login_at = values(last_login_at),
mp_open_id = values(mp_open_id),
msg_able = values(msg_able),
created_at = values(created_at),
updated_at = values(updated_at)
update tb_merchant_account
account = #{account},
password = #{password},
merchant_id = #{merchantId},
shop_id = #{shopId},
shop_snap = #{shopSnap},
is_admin = #{isAdmin},
is_mercantile = #{isMercantile},
name = #{name},
sex = #{sex},
email = #{email},
head_img = #{headImg},
telephone = #{telephone},
status = #{status},
sort = #{sort},
role_id = #{roleId},
last_login_at = #{lastLoginAt},
mp_open_id = #{mpOpenId},
msg_able = #{msgAble},
created_at = #{createdAt},
updated_at = #{updatedAt},
where id = #{id}
delete from tb_merchant_account where id = #{id}