USE yami_bbc;

# 216为'客服', 217为'消息'
UPDATE tz_shop_menu
SET parent_id = 216
WHERE
	menu_id = 217;

# 新增确认收货30天自动好评定时任务
insert into `xxl_job_info`(`id`, `job_group`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`,
                           `schedule_type`, `schedule_conf`, `misfire_strategy`, `executor_route_strategy`,
                           `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`,
                           `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`,
                           `child_jobid`, `trigger_status`, `trigger_last_time`, `trigger_next_time`)
values
(51,2, '确认收货30天自动好评', '2024-03-06 10:07:30', '2024-03-06 10:07:30', 'admin', '', 'CRON',
    '0 0 * * * ?', 'DO_NOTHING', 'FIRST', 'autoProdGoodComm', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN',
    '', 'GLUE代码初始化', '2023-12-25 10:07:30', '', 1, 0, 0);

# 商品拓展信息新增字段
ALTER TABLE `tz_prod_extension`
ADD COLUMN `comm_num` int(0) NOT NULL DEFAULT 0 COMMENT '评论数',
ADD COLUMN `actual_stock` int(0) NOT NULL DEFAULT 0 COMMENT '实际库存';

# 新增同步商品库存和销量定时任务
insert into `xxl_job_info`(`id`, `job_group`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`,
                           `schedule_type`, `schedule_conf`, `misfire_strategy`, `executor_route_strategy`,
                           `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`,
                           `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`,
                           `child_jobid`, `trigger_status`, `trigger_last_time`, `trigger_next_time`)
values
(52,2, '同步Es商品信息到数据库(es关闭后需执行一次)', '2024-03-15 10:07:30', '2024-03-15 10:07:30', 'admin', '', 'CRON',
    '0 0/30 * * * ?', 'DO_NOTHING', 'FIRST', 'syncEsProdInfoToDb', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN',
    '', 'GLUE代码初始化', '2023-12-25 10:07:30', '', 0, 0, 0);
