feat(产品模块开发): 完善产品相关接口

新增sql:状态和优先级新增是否为默认值字段
This commit is contained in:
OTTO 2023-10-17 10:02:11 +08:00
parent 9b2d9a8a9c
commit 30f0f94e90
2 changed files with 30 additions and 18 deletions

View File

@ -0,0 +1,12 @@
-- 优先级和自定义增加是否为默认字段
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `pms_product_priority` ADD COLUMN `is_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否为默认值' AFTER `reserved_field_1`;
ALTER TABLE `pms_product_priority` DROP COLUMN `reserved_field_2`;
ALTER TABLE `pms_product_status` ADD COLUMN `is_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否为默认值' AFTER `reserved_field_1`;
ALTER TABLE `pms_product_status` DROP COLUMN `reserved_field_2`;
SET FOREIGN_KEY_CHECKS=1;

View File

@ -1,40 +1,40 @@
-- 初始化产品下优先级和状态的数据
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (1, '', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (1, '', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (2, '正常', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (2, '正常', 1, NULL, '', NULL, '', '0', NULL, 1);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (3, '', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (3, '', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (4, '紧急', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (4, '紧急', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (5, '', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (5, '', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (6, '正常', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (6, '正常', 2, NULL, '', NULL, '', '0', NULL, 1);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (7, '', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (7, '', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (8, '紧急', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_priority` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (8, '紧急', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (1, '未启动', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (1, '未启动', 1, NULL, '', NULL, '', '0', NULL, 1);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (2, '进行中', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (2, '进行中', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (3, '已完成', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (3, '已完成', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (4, '已过期', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (4, '已过期', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (5, '已关闭', 1, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (5, '已关闭', 1, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (6, '待评审', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (6, '待评审', 2, NULL, '', NULL, '', '0', NULL, 1);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (7, '进行中', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (7, '进行中', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (8, '已完成', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (8, '已完成', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (9, '已拒绝', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (9, '已拒绝', 2, NULL, '', NULL, '', '0', NULL, 0);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `reserved_field_2`) VALUES (10, '已关闭', 2, NULL, '', NULL, '', '0', NULL, NULL);
INSERT INTO `pms_product_status` (`id`, `name`, `type`, `update_time`, `update_by`, `create_time`, `create_by`, `del_flag`, `reserved_field_1`, `is_default`) VALUES (10, '已关闭', 2, NULL, '', NULL, '', '0', NULL, 0);
SET FOREIGN_KEY_CHECKS = 1;