🗃️ 执行数据库相关的变化 统一flow 模块数据库字段【del_flag】/ 【bool】字段

This commit is contained in:
lbw committed 2024-02-24 17:37:48 +08:00
1 parent 0b314320a3
commit eaed181aa9
5 files changed
+16 -16

No files matched your search

+8 -8
View File
@@ -9,7 +9,7 @@ SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `process`;
CREATE TABLE `process` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '表单ID',
@@ -40,7 +40,7 @@ CREATE TABLE `process` (
DROP TABLE IF EXISTS `process_copy`;
CREATE TABLE `process_copy` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`start_time` datetime NOT NULL COMMENT ' 流程发起时间',
@@ -67,7 +67,7 @@ CREATE TABLE `process_copy` (
DROP TABLE IF EXISTS `process_group`;
CREATE TABLE `process_group` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`group_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分组名',
@@ -88,7 +88,7 @@ CREATE TABLE `process_instance_record` (
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流程名字',
`logo` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头像',
`user_id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '流程id',
@@ -112,7 +112,7 @@ CREATE TABLE `process_instance_record` (
DROP TABLE IF EXISTS `process_node_data`;
CREATE TABLE `process_node_data` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流程id',
@@ -130,7 +130,7 @@ CREATE TABLE `process_node_data` (
DROP TABLE IF EXISTS `process_node_record`;
CREATE TABLE `process_node_record` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流程id',
@@ -155,7 +155,7 @@ CREATE TABLE `process_node_record` (
DROP TABLE IF EXISTS `process_node_record_assign_user`;
CREATE TABLE `process_node_record_assign_user` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '流程id',
@@ -184,7 +184,7 @@ CREATE TABLE `process_node_record_assign_user` (
DROP TABLE IF EXISTS `process_starter`;
CREATE TABLE `process_starter` (
`id` bigint NOT NULL COMMENT '用户id',
`del_flag` tinyint(1) NOT NULL COMMENT '逻辑删除字段',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type_id` bigint NOT NULL COMMENT '用户id或者部门id',
@@ -78,13 +78,13 @@ public class Process {
* 0 正常 1=隐藏
*/
@TableField("is_hidden")
private Boolean hidden;
private String hidden;
/**
* 0 正常 1=停用
*/
@TableField("is_stop")
private Boolean stop;
private String stop;
/**
* 流程管理员
@@ -46,7 +46,7 @@ public class FormGroupVo {
private String logo;
private Boolean stop;
private String stop;
private String remark;
@@ -34,7 +34,7 @@ public class CombinationGroupServiceImpl implements ICombinationGroupService {
/**
* 查询表单组包含流程
* @param hidden
* @param groupId groupId
* @return 表单组数据
*/
@Override
@@ -211,8 +211,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
p.setProcess(process.getProcess());
p.setRemark(process.getRemark());
p.setSort(0);
p.setHidden(false);
p.setStop(false);
p.setHidden("0");
p.setStop("0");
p.setAdminId(nodeUser.getId());
p.setUniqueId(IdUtil.fastSimpleUUID());
p.setAdminList(process.getAdminList());
@@ -244,8 +244,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
public R update(String flowId, String type, Long groupId) {
Process process = new Process();
process.setFlowId(flowId);
process.setStop("stop".equals(type));
process.setHidden("delete".equals(type));
process.setStop("stop".equals(type) ? "1" : "0");
process.setHidden("delete".equals(type) ? "1" : "0");
process.setGroupId(groupId);
this.updateByFlowId(process);
return R.ok();