diff --git a/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJob.java b/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJob.java new file mode 100644 index 0000000000..004d390051 --- /dev/null +++ b/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJob.java @@ -0,0 +1,15 @@ +package io.dataease.plugins.common.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class SysStartupJob implements Serializable { + private String id; + + private String name; + + private String status; + + private static final long serialVersionUID = 1L; +} diff --git a/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJobExample.java b/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJobExample.java new file mode 100644 index 0000000000..f59ed113b8 --- /dev/null +++ b/backend/src/main/java/io/dataease/plugins/common/base/domain/SysStartupJobExample.java @@ -0,0 +1,410 @@ +package io.dataease.plugins.common.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class SysStartupJobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysStartupJobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.java b/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.java new file mode 100644 index 0000000000..76afd0107e --- /dev/null +++ b/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.java @@ -0,0 +1,30 @@ +package io.dataease.plugins.common.base.mapper; + +import io.dataease.plugins.common.base.domain.SysStartupJob; +import io.dataease.plugins.common.base.domain.SysStartupJobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysStartupJobMapper { + long countByExample(SysStartupJobExample example); + + int deleteByExample(SysStartupJobExample example); + + int deleteByPrimaryKey(String id); + + int insert(SysStartupJob record); + + int insertSelective(SysStartupJob record); + + List selectByExample(SysStartupJobExample example); + + SysStartupJob selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") SysStartupJob record, @Param("example") SysStartupJobExample example); + + int updateByExample(@Param("record") SysStartupJob record, @Param("example") SysStartupJobExample example); + + int updateByPrimaryKeySelective(SysStartupJob record); + + int updateByPrimaryKey(SysStartupJob record); +} diff --git a/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.xml b/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.xml new file mode 100644 index 0000000000..f473e26422 --- /dev/null +++ b/backend/src/main/java/io/dataease/plugins/common/base/mapper/SysStartupJobMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, `status` + + + + + delete from sys_startup_job + where id = #{id,jdbcType=VARCHAR} + + + delete from sys_startup_job + + + + + + insert into sys_startup_job (id, `name`, `status` + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR} + ) + + + insert into sys_startup_job + + + id, + + + `name`, + + + `status`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + + + + update sys_startup_job + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + + + + + + update sys_startup_job + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR} + + + + + + update sys_startup_job + + + `name` = #{name,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update sys_startup_job + set `name` = #{name,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + diff --git a/backend/src/main/resources/db/migration/V38__1.13.sql b/backend/src/main/resources/db/migration/V38__1.13.sql new file mode 100644 index 0000000000..03e2455634 --- /dev/null +++ b/backend/src/main/resources/db/migration/V38__1.13.sql @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS `dataset_row_permissions_tree`; +CREATE TABLE `dataset_row_permissions_tree` +( + `id` varchar(64) NOT NULL COMMENT 'ID', + `enable` bit(1) DEFAULT NULL COMMENT '是否启用', + `auth_target_type` varchar(255) DEFAULT NULL COMMENT '权限类型:dept/role/user', + `auth_target_id` bigint(20) DEFAULT NULL COMMENT '权限对象ID', + `dataset_id` varchar(64) DEFAULT NULL COMMENT '数据集ID', + `expression_tree` longtext DEFAULT NULL COMMENT '关系表达式', + `white_list_user` longtext DEFAULT NULL COMMENT '用户白名单', + `white_list_role` longtext DEFAULT NULL COMMENT '角色白名单', + `white_list_dept` longtext DEFAULT NULL COMMENT '组织白名单', + `update_time` bigint(13) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; + +DROP TABLE IF EXISTS `sys_startup_job`; +CREATE TABLE `sys_startup_job` +( + `id` varchar(64) NOT NULL COMMENT 'ID', + `name` varchar(255) DEFAULT NULL COMMENT '任务名称', + `status` varchar(255) DEFAULT NULL COMMENT '任务状态', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; + +BEGIN; +INSERT INTO `sys_startup_job` VALUES ('rowPermissionsMerge', 'rowPermissionsMerge', 'ready'); +COMMIT; + +SET FOREIGN_KEY_CHECKS = 1;