mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 更新任务调度模块 与 代码生成模块 MP lombok 化
This commit is contained in:
@ -1,24 +1,37 @@
|
||||
package com.ruoyi.generator.domain;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.constant.GenConstants;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 业务表 gen_table
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class GenTable extends BaseEntity
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("gen_table")
|
||||
public class GenTable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
@TableId(value = "table_id", type = IdType.AUTO)
|
||||
private Long tableId;
|
||||
|
||||
/** 表名称 */
|
||||
@ -69,263 +82,76 @@ public class GenTable extends BaseEntity
|
||||
private String genPath;
|
||||
|
||||
/** 主键信息 */
|
||||
@TableField(exist = false)
|
||||
private GenTableColumn pkColumn;
|
||||
|
||||
/** 子表信息 */
|
||||
@TableField(exist = false)
|
||||
private GenTable subTable;
|
||||
|
||||
/** 表列信息 */
|
||||
@Valid
|
||||
@TableField(exist = false)
|
||||
private List<GenTableColumn> columns;
|
||||
|
||||
/** 其它生成选项 */
|
||||
private String options;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
/** 树编码字段 */
|
||||
@TableField(exist = false)
|
||||
private String treeCode;
|
||||
|
||||
/** 树父编码字段 */
|
||||
@TableField(exist = false)
|
||||
private String treeParentCode;
|
||||
|
||||
/** 树名称字段 */
|
||||
@TableField(exist = false)
|
||||
private String treeName;
|
||||
|
||||
/** 上级菜单ID字段 */
|
||||
@TableField(exist = false)
|
||||
private String parentMenuId;
|
||||
|
||||
/** 上级菜单名称字段 */
|
||||
@TableField(exist = false)
|
||||
private String parentMenuName;
|
||||
|
||||
public Long getTableId()
|
||||
{
|
||||
return tableId;
|
||||
}
|
||||
|
||||
public void setTableId(Long tableId)
|
||||
{
|
||||
this.tableId = tableId;
|
||||
}
|
||||
|
||||
public String getTableName()
|
||||
{
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName)
|
||||
{
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getTableComment()
|
||||
{
|
||||
return tableComment;
|
||||
}
|
||||
|
||||
public void setTableComment(String tableComment)
|
||||
{
|
||||
this.tableComment = tableComment;
|
||||
}
|
||||
|
||||
public String getSubTableName()
|
||||
{
|
||||
return subTableName;
|
||||
}
|
||||
|
||||
public void setSubTableName(String subTableName)
|
||||
{
|
||||
this.subTableName = subTableName;
|
||||
}
|
||||
|
||||
public String getSubTableFkName()
|
||||
{
|
||||
return subTableFkName;
|
||||
}
|
||||
|
||||
public void setSubTableFkName(String subTableFkName)
|
||||
{
|
||||
this.subTableFkName = subTableFkName;
|
||||
}
|
||||
|
||||
public String getClassName()
|
||||
{
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className)
|
||||
{
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getTplCategory()
|
||||
{
|
||||
return tplCategory;
|
||||
}
|
||||
|
||||
public void setTplCategory(String tplCategory)
|
||||
{
|
||||
this.tplCategory = tplCategory;
|
||||
}
|
||||
|
||||
public String getPackageName()
|
||||
{
|
||||
return packageName;
|
||||
}
|
||||
|
||||
public void setPackageName(String packageName)
|
||||
{
|
||||
this.packageName = packageName;
|
||||
}
|
||||
|
||||
public String getModuleName()
|
||||
{
|
||||
return moduleName;
|
||||
}
|
||||
|
||||
public void setModuleName(String moduleName)
|
||||
{
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
public String getBusinessName()
|
||||
{
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName)
|
||||
{
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getFunctionName()
|
||||
{
|
||||
return functionName;
|
||||
}
|
||||
|
||||
public void setFunctionName(String functionName)
|
||||
{
|
||||
this.functionName = functionName;
|
||||
}
|
||||
|
||||
public String getFunctionAuthor()
|
||||
{
|
||||
return functionAuthor;
|
||||
}
|
||||
|
||||
public void setFunctionAuthor(String functionAuthor)
|
||||
{
|
||||
this.functionAuthor = functionAuthor;
|
||||
}
|
||||
|
||||
public String getGenType()
|
||||
{
|
||||
return genType;
|
||||
}
|
||||
|
||||
public void setGenType(String genType)
|
||||
{
|
||||
this.genType = genType;
|
||||
}
|
||||
|
||||
public String getGenPath()
|
||||
{
|
||||
return genPath;
|
||||
}
|
||||
|
||||
public void setGenPath(String genPath)
|
||||
{
|
||||
this.genPath = genPath;
|
||||
}
|
||||
|
||||
public GenTableColumn getPkColumn()
|
||||
{
|
||||
return pkColumn;
|
||||
}
|
||||
|
||||
public void setPkColumn(GenTableColumn pkColumn)
|
||||
{
|
||||
this.pkColumn = pkColumn;
|
||||
}
|
||||
|
||||
public GenTable getSubTable()
|
||||
{
|
||||
return subTable;
|
||||
}
|
||||
|
||||
public void setSubTable(GenTable subTable)
|
||||
{
|
||||
this.subTable = subTable;
|
||||
}
|
||||
|
||||
public List<GenTableColumn> getColumns()
|
||||
{
|
||||
return columns;
|
||||
}
|
||||
|
||||
public void setColumns(List<GenTableColumn> columns)
|
||||
{
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
public String getOptions()
|
||||
{
|
||||
return options;
|
||||
}
|
||||
|
||||
public void setOptions(String options)
|
||||
{
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public String getTreeCode()
|
||||
{
|
||||
return treeCode;
|
||||
}
|
||||
|
||||
public void setTreeCode(String treeCode)
|
||||
{
|
||||
this.treeCode = treeCode;
|
||||
}
|
||||
|
||||
public String getTreeParentCode()
|
||||
{
|
||||
return treeParentCode;
|
||||
}
|
||||
|
||||
public void setTreeParentCode(String treeParentCode)
|
||||
{
|
||||
this.treeParentCode = treeParentCode;
|
||||
}
|
||||
|
||||
public String getTreeName()
|
||||
{
|
||||
return treeName;
|
||||
}
|
||||
|
||||
public void setTreeName(String treeName)
|
||||
{
|
||||
this.treeName = treeName;
|
||||
}
|
||||
|
||||
public String getParentMenuId()
|
||||
{
|
||||
return parentMenuId;
|
||||
}
|
||||
|
||||
public void setParentMenuId(String parentMenuId)
|
||||
{
|
||||
this.parentMenuId = parentMenuId;
|
||||
}
|
||||
|
||||
public String getParentMenuName()
|
||||
{
|
||||
return parentMenuName;
|
||||
}
|
||||
|
||||
public void setParentMenuName(String parentMenuName)
|
||||
{
|
||||
this.parentMenuName = parentMenuName;
|
||||
}
|
||||
|
||||
public boolean isSub()
|
||||
{
|
||||
return isSub(this.tplCategory);
|
||||
|
@ -1,20 +1,34 @@
|
||||
package com.ruoyi.generator.domain;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 代码生成业务字段表 gen_table_column
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("gen_table_column")
|
||||
public class GenTableColumn extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
@TableId(value = "column_id", type = IdType.AUTO)
|
||||
private Long columnId;
|
||||
|
||||
/** 归属表编号 */
|
||||
@ -69,91 +83,41 @@ public class GenTableColumn extends BaseEntity
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
||||
public void setColumnId(Long columnId)
|
||||
{
|
||||
this.columnId = columnId;
|
||||
}
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
public Long getColumnId()
|
||||
{
|
||||
return columnId;
|
||||
}
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
public void setTableId(Long tableId)
|
||||
{
|
||||
this.tableId = tableId;
|
||||
}
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
public Long getTableId()
|
||||
{
|
||||
return tableId;
|
||||
}
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
public void setColumnName(String columnName)
|
||||
{
|
||||
this.columnName = columnName;
|
||||
}
|
||||
|
||||
public String getColumnName()
|
||||
{
|
||||
return columnName;
|
||||
}
|
||||
|
||||
public void setColumnComment(String columnComment)
|
||||
{
|
||||
this.columnComment = columnComment;
|
||||
}
|
||||
|
||||
public String getColumnComment()
|
||||
{
|
||||
return columnComment;
|
||||
}
|
||||
|
||||
public void setColumnType(String columnType)
|
||||
{
|
||||
this.columnType = columnType;
|
||||
}
|
||||
|
||||
public String getColumnType()
|
||||
{
|
||||
return columnType;
|
||||
}
|
||||
|
||||
public void setJavaType(String javaType)
|
||||
{
|
||||
this.javaType = javaType;
|
||||
}
|
||||
|
||||
public String getJavaType()
|
||||
{
|
||||
return javaType;
|
||||
}
|
||||
|
||||
public void setJavaField(String javaField)
|
||||
{
|
||||
this.javaField = javaField;
|
||||
}
|
||||
|
||||
public String getJavaField()
|
||||
{
|
||||
return javaField;
|
||||
}
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
public String getCapJavaField()
|
||||
{
|
||||
return StrUtil.upperFirst(javaField);
|
||||
}
|
||||
|
||||
public void setIsPk(String isPk)
|
||||
{
|
||||
this.isPk = isPk;
|
||||
}
|
||||
|
||||
public String getIsPk()
|
||||
{
|
||||
return isPk;
|
||||
}
|
||||
|
||||
public boolean isPk()
|
||||
{
|
||||
return isPk(this.isPk);
|
||||
@ -164,16 +128,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isPk != null && StrUtil.equals("1", isPk);
|
||||
}
|
||||
|
||||
public String getIsIncrement()
|
||||
{
|
||||
return isIncrement;
|
||||
}
|
||||
|
||||
public void setIsIncrement(String isIncrement)
|
||||
{
|
||||
this.isIncrement = isIncrement;
|
||||
}
|
||||
|
||||
public boolean isIncrement()
|
||||
{
|
||||
return isIncrement(this.isIncrement);
|
||||
@ -184,16 +138,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isIncrement != null && StrUtil.equals("1", isIncrement);
|
||||
}
|
||||
|
||||
public void setIsRequired(String isRequired)
|
||||
{
|
||||
this.isRequired = isRequired;
|
||||
}
|
||||
|
||||
public String getIsRequired()
|
||||
{
|
||||
return isRequired;
|
||||
}
|
||||
|
||||
public boolean isRequired()
|
||||
{
|
||||
return isRequired(this.isRequired);
|
||||
@ -204,16 +148,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isRequired != null && StrUtil.equals("1", isRequired);
|
||||
}
|
||||
|
||||
public void setIsInsert(String isInsert)
|
||||
{
|
||||
this.isInsert = isInsert;
|
||||
}
|
||||
|
||||
public String getIsInsert()
|
||||
{
|
||||
return isInsert;
|
||||
}
|
||||
|
||||
public boolean isInsert()
|
||||
{
|
||||
return isInsert(this.isInsert);
|
||||
@ -224,16 +158,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isInsert != null && StrUtil.equals("1", isInsert);
|
||||
}
|
||||
|
||||
public void setIsEdit(String isEdit)
|
||||
{
|
||||
this.isEdit = isEdit;
|
||||
}
|
||||
|
||||
public String getIsEdit()
|
||||
{
|
||||
return isEdit;
|
||||
}
|
||||
|
||||
public boolean isEdit()
|
||||
{
|
||||
return isInsert(this.isEdit);
|
||||
@ -244,16 +168,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isEdit != null && StrUtil.equals("1", isEdit);
|
||||
}
|
||||
|
||||
public void setIsList(String isList)
|
||||
{
|
||||
this.isList = isList;
|
||||
}
|
||||
|
||||
public String getIsList()
|
||||
{
|
||||
return isList;
|
||||
}
|
||||
|
||||
public boolean isList()
|
||||
{
|
||||
return isList(this.isList);
|
||||
@ -264,16 +178,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isList != null && StrUtil.equals("1", isList);
|
||||
}
|
||||
|
||||
public void setIsQuery(String isQuery)
|
||||
{
|
||||
this.isQuery = isQuery;
|
||||
}
|
||||
|
||||
public String getIsQuery()
|
||||
{
|
||||
return isQuery;
|
||||
}
|
||||
|
||||
public boolean isQuery()
|
||||
{
|
||||
return isQuery(this.isQuery);
|
||||
@ -284,46 +188,6 @@ public class GenTableColumn extends BaseEntity
|
||||
return isQuery != null && StrUtil.equals("1", isQuery);
|
||||
}
|
||||
|
||||
public void setQueryType(String queryType)
|
||||
{
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
public String getQueryType()
|
||||
{
|
||||
return queryType;
|
||||
}
|
||||
|
||||
public String getHtmlType()
|
||||
{
|
||||
return htmlType;
|
||||
}
|
||||
|
||||
public void setHtmlType(String htmlType)
|
||||
{
|
||||
this.htmlType = htmlType;
|
||||
}
|
||||
|
||||
public void setDictType(String dictType)
|
||||
{
|
||||
this.dictType = dictType;
|
||||
}
|
||||
|
||||
public String getDictType()
|
||||
{
|
||||
return dictType;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Integer getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
|
||||
public boolean isSuperColumn()
|
||||
{
|
||||
return isSuperColumn(this.javaField);
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.ruoyi.generator.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.generator.domain.GenTableColumn;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务字段 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface GenTableColumnMapper
|
||||
public interface GenTableColumnMapper extends BaseMapper<GenTableColumn>
|
||||
{
|
||||
/**
|
||||
* 根据表名称查询列信息
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.ruoyi.generator.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.generator.domain.GenTable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface GenTableMapper
|
||||
public interface GenTableMapper extends BaseMapper<GenTable>
|
||||
{
|
||||
/**
|
||||
* 查询业务列表
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.ruoyi.generator.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
@ -13,7 +15,7 @@ import com.ruoyi.generator.mapper.GenTableColumnMapper;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class GenTableColumnServiceImpl implements IGenTableColumnService
|
||||
public class GenTableColumnServiceImpl extends ServiceImpl<GenTableColumnMapper, GenTableColumn> implements IGenTableColumnService
|
||||
{
|
||||
@Autowired
|
||||
private GenTableColumnMapper genTableColumnMapper;
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.lang.Validator;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.GenConstants;
|
||||
import com.ruoyi.common.exception.CustomException;
|
||||
@ -44,7 +45,7 @@ import java.util.zip.ZipOutputStream;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class GenTableServiceImpl implements IGenTableService
|
||||
public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> implements IGenTableService
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(GenTableServiceImpl.class);
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.ruoyi.generator.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.generator.domain.GenTableColumn;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务字段 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IGenTableColumnService
|
||||
public interface IGenTableColumnService extends IService<GenTableColumn>
|
||||
{
|
||||
/**
|
||||
* 查询业务字段列表
|
||||
|
@ -1,15 +1,17 @@
|
||||
package com.ruoyi.generator.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.generator.domain.GenTable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.generator.domain.GenTable;
|
||||
|
||||
/**
|
||||
* 业务 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IGenTableService
|
||||
public interface IGenTableService extends IService<GenTable>
|
||||
{
|
||||
/**
|
||||
* 查询业务列表
|
||||
|
Reference in New Issue
Block a user