##12.15
INSERT INTO `role_item` (`id`, `item_name`, `item_type`, `item_value`, `category`, `operate`, `created`, `modify`) VALUES (38, '油盐糖-查看/新增/编辑/删除', '业务端', '[get,post,put,delete]:sugar', '油盐糖管理', 'system', '2023-12-16 21:17:57', '2023-12-16 21:24:26');

UPDATE `diet`.`role` SET `role_items` = '[18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38]' WHERE `vender` != 0;

ALTER TABLE `diet`.`menu` RENAME INDEX `udx_vender` TO `idx_vender`;

DROP TABLE IF EXISTS `sugar`;
CREATE TABLE `sugar`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `vender` bigint UNSIGNED NOT NULL COMMENT '单位',
  `name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '名称',
  `day` int UNSIGNED NOT NULL COMMENT '天数',
  `sugar_day` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '日平均(糖)',
  `sugar_week` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '周总量(糖)',
  `oil_day` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '日平均(油)',
  `oil_week` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '周总量(油)',
  `salt_day` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '日平均(盐)',
  `salt_week` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '周总量(盐)',
  `start_time` date NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` date NULL DEFAULT NULL COMMENT '结束时间',
  `operate` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'system' COMMENT '操作员',
  `created` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `modify` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `udx_vender`(`vender` ASC) USING BTREE,
  INDEX `idx_time`(`start_time` ASC, `end_time` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '油盐糖' ROW_FORMAT = Dynamic;