USE `yami_bbc`;
ALTER TABLE `tz_shop_detail`
    ADD FULLTEXT INDEX `shop_name`(`shop_name`);


ALTER TABLE `tz_user_level_coupon`
    ADD COLUMN `relevance_time` datetime NULL COMMENT '关联创建时间' AFTER `coupon_id`;

-- 新增积分过期消息模板
INSERT INTO `tz_notify_template`(`template_id`, `send_type`, `message`, `template_types`, `template_code`, `mp_code`, `msg_type`, `status`, `create_time`)
VALUES
    (1839, 20, '尊敬的客户，您累计的${expireScore}积分已于${scoreExpireTime}过期。', '1,3', NULL, NULL, 1, 1, NULL);

-- 添加支付表通联的微信/支付宝外部订单号字段
ALTER TABLE `tz_pay_info`
    ADD COLUMN `allinpay_biz_pay_no` VARCHAR(255) DEFAULT NULL COMMENT '外部订单流水号(通联独有),渠道交易单号如支付宝订单号，微信交易单号';

-- 直播间管理添加关闭按钮
INSERT INTO `tz_shop_menu`(`menu_id`, `parent_id`, `url`, `perms`, `type`, `icon`, `order_num`, `hidden`, `router_name`,`sys_type`)
VALUES (1415, 42, '', 'live:liveRoom:close', 2, '', 0, 0, '',1);

INSERT INTO `tz_shop_menu_lang`(`menu_id`, `lang`, `name`)
VALUES
    (1415, 0, '关闭'),
    (1415, 1, 'close');

-- 商家提现设置权限补充
INSERT INTO `tz_sys_menu`(`menu_id`, `parent_id`, `url`, `perms`, `type`, `icon`, `order_num`, `hidden`, `router_name`)
VALUES
    (1201, 483, '', 'shop:shopWithdrawCash:save', 2, '', 0, 0, '');

INSERT INTO `tz_sys_menu_lang`(`menu_id`, `lang`, `name`)
VALUES
    (1201, 0, '提现设置'),
    (1201, 1, 'withdrawCash Set');
