只能生成
This commit is contained in:
parent
de6d66aaf9
commit
8b07c5ca5f
|
|
@ -0,0 +1,127 @@
|
|||
package com.ruoyi.agile.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.agile.domain.GenTableColumn;
|
||||
import com.ruoyi.agile.service.IGenTableColumnService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 代码生成列 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/agile/genTableColumn")
|
||||
public class GenTableColumnController extends BaseController
|
||||
{
|
||||
private String prefix = "agile/genTableColumn";
|
||||
|
||||
@Autowired
|
||||
private IGenTableColumnService genTableColumnService;
|
||||
|
||||
@RequiresPermissions("agile:genTableColumn:view")
|
||||
@GetMapping()
|
||||
public String genTableColumn()
|
||||
{
|
||||
return prefix + "/genTableColumn";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代码生成列列表
|
||||
*/
|
||||
@RequiresPermissions("agile:genTableColumn:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(GenTableColumn genTableColumn)
|
||||
{
|
||||
startPage();
|
||||
List<GenTableColumn> list = genTableColumnService.selectGenTableColumnList(genTableColumn);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出代码生成列列表
|
||||
*/
|
||||
@RequiresPermissions("agile:genTableColumn:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(GenTableColumn genTableColumn)
|
||||
{
|
||||
List<GenTableColumn> list = genTableColumnService.selectGenTableColumnList(genTableColumn);
|
||||
ExcelUtil<GenTableColumn> util = new ExcelUtil<GenTableColumn>(GenTableColumn.class);
|
||||
return util.exportExcel(list, "genTableColumn");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代码生成列
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存代码生成列
|
||||
*/
|
||||
@RequiresPermissions("agile:genTableColumn:add")
|
||||
@Log(title = "代码生成列", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(GenTableColumn genTableColumn)
|
||||
{
|
||||
return toAjax(genTableColumnService.insertGenTableColumn(genTableColumn));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码生成列
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") String id, ModelMap mmap)
|
||||
{
|
||||
GenTableColumn genTableColumn = genTableColumnService.selectGenTableColumnById(id);
|
||||
mmap.put("genTableColumn", genTableColumn);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存代码生成列
|
||||
*/
|
||||
@RequiresPermissions("agile:genTableColumn:edit")
|
||||
@Log(title = "代码生成列", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(GenTableColumn genTableColumn)
|
||||
{
|
||||
return toAjax(genTableColumnService.updateGenTableColumn(genTableColumn));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代码生成列
|
||||
*/
|
||||
@RequiresPermissions("agile:genTableColumn:remove")
|
||||
@Log(title = "代码生成列", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(genTableColumnService.deleteGenTableColumnByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
package com.ruoyi.agile.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.agile.domain.GenTable;
|
||||
import com.ruoyi.agile.service.IGenTableService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 代码生成 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/agile/genTable")
|
||||
public class GenTableController extends BaseController
|
||||
{
|
||||
private String prefix = "agile/genTable";
|
||||
|
||||
@Autowired
|
||||
private IGenTableService genTableService;
|
||||
|
||||
@RequiresPermissions("agile:genTable:view")
|
||||
@GetMapping()
|
||||
public String genTable()
|
||||
{
|
||||
return prefix + "/genTable";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代码生成列表
|
||||
*/
|
||||
@RequiresPermissions("agile:genTable:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(GenTable genTable)
|
||||
{
|
||||
startPage();
|
||||
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出代码生成列表
|
||||
*/
|
||||
@RequiresPermissions("agile:genTable:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(GenTable genTable)
|
||||
{
|
||||
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
||||
ExcelUtil<GenTable> util = new ExcelUtil<GenTable>(GenTable.class);
|
||||
return util.exportExcel(list, "genTable");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代码生成
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存代码生成
|
||||
*/
|
||||
@RequiresPermissions("agile:genTable:add")
|
||||
@Log(title = "代码生成", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(GenTable genTable)
|
||||
{
|
||||
return toAjax(genTableService.insertGenTable(genTable));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码生成
|
||||
*/
|
||||
@GetMapping("/edit/{tableName}")
|
||||
public String edit(@PathVariable("tableName") String tableName, ModelMap mmap)
|
||||
{
|
||||
GenTable genTable = genTableService.selectGenTableById(tableName);
|
||||
mmap.put("genTable", genTable);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存代码生成
|
||||
*/
|
||||
@RequiresPermissions("agile:genTable:edit")
|
||||
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(GenTable genTable)
|
||||
{
|
||||
return toAjax(genTableService.updateGenTable(genTable));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代码生成
|
||||
*/
|
||||
@RequiresPermissions("agile:genTable:remove")
|
||||
@Log(title = "代码生成", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(genTableService.deleteGenTableByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
package com.ruoyi.agile.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 代码生成表 gen_table
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public class GenTable extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 表名 */
|
||||
private String tableName;
|
||||
/** 实体类名称 */
|
||||
private String className;
|
||||
/** 表说明 */
|
||||
private String comments;
|
||||
/** 关联父表的表名 */
|
||||
private String parentTableName;
|
||||
/** 本表关联父表的外键名 */
|
||||
private String parentTableFkName;
|
||||
/** 数据源名称 */
|
||||
private String dataSourceName;
|
||||
/** 使用的模板 */
|
||||
private String tplCategory;
|
||||
/** 生成包路径 */
|
||||
private String packageName;
|
||||
/** 生成模块名 */
|
||||
private String moduleName;
|
||||
/** 生成子模块名 */
|
||||
private String subModuleName;
|
||||
/** 生成功能名 */
|
||||
private String functionName;
|
||||
/** 生成功能名(简写) */
|
||||
private String functionNameSimple;
|
||||
/** 生成功能作者 */
|
||||
private String functionAuthor;
|
||||
/** 生成基础路径 */
|
||||
private String genBaseDir;
|
||||
/** 其它生成选项 */
|
||||
private String options;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createDate;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateDate;
|
||||
/** 备注信息 */
|
||||
private String remarks;
|
||||
|
||||
public void setTableName(String tableName)
|
||||
{
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getTableName()
|
||||
{
|
||||
return tableName;
|
||||
}
|
||||
public void setClassName(String className)
|
||||
{
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getClassName()
|
||||
{
|
||||
return className;
|
||||
}
|
||||
public void setComments(String comments)
|
||||
{
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getComments()
|
||||
{
|
||||
return comments;
|
||||
}
|
||||
public void setParentTableName(String parentTableName)
|
||||
{
|
||||
this.parentTableName = parentTableName;
|
||||
}
|
||||
|
||||
public String getParentTableName()
|
||||
{
|
||||
return parentTableName;
|
||||
}
|
||||
public void setParentTableFkName(String parentTableFkName)
|
||||
{
|
||||
this.parentTableFkName = parentTableFkName;
|
||||
}
|
||||
|
||||
public String getParentTableFkName()
|
||||
{
|
||||
return parentTableFkName;
|
||||
}
|
||||
public void setDataSourceName(String dataSourceName)
|
||||
{
|
||||
this.dataSourceName = dataSourceName;
|
||||
}
|
||||
|
||||
public String getDataSourceName()
|
||||
{
|
||||
return dataSourceName;
|
||||
}
|
||||
public void setTplCategory(String tplCategory)
|
||||
{
|
||||
this.tplCategory = tplCategory;
|
||||
}
|
||||
|
||||
public String getTplCategory()
|
||||
{
|
||||
return tplCategory;
|
||||
}
|
||||
public void setPackageName(String packageName)
|
||||
{
|
||||
this.packageName = packageName;
|
||||
}
|
||||
|
||||
public String getPackageName()
|
||||
{
|
||||
return packageName;
|
||||
}
|
||||
public void setModuleName(String moduleName)
|
||||
{
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
public String getModuleName()
|
||||
{
|
||||
return moduleName;
|
||||
}
|
||||
public void setSubModuleName(String subModuleName)
|
||||
{
|
||||
this.subModuleName = subModuleName;
|
||||
}
|
||||
|
||||
public String getSubModuleName()
|
||||
{
|
||||
return subModuleName;
|
||||
}
|
||||
public void setFunctionName(String functionName)
|
||||
{
|
||||
this.functionName = functionName;
|
||||
}
|
||||
|
||||
public String getFunctionName()
|
||||
{
|
||||
return functionName;
|
||||
}
|
||||
public void setFunctionNameSimple(String functionNameSimple)
|
||||
{
|
||||
this.functionNameSimple = functionNameSimple;
|
||||
}
|
||||
|
||||
public String getFunctionNameSimple()
|
||||
{
|
||||
return functionNameSimple;
|
||||
}
|
||||
public void setFunctionAuthor(String functionAuthor)
|
||||
{
|
||||
this.functionAuthor = functionAuthor;
|
||||
}
|
||||
|
||||
public String getFunctionAuthor()
|
||||
{
|
||||
return functionAuthor;
|
||||
}
|
||||
public void setGenBaseDir(String genBaseDir)
|
||||
{
|
||||
this.genBaseDir = genBaseDir;
|
||||
}
|
||||
|
||||
public String getGenBaseDir()
|
||||
{
|
||||
return genBaseDir;
|
||||
}
|
||||
public void setOptions(String options)
|
||||
{
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public String getOptions()
|
||||
{
|
||||
return options;
|
||||
}
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
public void setCreateDate(Date createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public Date getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
public void setUpdateDate(Date updateDate)
|
||||
{
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public Date getUpdateDate()
|
||||
{
|
||||
return updateDate;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("tableName", getTableName())
|
||||
.append("className", getClassName())
|
||||
.append("comments", getComments())
|
||||
.append("parentTableName", getParentTableName())
|
||||
.append("parentTableFkName", getParentTableFkName())
|
||||
.append("dataSourceName", getDataSourceName())
|
||||
.append("tplCategory", getTplCategory())
|
||||
.append("packageName", getPackageName())
|
||||
.append("moduleName", getModuleName())
|
||||
.append("subModuleName", getSubModuleName())
|
||||
.append("functionName", getFunctionName())
|
||||
.append("functionNameSimple", getFunctionNameSimple())
|
||||
.append("functionAuthor", getFunctionAuthor())
|
||||
.append("genBaseDir", getGenBaseDir())
|
||||
.append("options", getOptions())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateDate", getUpdateDate())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
package com.ruoyi.agile.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 代码生成列表 gen_table_column
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public class GenTableColumn extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private String id;
|
||||
/** 表名 */
|
||||
private String tableName;
|
||||
/** 列名 */
|
||||
private String columnName;
|
||||
/** 列排序(升序) */
|
||||
private BigDecimal columnSort;
|
||||
/** 类型 */
|
||||
private String columnType;
|
||||
/** 列标签名 */
|
||||
private String columnLabel;
|
||||
/** 列备注说明 */
|
||||
private String comments;
|
||||
/** 类的属性名 */
|
||||
private String attrName;
|
||||
/** 类的属性类型 */
|
||||
private String attrType;
|
||||
/** 是否主键 */
|
||||
private String isPk;
|
||||
/** 是否可为空 */
|
||||
private String isNull;
|
||||
/** 是否插入字段 */
|
||||
private String isInsert;
|
||||
/** 是否更新字段 */
|
||||
private String isUpdate;
|
||||
/** 是否列表字段 */
|
||||
private String isList;
|
||||
/** 是否查询字段 */
|
||||
private String isQuery;
|
||||
/** 查询方式 */
|
||||
private String queryType;
|
||||
/** 是否编辑字段 */
|
||||
private String isEdit;
|
||||
/** 表单类型 */
|
||||
private String showType;
|
||||
/** 其它生成选项 */
|
||||
private String options;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTableName(String tableName)
|
||||
{
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getTableName()
|
||||
{
|
||||
return tableName;
|
||||
}
|
||||
public void setColumnName(String columnName)
|
||||
{
|
||||
this.columnName = columnName;
|
||||
}
|
||||
|
||||
public String getColumnName()
|
||||
{
|
||||
return columnName;
|
||||
}
|
||||
public void setColumnSort(BigDecimal columnSort)
|
||||
{
|
||||
this.columnSort = columnSort;
|
||||
}
|
||||
|
||||
public BigDecimal getColumnSort()
|
||||
{
|
||||
return columnSort;
|
||||
}
|
||||
public void setColumnType(String columnType)
|
||||
{
|
||||
this.columnType = columnType;
|
||||
}
|
||||
|
||||
public String getColumnType()
|
||||
{
|
||||
return columnType;
|
||||
}
|
||||
public void setColumnLabel(String columnLabel)
|
||||
{
|
||||
this.columnLabel = columnLabel;
|
||||
}
|
||||
|
||||
public String getColumnLabel()
|
||||
{
|
||||
return columnLabel;
|
||||
}
|
||||
public void setComments(String comments)
|
||||
{
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getComments()
|
||||
{
|
||||
return comments;
|
||||
}
|
||||
public void setAttrName(String attrName)
|
||||
{
|
||||
this.attrName = attrName;
|
||||
}
|
||||
|
||||
public String getAttrName()
|
||||
{
|
||||
return attrName;
|
||||
}
|
||||
public void setAttrType(String attrType)
|
||||
{
|
||||
this.attrType = attrType;
|
||||
}
|
||||
|
||||
public String getAttrType()
|
||||
{
|
||||
return attrType;
|
||||
}
|
||||
public void setIsPk(String isPk)
|
||||
{
|
||||
this.isPk = isPk;
|
||||
}
|
||||
|
||||
public String getIsPk()
|
||||
{
|
||||
return isPk;
|
||||
}
|
||||
public void setIsNull(String isNull)
|
||||
{
|
||||
this.isNull = isNull;
|
||||
}
|
||||
|
||||
public String getIsNull()
|
||||
{
|
||||
return isNull;
|
||||
}
|
||||
public void setIsInsert(String isInsert)
|
||||
{
|
||||
this.isInsert = isInsert;
|
||||
}
|
||||
|
||||
public String getIsInsert()
|
||||
{
|
||||
return isInsert;
|
||||
}
|
||||
public void setIsUpdate(String isUpdate)
|
||||
{
|
||||
this.isUpdate = isUpdate;
|
||||
}
|
||||
|
||||
public String getIsUpdate()
|
||||
{
|
||||
return isUpdate;
|
||||
}
|
||||
public void setIsList(String isList)
|
||||
{
|
||||
this.isList = isList;
|
||||
}
|
||||
|
||||
public String getIsList()
|
||||
{
|
||||
return isList;
|
||||
}
|
||||
public void setIsQuery(String isQuery)
|
||||
{
|
||||
this.isQuery = isQuery;
|
||||
}
|
||||
|
||||
public String getIsQuery()
|
||||
{
|
||||
return isQuery;
|
||||
}
|
||||
public void setQueryType(String queryType)
|
||||
{
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
public String getQueryType()
|
||||
{
|
||||
return queryType;
|
||||
}
|
||||
public void setIsEdit(String isEdit)
|
||||
{
|
||||
this.isEdit = isEdit;
|
||||
}
|
||||
|
||||
public String getIsEdit()
|
||||
{
|
||||
return isEdit;
|
||||
}
|
||||
public void setShowType(String showType)
|
||||
{
|
||||
this.showType = showType;
|
||||
}
|
||||
|
||||
public String getShowType()
|
||||
{
|
||||
return showType;
|
||||
}
|
||||
public void setOptions(String options)
|
||||
{
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public String getOptions()
|
||||
{
|
||||
return options;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tableName", getTableName())
|
||||
.append("columnName", getColumnName())
|
||||
.append("columnSort", getColumnSort())
|
||||
.append("columnType", getColumnType())
|
||||
.append("columnLabel", getColumnLabel())
|
||||
.append("comments", getComments())
|
||||
.append("attrName", getAttrName())
|
||||
.append("attrType", getAttrType())
|
||||
.append("isPk", getIsPk())
|
||||
.append("isNull", getIsNull())
|
||||
.append("isInsert", getIsInsert())
|
||||
.append("isUpdate", getIsUpdate())
|
||||
.append("isList", getIsList())
|
||||
.append("isQuery", getIsQuery())
|
||||
.append("queryType", getQueryType())
|
||||
.append("isEdit", getIsEdit())
|
||||
.append("showType", getShowType())
|
||||
.append("options", getOptions())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.agile.mapper;
|
||||
|
||||
import com.ruoyi.agile.domain.GenTableColumn;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成列 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public interface GenTableColumnMapper
|
||||
{
|
||||
/**
|
||||
* 查询代码生成列信息
|
||||
*
|
||||
* @param id 代码生成列ID
|
||||
* @return 代码生成列信息
|
||||
*/
|
||||
public GenTableColumn selectGenTableColumnById(String id);
|
||||
|
||||
/**
|
||||
* 查询代码生成列列表
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 代码生成列集合
|
||||
*/
|
||||
public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 新增代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 修改代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 删除代码生成列
|
||||
*
|
||||
* @param id 代码生成列ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumnById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除代码生成列
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumnByIds(String[] ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.agile.mapper;
|
||||
|
||||
import com.ruoyi.agile.domain.GenTable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public interface GenTableMapper
|
||||
{
|
||||
/**
|
||||
* 查询代码生成信息
|
||||
*
|
||||
* @param tableName 代码生成ID
|
||||
* @return 代码生成信息
|
||||
*/
|
||||
public GenTable selectGenTableById(String tableName);
|
||||
|
||||
/**
|
||||
* 查询代码生成列表
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 代码生成集合
|
||||
*/
|
||||
public List<GenTable> selectGenTableList(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 新增代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTable(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 修改代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTable(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 删除代码生成
|
||||
*
|
||||
* @param tableName 代码生成ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableById(String tableName);
|
||||
|
||||
/**
|
||||
* 批量删除代码生成
|
||||
*
|
||||
* @param tableNames 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableByIds(String[] tableNames);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.ruoyi.agile.service;
|
||||
|
||||
import com.ruoyi.agile.domain.GenTableColumn;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成列 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public interface IGenTableColumnService
|
||||
{
|
||||
/**
|
||||
* 查询代码生成列信息
|
||||
*
|
||||
* @param id 代码生成列ID
|
||||
* @return 代码生成列信息
|
||||
*/
|
||||
public GenTableColumn selectGenTableColumnById(String id);
|
||||
|
||||
/**
|
||||
* 查询代码生成列列表
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 代码生成列集合
|
||||
*/
|
||||
public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 新增代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 修改代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTableColumn(GenTableColumn genTableColumn);
|
||||
|
||||
/**
|
||||
* 删除代码生成列信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableColumnByIds(String ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.ruoyi.agile.service;
|
||||
|
||||
import com.ruoyi.agile.domain.GenTable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
public interface IGenTableService
|
||||
{
|
||||
/**
|
||||
* 查询代码生成信息
|
||||
*
|
||||
* @param tableName 代码生成ID
|
||||
* @return 代码生成信息
|
||||
*/
|
||||
public GenTable selectGenTableById(String tableName);
|
||||
|
||||
/**
|
||||
* 查询代码生成列表
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 代码生成集合
|
||||
*/
|
||||
public List<GenTable> selectGenTableList(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 新增代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGenTable(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 修改代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGenTable(GenTable genTable);
|
||||
|
||||
/**
|
||||
* 删除代码生成信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGenTableByIds(String ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.ruoyi.agile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.agile.mapper.GenTableColumnMapper;
|
||||
import com.ruoyi.agile.domain.GenTableColumn;
|
||||
import com.ruoyi.agile.service.IGenTableColumnService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
|
||||
/**
|
||||
* 代码生成列 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
@Service
|
||||
public class GenTableColumnServiceImpl implements IGenTableColumnService
|
||||
{
|
||||
@Autowired
|
||||
private GenTableColumnMapper genTableColumnMapper;
|
||||
|
||||
/**
|
||||
* 查询代码生成列信息
|
||||
*
|
||||
* @param id 代码生成列ID
|
||||
* @return 代码生成列信息
|
||||
*/
|
||||
@Override
|
||||
public GenTableColumn selectGenTableColumnById(String id)
|
||||
{
|
||||
return genTableColumnMapper.selectGenTableColumnById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代码生成列列表
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 代码生成列集合
|
||||
*/
|
||||
@Override
|
||||
public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn)
|
||||
{
|
||||
return genTableColumnMapper.selectGenTableColumnList(genTableColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGenTableColumn(GenTableColumn genTableColumn)
|
||||
{
|
||||
return genTableColumnMapper.insertGenTableColumn(genTableColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码生成列
|
||||
*
|
||||
* @param genTableColumn 代码生成列信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGenTableColumn(GenTableColumn genTableColumn)
|
||||
{
|
||||
return genTableColumnMapper.updateGenTableColumn(genTableColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代码生成列对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGenTableColumnByIds(String ids)
|
||||
{
|
||||
return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.ruoyi.agile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.agile.mapper.GenTableMapper;
|
||||
import com.ruoyi.agile.domain.GenTable;
|
||||
import com.ruoyi.agile.service.IGenTableService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
|
||||
/**
|
||||
* 代码生成 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-11-29
|
||||
*/
|
||||
@Service
|
||||
public class GenTableServiceImpl implements IGenTableService
|
||||
{
|
||||
@Autowired
|
||||
private GenTableMapper genTableMapper;
|
||||
|
||||
/**
|
||||
* 查询代码生成信息
|
||||
*
|
||||
* @param tableName 代码生成ID
|
||||
* @return 代码生成信息
|
||||
*/
|
||||
@Override
|
||||
public GenTable selectGenTableById(String tableName)
|
||||
{
|
||||
return genTableMapper.selectGenTableById(tableName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代码生成列表
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 代码生成集合
|
||||
*/
|
||||
@Override
|
||||
public List<GenTable> selectGenTableList(GenTable genTable)
|
||||
{
|
||||
return genTableMapper.selectGenTableList(genTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGenTable(GenTable genTable)
|
||||
{
|
||||
return genTableMapper.insertGenTable(genTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码生成
|
||||
*
|
||||
* @param genTable 代码生成信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGenTable(GenTable genTable)
|
||||
{
|
||||
return genTableMapper.updateGenTable(genTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代码生成对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGenTableByIds(String ids)
|
||||
{
|
||||
return genTableMapper.deleteGenTableByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.agile.mapper.GenTableColumnMapper">
|
||||
|
||||
<resultMap type="GenTableColumn" id="GenTableColumnResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tableName" column="table_name" />
|
||||
<result property="columnName" column="column_name" />
|
||||
<result property="columnSort" column="column_sort" />
|
||||
<result property="columnType" column="column_type" />
|
||||
<result property="columnLabel" column="column_label" />
|
||||
<result property="comments" column="comments" />
|
||||
<result property="attrName" column="attr_name" />
|
||||
<result property="attrType" column="attr_type" />
|
||||
<result property="isPk" column="is_pk" />
|
||||
<result property="isNull" column="is_null" />
|
||||
<result property="isInsert" column="is_insert" />
|
||||
<result property="isUpdate" column="is_update" />
|
||||
<result property="isList" column="is_list" />
|
||||
<result property="isQuery" column="is_query" />
|
||||
<result property="queryType" column="query_type" />
|
||||
<result property="isEdit" column="is_edit" />
|
||||
<result property="showType" column="show_type" />
|
||||
<result property="options" column="options" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGenTableColumnVo">
|
||||
select id, table_name, column_name, column_sort, column_type, column_label, comments, attr_name, attr_type, is_pk, is_null, is_insert, is_update, is_list, is_query, query_type, is_edit, show_type, options from gen_table_column
|
||||
</sql>
|
||||
|
||||
<select id="selectGenTableColumnList" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
|
||||
<include refid="selectGenTableColumnVo"/>
|
||||
<where>
|
||||
<if test="id != null and id != '' "> and id = #{id}</if>
|
||||
<if test="tableName != null and tableName != '' "> and table_name = #{tableName}</if>
|
||||
<if test="columnName != null and columnName != '' "> and column_name = #{columnName}</if>
|
||||
<if test="columnSort != null "> and column_sort = #{columnSort}</if>
|
||||
<if test="columnType != null and columnType != '' "> and column_type = #{columnType}</if>
|
||||
<if test="columnLabel != null and columnLabel != '' "> and column_label = #{columnLabel}</if>
|
||||
<if test="comments != null and comments != '' "> and comments = #{comments}</if>
|
||||
<if test="attrName != null and attrName != '' "> and attr_name = #{attrName}</if>
|
||||
<if test="attrType != null and attrType != '' "> and attr_type = #{attrType}</if>
|
||||
<if test="isPk != null and isPk != '' "> and is_pk = #{isPk}</if>
|
||||
<if test="isNull != null and isNull != '' "> and is_null = #{isNull}</if>
|
||||
<if test="isInsert != null and isInsert != '' "> and is_insert = #{isInsert}</if>
|
||||
<if test="isUpdate != null and isUpdate != '' "> and is_update = #{isUpdate}</if>
|
||||
<if test="isList != null and isList != '' "> and is_list = #{isList}</if>
|
||||
<if test="isQuery != null and isQuery != '' "> and is_query = #{isQuery}</if>
|
||||
<if test="queryType != null and queryType != '' "> and query_type = #{queryType}</if>
|
||||
<if test="isEdit != null and isEdit != '' "> and is_edit = #{isEdit}</if>
|
||||
<if test="showType != null and showType != '' "> and show_type = #{showType}</if>
|
||||
<if test="options != null and options != '' "> and options = #{options}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGenTableColumnById" parameterType="String" resultMap="GenTableColumnResult">
|
||||
<include refid="selectGenTableColumnVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTableColumn" parameterType="GenTableColumn">
|
||||
insert into gen_table_column
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">id,</if>
|
||||
<if test="tableName != null and tableName != '' ">table_name,</if>
|
||||
<if test="columnName != null and columnName != '' ">column_name,</if>
|
||||
<if test="columnSort != null ">column_sort,</if>
|
||||
<if test="columnType != null and columnType != '' ">column_type,</if>
|
||||
<if test="columnLabel != null and columnLabel != '' ">column_label,</if>
|
||||
<if test="comments != null and comments != '' ">comments,</if>
|
||||
<if test="attrName != null and attrName != '' ">attr_name,</if>
|
||||
<if test="attrType != null and attrType != '' ">attr_type,</if>
|
||||
<if test="isPk != null and isPk != '' ">is_pk,</if>
|
||||
<if test="isNull != null and isNull != '' ">is_null,</if>
|
||||
<if test="isInsert != null and isInsert != '' ">is_insert,</if>
|
||||
<if test="isUpdate != null and isUpdate != '' ">is_update,</if>
|
||||
<if test="isList != null and isList != '' ">is_list,</if>
|
||||
<if test="isQuery != null and isQuery != '' ">is_query,</if>
|
||||
<if test="queryType != null and queryType != '' ">query_type,</if>
|
||||
<if test="isEdit != null and isEdit != '' ">is_edit,</if>
|
||||
<if test="showType != null and showType != '' ">show_type,</if>
|
||||
<if test="options != null and options != '' ">options,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">#{id},</if>
|
||||
<if test="tableName != null and tableName != '' ">#{tableName},</if>
|
||||
<if test="columnName != null and columnName != '' ">#{columnName},</if>
|
||||
<if test="columnSort != null ">#{columnSort},</if>
|
||||
<if test="columnType != null and columnType != '' ">#{columnType},</if>
|
||||
<if test="columnLabel != null and columnLabel != '' ">#{columnLabel},</if>
|
||||
<if test="comments != null and comments != '' ">#{comments},</if>
|
||||
<if test="attrName != null and attrName != '' ">#{attrName},</if>
|
||||
<if test="attrType != null and attrType != '' ">#{attrType},</if>
|
||||
<if test="isPk != null and isPk != '' ">#{isPk},</if>
|
||||
<if test="isNull != null and isNull != '' ">#{isNull},</if>
|
||||
<if test="isInsert != null and isInsert != '' ">#{isInsert},</if>
|
||||
<if test="isUpdate != null and isUpdate != '' ">#{isUpdate},</if>
|
||||
<if test="isList != null and isList != '' ">#{isList},</if>
|
||||
<if test="isQuery != null and isQuery != '' ">#{isQuery},</if>
|
||||
<if test="queryType != null and queryType != '' ">#{queryType},</if>
|
||||
<if test="isEdit != null and isEdit != '' ">#{isEdit},</if>
|
||||
<if test="showType != null and showType != '' ">#{showType},</if>
|
||||
<if test="options != null and options != '' ">#{options},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGenTableColumn" parameterType="GenTableColumn">
|
||||
update gen_table_column
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tableName != null and tableName != '' ">table_name = #{tableName},</if>
|
||||
<if test="columnName != null and columnName != '' ">column_name = #{columnName},</if>
|
||||
<if test="columnSort != null ">column_sort = #{columnSort},</if>
|
||||
<if test="columnType != null and columnType != '' ">column_type = #{columnType},</if>
|
||||
<if test="columnLabel != null and columnLabel != '' ">column_label = #{columnLabel},</if>
|
||||
<if test="comments != null and comments != '' ">comments = #{comments},</if>
|
||||
<if test="attrName != null and attrName != '' ">attr_name = #{attrName},</if>
|
||||
<if test="attrType != null and attrType != '' ">attr_type = #{attrType},</if>
|
||||
<if test="isPk != null and isPk != '' ">is_pk = #{isPk},</if>
|
||||
<if test="isNull != null and isNull != '' ">is_null = #{isNull},</if>
|
||||
<if test="isInsert != null and isInsert != '' ">is_insert = #{isInsert},</if>
|
||||
<if test="isUpdate != null and isUpdate != '' ">is_update = #{isUpdate},</if>
|
||||
<if test="isList != null and isList != '' ">is_list = #{isList},</if>
|
||||
<if test="isQuery != null and isQuery != '' ">is_query = #{isQuery},</if>
|
||||
<if test="queryType != null and queryType != '' ">query_type = #{queryType},</if>
|
||||
<if test="isEdit != null and isEdit != '' ">is_edit = #{isEdit},</if>
|
||||
<if test="showType != null and showType != '' ">show_type = #{showType},</if>
|
||||
<if test="options != null and options != '' ">options = #{options},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGenTableColumnById" parameterType="String">
|
||||
delete from gen_table_column where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGenTableColumnByIds" parameterType="String">
|
||||
delete from gen_table_column where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.agile.mapper.GenTableMapper">
|
||||
|
||||
<resultMap type="GenTable" id="GenTableResult">
|
||||
<result property="tableName" column="table_name" />
|
||||
<result property="className" column="class_name" />
|
||||
<result property="comments" column="comments" />
|
||||
<result property="parentTableName" column="parent_table_name" />
|
||||
<result property="parentTableFkName" column="parent_table_fk_name" />
|
||||
<result property="dataSourceName" column="data_source_name" />
|
||||
<result property="tplCategory" column="tpl_category" />
|
||||
<result property="packageName" column="package_name" />
|
||||
<result property="moduleName" column="module_name" />
|
||||
<result property="subModuleName" column="sub_module_name" />
|
||||
<result property="functionName" column="function_name" />
|
||||
<result property="functionNameSimple" column="function_name_simple" />
|
||||
<result property="functionAuthor" column="function_author" />
|
||||
<result property="genBaseDir" column="gen_base_dir" />
|
||||
<result property="options" column="options" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGenTableVo">
|
||||
select table_name, class_name, comments, parent_table_name, parent_table_fk_name, data_source_name, tpl_category, package_name, module_name, sub_module_name, function_name, function_name_simple, function_author, gen_base_dir, options, create_by, create_date, update_by, update_date, remarks from gen_table
|
||||
</sql>
|
||||
|
||||
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
<include refid="selectGenTableVo"/>
|
||||
<where>
|
||||
<if test="tableName != null and tableName != '' "> and table_name = #{tableName}</if>
|
||||
<if test="className != null and className != '' "> and class_name = #{className}</if>
|
||||
<if test="comments != null and comments != '' "> and comments = #{comments}</if>
|
||||
<if test="parentTableName != null and parentTableName != '' "> and parent_table_name = #{parentTableName}</if>
|
||||
<if test="parentTableFkName != null and parentTableFkName != '' "> and parent_table_fk_name = #{parentTableFkName}</if>
|
||||
<if test="dataSourceName != null and dataSourceName != '' "> and data_source_name = #{dataSourceName}</if>
|
||||
<if test="tplCategory != null and tplCategory != '' "> and tpl_category = #{tplCategory}</if>
|
||||
<if test="packageName != null and packageName != '' "> and package_name = #{packageName}</if>
|
||||
<if test="moduleName != null and moduleName != '' "> and module_name = #{moduleName}</if>
|
||||
<if test="subModuleName != null and subModuleName != '' "> and sub_module_name = #{subModuleName}</if>
|
||||
<if test="functionName != null and functionName != '' "> and function_name = #{functionName}</if>
|
||||
<if test="functionNameSimple != null and functionNameSimple != '' "> and function_name_simple = #{functionNameSimple}</if>
|
||||
<if test="functionAuthor != null and functionAuthor != '' "> and function_author = #{functionAuthor}</if>
|
||||
<if test="genBaseDir != null and genBaseDir != '' "> and gen_base_dir = #{genBaseDir}</if>
|
||||
<if test="options != null and options != '' "> and options = #{options}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGenTableById" parameterType="String" resultMap="GenTableResult">
|
||||
<include refid="selectGenTableVo"/>
|
||||
where table_name = #{tableName}
|
||||
</select>
|
||||
|
||||
<insert id="insertGenTable" parameterType="GenTable">
|
||||
insert into gen_table
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tableName != null and tableName != '' ">table_name,</if>
|
||||
<if test="className != null and className != '' ">class_name,</if>
|
||||
<if test="comments != null and comments != '' ">comments,</if>
|
||||
<if test="parentTableName != null and parentTableName != '' ">parent_table_name,</if>
|
||||
<if test="parentTableFkName != null and parentTableFkName != '' ">parent_table_fk_name,</if>
|
||||
<if test="dataSourceName != null and dataSourceName != '' ">data_source_name,</if>
|
||||
<if test="tplCategory != null and tplCategory != '' ">tpl_category,</if>
|
||||
<if test="packageName != null and packageName != '' ">package_name,</if>
|
||||
<if test="moduleName != null and moduleName != '' ">module_name,</if>
|
||||
<if test="subModuleName != null and subModuleName != '' ">sub_module_name,</if>
|
||||
<if test="functionName != null and functionName != '' ">function_name,</if>
|
||||
<if test="functionNameSimple != null and functionNameSimple != '' ">function_name_simple,</if>
|
||||
<if test="functionAuthor != null and functionAuthor != '' ">function_author,</if>
|
||||
<if test="genBaseDir != null and genBaseDir != '' ">gen_base_dir,</if>
|
||||
<if test="options != null and options != '' ">options,</if>
|
||||
<if test="createBy != null and createBy != '' ">create_by,</if>
|
||||
<if test="createDate != null ">create_date,</if>
|
||||
<if test="updateBy != null and updateBy != '' ">update_by,</if>
|
||||
<if test="updateDate != null ">update_date,</if>
|
||||
<if test="remarks != null and remarks != '' ">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tableName != null and tableName != '' ">#{tableName},</if>
|
||||
<if test="className != null and className != '' ">#{className},</if>
|
||||
<if test="comments != null and comments != '' ">#{comments},</if>
|
||||
<if test="parentTableName != null and parentTableName != '' ">#{parentTableName},</if>
|
||||
<if test="parentTableFkName != null and parentTableFkName != '' ">#{parentTableFkName},</if>
|
||||
<if test="dataSourceName != null and dataSourceName != '' ">#{dataSourceName},</if>
|
||||
<if test="tplCategory != null and tplCategory != '' ">#{tplCategory},</if>
|
||||
<if test="packageName != null and packageName != '' ">#{packageName},</if>
|
||||
<if test="moduleName != null and moduleName != '' ">#{moduleName},</if>
|
||||
<if test="subModuleName != null and subModuleName != '' ">#{subModuleName},</if>
|
||||
<if test="functionName != null and functionName != '' ">#{functionName},</if>
|
||||
<if test="functionNameSimple != null and functionNameSimple != '' ">#{functionNameSimple},</if>
|
||||
<if test="functionAuthor != null and functionAuthor != '' ">#{functionAuthor},</if>
|
||||
<if test="genBaseDir != null and genBaseDir != '' ">#{genBaseDir},</if>
|
||||
<if test="options != null and options != '' ">#{options},</if>
|
||||
<if test="createBy != null and createBy != '' ">#{createBy},</if>
|
||||
<if test="createDate != null ">#{createDate},</if>
|
||||
<if test="updateBy != null and updateBy != '' ">#{updateBy},</if>
|
||||
<if test="updateDate != null ">#{updateDate},</if>
|
||||
<if test="remarks != null and remarks != '' ">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGenTable" parameterType="GenTable">
|
||||
update gen_table
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="className != null and className != '' ">class_name = #{className},</if>
|
||||
<if test="comments != null and comments != '' ">comments = #{comments},</if>
|
||||
<if test="parentTableName != null and parentTableName != '' ">parent_table_name = #{parentTableName},</if>
|
||||
<if test="parentTableFkName != null and parentTableFkName != '' ">parent_table_fk_name = #{parentTableFkName},</if>
|
||||
<if test="dataSourceName != null and dataSourceName != '' ">data_source_name = #{dataSourceName},</if>
|
||||
<if test="tplCategory != null and tplCategory != '' ">tpl_category = #{tplCategory},</if>
|
||||
<if test="packageName != null and packageName != '' ">package_name = #{packageName},</if>
|
||||
<if test="moduleName != null and moduleName != '' ">module_name = #{moduleName},</if>
|
||||
<if test="subModuleName != null and subModuleName != '' ">sub_module_name = #{subModuleName},</if>
|
||||
<if test="functionName != null and functionName != '' ">function_name = #{functionName},</if>
|
||||
<if test="functionNameSimple != null and functionNameSimple != '' ">function_name_simple = #{functionNameSimple},</if>
|
||||
<if test="functionAuthor != null and functionAuthor != '' ">function_author = #{functionAuthor},</if>
|
||||
<if test="genBaseDir != null and genBaseDir != '' ">gen_base_dir = #{genBaseDir},</if>
|
||||
<if test="options != null and options != '' ">options = #{options},</if>
|
||||
<if test="createBy != null and createBy != '' ">create_by = #{createBy},</if>
|
||||
<if test="createDate != null ">create_date = #{createDate},</if>
|
||||
<if test="updateBy != null and updateBy != '' ">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null ">update_date = #{updateDate},</if>
|
||||
<if test="remarks != null and remarks != '' ">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
where table_name = #{tableName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGenTableById" parameterType="String">
|
||||
delete from gen_table where table_name = #{tableName}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGenTableByIds" parameterType="String">
|
||||
delete from gen_table where table_name in
|
||||
<foreach item="tableName" collection="array" open="(" separator="," close=")">
|
||||
#{tableName}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-genTable-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">实体类名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="className" name="className" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="comments" name="comments" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联父表的表名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="parentTableName" name="parentTableName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">本表关联父表的外键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="parentTableFkName" name="parentTableFkName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">数据源名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="dataSourceName" name="dataSourceName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">使用的模板:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="tplCategory" name="tplCategory" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成包路径:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="packageName" name="packageName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成模块名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="moduleName" name="moduleName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成子模块名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="subModuleName" name="subModuleName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionName" name="functionName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能名(简写):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionNameSimple" name="functionNameSimple" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能作者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionAuthor" name="functionAuthor" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成基础路径:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="genBaseDir" name="genBaseDir" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">其它生成选项:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="options" name="options" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createDate" name="createDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateDate" name="updateDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "agile/genTable"
|
||||
$("#form-genTable-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-genTable-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-genTable-edit" th:object="${genTable}">
|
||||
<input id="tableName" name="tableName" th:field="*{tableName}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">实体类名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="className" name="className" th:field="*{className}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="comments" name="comments" th:field="*{comments}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联父表的表名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="parentTableName" name="parentTableName" th:field="*{parentTableName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">本表关联父表的外键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="parentTableFkName" name="parentTableFkName" th:field="*{parentTableFkName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">数据源名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="dataSourceName" name="dataSourceName" th:field="*{dataSourceName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">使用的模板:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="tplCategory" name="tplCategory" th:field="*{tplCategory}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成包路径:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="packageName" name="packageName" th:field="*{packageName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成模块名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="moduleName" name="moduleName" th:field="*{moduleName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成子模块名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="subModuleName" name="subModuleName" th:field="*{subModuleName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionName" name="functionName" th:field="*{functionName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能名(简写):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionNameSimple" name="functionNameSimple" th:field="*{functionNameSimple}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成功能作者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="functionAuthor" name="functionAuthor" th:field="*{functionAuthor}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">生成基础路径:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="genBaseDir" name="genBaseDir" th:field="*{genBaseDir}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">其它生成选项:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="options" name="options" th:field="*{options}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createDate" name="createDate" th:field="*{createDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateDate" name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "agile/genTable"
|
||||
$("#form-genTable-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-genTable-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
实体类名称:<input type="text" name="className"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
表说明:<input type="text" name="comments"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
关联父表的表名:<input type="text" name="parentTableName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
本表关联父表的外键名:<input type="text" name="parentTableFkName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
数据源名称:<input type="text" name="dataSourceName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
使用的模板:<input type="text" name="tplCategory"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成包路径:<input type="text" name="packageName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成模块名:<input type="text" name="moduleName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成子模块名:<input type="text" name="subModuleName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成功能名:<input type="text" name="functionName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成功能名(简写):<input type="text" name="functionNameSimple"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成功能作者:<input type="text" name="functionAuthor"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
生成基础路径:<input type="text" name="genBaseDir"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
其它生成选项:<input type="text" name="options"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建者:<input type="text" name="createBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建时间:<input type="text" name="createDate"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新者:<input type="text" name="updateBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新时间:<input type="text" name="updateDate"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
备注信息:<input type="text" name="remarks"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="agile:genTable:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="agile:genTable:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="agile:genTable:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="agile:genTable:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('agile:genTable:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('agile:genTable:remove')}]];
|
||||
var prefix = ctx + "agile/genTable";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "代码生成",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'tableName',
|
||||
title : '表名',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field : 'className',
|
||||
title : '实体类名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'comments',
|
||||
title : '表说明',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'parentTableName',
|
||||
title : '关联父表的表名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'parentTableFkName',
|
||||
title : '本表关联父表的外键名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'dataSourceName',
|
||||
title : '数据源名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'tplCategory',
|
||||
title : '使用的模板',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'packageName',
|
||||
title : '生成包路径',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'moduleName',
|
||||
title : '生成模块名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'subModuleName',
|
||||
title : '生成子模块名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'functionName',
|
||||
title : '生成功能名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'functionNameSimple',
|
||||
title : '生成功能名(简写)',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'functionAuthor',
|
||||
title : '生成功能作者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'genBaseDir',
|
||||
title : '生成基础路径',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'options',
|
||||
title : '其它生成选项',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createDate',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateBy',
|
||||
title : '更新者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateDate',
|
||||
title : '更新时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'remarks',
|
||||
title : '备注信息',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.tableName + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.tableName + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-genTableColumn-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="tableName" name="tableName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnName" name="columnName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列排序(升序):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnSort" name="columnSort" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnType" name="columnType" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列标签名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnLabel" name="columnLabel" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列备注说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="comments" name="comments" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类的属性名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="attrName" name="attrName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类的属性类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="attrType" name="attrType" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否主键:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isPk" name="isPk" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否可为空:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isNull" name="isNull" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否插入字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isInsert" name="isInsert" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否更新字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isUpdate" name="isUpdate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否列表字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isList" name="isList" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否查询字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isQuery" name="isQuery" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="queryType" name="queryType" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否编辑字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isEdit" name="isEdit" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="showType" name="showType" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">其它生成选项:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="options" name="options" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "agile/genTableColumn"
|
||||
$("#form-genTableColumn-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-genTableColumn-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-genTableColumn-edit" th:object="${genTableColumn}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="tableName" name="tableName" th:field="*{tableName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnName" name="columnName" th:field="*{columnName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列排序(升序):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnSort" name="columnSort" th:field="*{columnSort}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnType" name="columnType" th:field="*{columnType}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列标签名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="columnLabel" name="columnLabel" th:field="*{columnLabel}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">列备注说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="comments" name="comments" th:field="*{comments}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类的属性名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="attrName" name="attrName" th:field="*{attrName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">类的属性类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="attrType" name="attrType" th:field="*{attrType}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否主键:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isPk" name="isPk" th:field="*{isPk}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否可为空:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isNull" name="isNull" th:field="*{isNull}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否插入字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isInsert" name="isInsert" th:field="*{isInsert}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否更新字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isUpdate" name="isUpdate" th:field="*{isUpdate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否列表字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isList" name="isList" th:field="*{isList}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否查询字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isQuery" name="isQuery" th:field="*{isQuery}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">查询方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="queryType" name="queryType" th:field="*{queryType}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否编辑字段:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="isEdit" name="isEdit" th:field="*{isEdit}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">表单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="showType" name="showType" th:field="*{showType}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">其它生成选项:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="options" name="options" th:field="*{options}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "agile/genTableColumn"
|
||||
$("#form-genTableColumn-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-genTableColumn-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
表名:<input type="text" name="tableName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
列名:<input type="text" name="columnName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
列排序(升序):<input type="text" name="columnSort"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
类型:<input type="text" name="columnType"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
列标签名:<input type="text" name="columnLabel"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
列备注说明:<input type="text" name="comments"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
类的属性名:<input type="text" name="attrName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
类的属性类型:<input type="text" name="attrType"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否主键:<input type="text" name="isPk"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否可为空:<input type="text" name="isNull"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否插入字段:<input type="text" name="isInsert"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否更新字段:<input type="text" name="isUpdate"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否列表字段:<input type="text" name="isList"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否查询字段:<input type="text" name="isQuery"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
查询方式:<input type="text" name="queryType"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
是否编辑字段:<input type="text" name="isEdit"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
表单类型:<input type="text" name="showType"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
其它生成选项:<input type="text" name="options"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="agile:genTableColumn:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="agile:genTableColumn:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="agile:genTableColumn:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="agile:genTableColumn:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('agile:genTableColumn:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('agile:genTableColumn:remove')}]];
|
||||
var prefix = ctx + "agile/genTableColumn";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "代码生成列",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'id',
|
||||
title : '编号',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field : 'tableName',
|
||||
title : '表名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'columnName',
|
||||
title : '列名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'columnSort',
|
||||
title : '列排序(升序)',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'columnType',
|
||||
title : '类型',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'columnLabel',
|
||||
title : '列标签名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'comments',
|
||||
title : '列备注说明',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'attrName',
|
||||
title : '类的属性名',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'attrType',
|
||||
title : '类的属性类型',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isPk',
|
||||
title : '是否主键',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isNull',
|
||||
title : '是否可为空',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isInsert',
|
||||
title : '是否插入字段',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isUpdate',
|
||||
title : '是否更新字段',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isList',
|
||||
title : '是否列表字段',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isQuery',
|
||||
title : '是否查询字段',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'queryType',
|
||||
title : '查询方式',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'isEdit',
|
||||
title : '是否编辑字段',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'showType',
|
||||
title : '表单类型',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'options',
|
||||
title : '其它生成选项',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue