This commit is contained in:
parent
ff0fcf36c0
commit
fea4dc4540
|
|
@ -3,8 +3,8 @@ ENV = 'development'
|
||||||
|
|
||||||
# 宏驰云管理系统/开发环境
|
# 宏驰云管理系统/开发环境
|
||||||
#VUE_APP_BASE_API = '/dev-api'
|
#VUE_APP_BASE_API = '/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://localhost:8085/dev-api'
|
VUE_APP_BASE_API = 'http://localhost:8085/dev-api'
|
||||||
VUE_APP_BASE_API = 'http://apibase.hchyun.com/dev-api'
|
#VUE_APP_BASE_API = 'http://apibase.hchyun.com/dev-api'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
|
||||||
|
|
@ -76,3 +76,19 @@ export function previewQueryData(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取查询基本信息
|
||||||
|
export function getRealInfo(id){
|
||||||
|
return request({
|
||||||
|
url: "/query/real/"+id,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询数据
|
||||||
|
export function getRealData(data){
|
||||||
|
return request({
|
||||||
|
url: "/query/real",
|
||||||
|
method: 'put',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,13 @@ export const constantRoutes = [
|
||||||
component: (resolve) => require(['@/views/tool/query/uniQuery'], resolve),
|
component: (resolve) => require(['@/views/tool/query/uniQuery'], resolve),
|
||||||
name: 'UniQuery',
|
name: 'UniQuery',
|
||||||
meta: { title: '万能查询配置' }
|
meta: { title: '万能查询配置' }
|
||||||
}
|
},
|
||||||
|
// {
|
||||||
|
// path: 'data/:dataId(\\d+)',
|
||||||
|
// component: (resolve) => require(['@/views/tool/query/queryDate'], resolve),
|
||||||
|
// name: 'QueryDate',
|
||||||
|
// meta: { title: '信息统计' }
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="ucon" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item v-for="item in uconList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.ucName">
|
||||||
|
<el-input v-model="item.ucReal"
|
||||||
|
clearable
|
||||||
|
:placeholder="outPlaceholder(item)"
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['tool:query:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="realDate.data">
|
||||||
|
<el-table-column v-for="item in realDate.header"
|
||||||
|
:label="item"
|
||||||
|
align="center"
|
||||||
|
:key="item"
|
||||||
|
:prop="item"/>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="handleQuery"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRealInfo, getRealData} from "@/api/tool/query"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "queryDate",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataId: null,
|
||||||
|
uconList: [],
|
||||||
|
showSearch: true,
|
||||||
|
realDate: {
|
||||||
|
data: [],
|
||||||
|
header: [],
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.dataId = this.$route.fullPath.split("/")[3]
|
||||||
|
getRealInfo(this.dataId).then(res => {
|
||||||
|
this.uconList = res.data
|
||||||
|
})
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
outPlaceholder(item) {
|
||||||
|
return "请输入" + item.ucName
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
resetQuery() {
|
||||||
|
for (let i = 0; this.uconList.length; i++) {
|
||||||
|
this.uconList[i].ucReal = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
handleQuery() {
|
||||||
|
let data = {
|
||||||
|
id: this.dataId,
|
||||||
|
pageNum: this.queryParams.pageNum,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
}
|
||||||
|
let list = this.uconList
|
||||||
|
data.uniCons = list
|
||||||
|
getRealData(data).then(res => {
|
||||||
|
this.realDate.data = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
this.realDate.header = []
|
||||||
|
for (var key in this.realDate.data[0]) {
|
||||||
|
this.realDate.header.push(key)
|
||||||
|
}
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
console.log(5)
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm('是否确认导出所有万能查询数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(function() {
|
||||||
|
// return exportQuery(queryParams);
|
||||||
|
}).then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -160,6 +160,7 @@ import {Message} from "element-ui";
|
||||||
|
|
||||||
function JSONString(list) {
|
function JSONString(list) {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
|
||||||
if (list[i].type == 2) {
|
if (list[i].type == 2) {
|
||||||
list[i].ucMock = JSON.stringify(list[i].ucMock)
|
list[i].ucMock = JSON.stringify(list[i].ucMock)
|
||||||
} else if (list[i].type == 4) {
|
} else if (list[i].type == 4) {
|
||||||
|
|
@ -193,7 +194,7 @@ export default {
|
||||||
tableHeight: document.documentElement.scrollHeight - 245 + "px",
|
tableHeight: document.documentElement.scrollHeight - 245 + "px",
|
||||||
// 表列信息
|
// 表列信息
|
||||||
cloumns: [],
|
cloumns: [],
|
||||||
sqlconfig:{
|
sqlconfig: {
|
||||||
// 默认的语法类型
|
// 默认的语法类型
|
||||||
mode: 'sql',
|
mode: 'sql',
|
||||||
// 编辑器实例
|
// 编辑器实例
|
||||||
|
|
@ -204,8 +205,8 @@ export default {
|
||||||
tabSize: 4,
|
tabSize: 4,
|
||||||
// 主题,对应主题库 JS 需要提前引入
|
// 主题,对应主题库 JS 需要提前引入
|
||||||
theme: 'idea',
|
theme: 'idea',
|
||||||
spellcheck:true,
|
spellcheck: true,
|
||||||
cursorHeight:0.85,
|
cursorHeight: 0.85,
|
||||||
// 显示行号
|
// 显示行号
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
line: true,
|
line: true,
|
||||||
|
|
@ -248,12 +249,48 @@ export default {
|
||||||
this.sqlconfig.coder.setValue(this.info.uqSql)
|
this.sqlconfig.coder.setValue(this.info.uqSql)
|
||||||
})
|
})
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this._initialize();
|
this.initialize();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changUniCon(list) {
|
||||||
|
console.log(list[0])
|
||||||
|
console.log(list.length)
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
console.log(list[0].ucName)
|
||||||
|
if (list[i].ucName == "") {
|
||||||
|
Message({
|
||||||
|
message: "序号" + i + "查询名称不能为空!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (list[i].ucDescribe == "") {
|
||||||
|
Message({
|
||||||
|
message: "序号" + i + "描述不能为空!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (list[i].ucKey == "") {
|
||||||
|
Message({
|
||||||
|
message: "序号" + i + "key不能为空!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (list[i].ucMock == "") {
|
||||||
|
Message({
|
||||||
|
message: "序号" + i + "模拟数据不能为空!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
/** 预览 */
|
/** 预览 */
|
||||||
previewQuery() {
|
previewQuery() {
|
||||||
this.$refs['elForm'].validate(valid => {
|
this.$refs['elForm'].validate(valid => {
|
||||||
|
|
@ -261,7 +298,11 @@ export default {
|
||||||
let list = JSONString(this.cloumns)
|
let list = JSONString(this.cloumns)
|
||||||
let data = this.info
|
let data = this.info
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
data.uniCons = list
|
if (this.changUniCon(list)) {
|
||||||
|
data.uniCons = list
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
data.pageNum = this.queryParams.pageNum
|
data.pageNum = this.queryParams.pageNum
|
||||||
data.pageSize = this.queryParams.pageSize
|
data.pageSize = this.queryParams.pageSize
|
||||||
|
|
@ -275,21 +316,18 @@ export default {
|
||||||
this.previewDate.open = true
|
this.previewDate.open = true
|
||||||
this.cloumns = JSONparse(list)
|
this.cloumns = JSONparse(list)
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sqlChang(){
|
sqlChang() {
|
||||||
console.log(this.sqlconfig.coder.getValue())
|
console.log(this.sqlconfig.coder.getValue())
|
||||||
},
|
},
|
||||||
_initialize() {
|
initialize() {
|
||||||
// 初始化编辑器实例,传入需要被实例化的文本域对象和默认配置
|
// 初始化编辑器实例,传入需要被实例化的文本域对象和默认配置
|
||||||
this.sqlconfig.coder = CodeMirror.fromTextArea(this.$refs.textarea, this.sqlconfig.options)
|
this.sqlconfig.coder = CodeMirror.fromTextArea(this.$refs.textarea, this.sqlconfig.options)
|
||||||
// 编辑器赋值
|
// 编辑器赋值
|
||||||
this.sqlconfig.coder.setValue(this.info.uqSql)
|
this.sqlconfig.coder.setValue(this.info.uqSql)
|
||||||
console.log(this.sqlconfig.coder.cm.defaultCharWidth(1))
|
// 支持双向绑定
|
||||||
// 支持双向绑定
|
|
||||||
this.sqlconfig.coder.on('change', (coder) => {
|
this.sqlconfig.coder.on('change', (coder) => {
|
||||||
this.info.uqSql = coder.getValue()
|
this.info.uqSql = coder.getValue()
|
||||||
console.log(this.info.uqSql)
|
console.log(this.info.uqSql)
|
||||||
|
|
@ -367,11 +405,13 @@ export default {
|
||||||
border: 1px solid #DCDFE6;
|
border: 1px solid #DCDFE6;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
.CodeMirror-line{
|
|
||||||
|
.CodeMirror-line {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px !important;
|
line-height: 20px !important;
|
||||||
}
|
}
|
||||||
.CodeMirror-linenumber{
|
|
||||||
|
.CodeMirror-linenumber {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px !important;
|
line-height: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,6 @@ public class ReturnConstants {
|
||||||
* 接口为空
|
* 接口为空
|
||||||
*/
|
*/
|
||||||
public static final String INTER_NULL = "该类下接口数据为空,请先添加接口!";
|
public static final String INTER_NULL = "该类下接口数据为空,请先添加接口!";
|
||||||
|
|
||||||
|
public static final String STATE_ERROR = "状态错错误!";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import com.hchyun.common.utils.StringUtils;
|
||||||
* @author hchyun
|
* @author hchyun
|
||||||
*/
|
*/
|
||||||
public class AjaxResult extends HashMap<String, Object> {
|
public class AjaxResult extends HashMap<String, Object> {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态码
|
* 状态码
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
* @author hchyun
|
* @author hchyun
|
||||||
*/
|
*/
|
||||||
public class BaseEntity implements Serializable {
|
public class BaseEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索值
|
* 搜索值
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class TreeEntity extends BaseEntity
|
public class TreeEntity extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 父菜单名称 */
|
/** 父菜单名称 */
|
||||||
private String parentName;
|
private String parentName;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import com.hchyun.common.core.entity.entity.SysMenu;
|
||||||
*/
|
*/
|
||||||
public class TreeSelect implements Serializable
|
public class TreeSelect implements Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 节点ID */
|
/** 节点ID */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysDept extends BaseEntity
|
public class SysDept extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 部门ID */
|
/** 部门ID */
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysDictData extends BaseEntity
|
public class SysDictData extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 字典编码 */
|
/** 字典编码 */
|
||||||
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
|
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysDictType extends BaseEntity
|
public class SysDictType extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 字典主键 */
|
/** 字典主键 */
|
||||||
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
|
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
* @author hchyun
|
* @author hchyun
|
||||||
*/
|
*/
|
||||||
public class SysMenu extends BaseEntity {
|
public class SysMenu extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单ID
|
* 菜单ID
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysRole extends BaseEntity
|
public class SysRole extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
|
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysUser extends BaseEntity
|
public class SysUser extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import com.hchyun.common.core.entity.entity.SysUser;
|
||||||
*/
|
*/
|
||||||
public class LoginUser implements UserDetails
|
public class LoginUser implements UserDetails
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户唯一标识
|
* 用户唯一标识
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class TableDataInfo implements Serializable
|
public class TableDataInfo implements Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 总记录数 */
|
/** 总记录数 */
|
||||||
private long total;
|
private long total;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import com.hchyun.common.utils.StringUtils;
|
||||||
*/
|
*/
|
||||||
public class BaseException extends RuntimeException
|
public class BaseException extends RuntimeException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属模块
|
* 所属模块
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception;
|
||||||
*/
|
*/
|
||||||
public class CustomException extends RuntimeException
|
public class CustomException extends RuntimeException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception;
|
||||||
*/
|
*/
|
||||||
public class DemoModeException extends RuntimeException
|
public class DemoModeException extends RuntimeException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public DemoModeException()
|
public DemoModeException()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import com.hchyun.common.exception.BaseException;
|
||||||
*/
|
*/
|
||||||
public class FileException extends BaseException
|
public class FileException extends BaseException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public FileException(String code, Object[] args)
|
public FileException(String code, Object[] args)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.file;
|
||||||
*/
|
*/
|
||||||
public class FileNameLengthLimitExceededException extends FileException
|
public class FileNameLengthLimitExceededException extends FileException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public FileNameLengthLimitExceededException(int defaultFileNameLength)
|
public FileNameLengthLimitExceededException(int defaultFileNameLength)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.file;
|
||||||
*/
|
*/
|
||||||
public class FileSizeLimitExceededException extends FileException
|
public class FileSizeLimitExceededException extends FileException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public FileSizeLimitExceededException(long defaultMaxSize)
|
public FileSizeLimitExceededException(long defaultMaxSize)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import org.apache.commons.fileupload.FileUploadException;
|
||||||
*/
|
*/
|
||||||
public class InvalidExtensionException extends FileUploadException
|
public class InvalidExtensionException extends FileUploadException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String[] allowedExtension;
|
private String[] allowedExtension;
|
||||||
private String extension;
|
private String extension;
|
||||||
|
|
@ -41,7 +41,7 @@ public class InvalidExtensionException extends FileUploadException
|
||||||
|
|
||||||
public static class InvalidImageExtensionException extends InvalidExtensionException
|
public static class InvalidImageExtensionException extends InvalidExtensionException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
|
public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
|
||||||
{
|
{
|
||||||
|
|
@ -51,7 +51,7 @@ public class InvalidExtensionException extends FileUploadException
|
||||||
|
|
||||||
public static class InvalidFlashExtensionException extends InvalidExtensionException
|
public static class InvalidFlashExtensionException extends InvalidExtensionException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
|
public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
|
||||||
{
|
{
|
||||||
|
|
@ -61,7 +61,7 @@ public class InvalidExtensionException extends FileUploadException
|
||||||
|
|
||||||
public static class InvalidMediaExtensionException extends InvalidExtensionException
|
public static class InvalidMediaExtensionException extends InvalidExtensionException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
|
public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.job;
|
||||||
*/
|
*/
|
||||||
public class TaskException extends Exception
|
public class TaskException extends Exception
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private Code code;
|
private Code code;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.user;
|
||||||
*/
|
*/
|
||||||
public class CaptchaException extends UserException
|
public class CaptchaException extends UserException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public CaptchaException()
|
public CaptchaException()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.user;
|
||||||
*/
|
*/
|
||||||
public class CaptchaExpireException extends UserException
|
public class CaptchaExpireException extends UserException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public CaptchaExpireException()
|
public CaptchaExpireException()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import com.hchyun.common.exception.BaseException;
|
||||||
*/
|
*/
|
||||||
public class UserException extends BaseException
|
public class UserException extends BaseException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public UserException(String code, Object[] args)
|
public UserException(String code, Object[] args)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ package com.hchyun.common.exception.user;
|
||||||
*/
|
*/
|
||||||
public class UserPasswordNotMatchException extends UserException
|
public class UserPasswordNotMatchException extends UserException
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public UserPasswordNotMatchException()
|
public UserPasswordNotMatchException()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ import com.hchyun.common.utils.sql.SqlUtil;
|
||||||
import com.hchyun.generator.entity.UniCon;
|
import com.hchyun.generator.entity.UniCon;
|
||||||
import com.hchyun.generator.entity.UniQuery;
|
import com.hchyun.generator.entity.UniQuery;
|
||||||
import com.hchyun.generator.service.QueryService;
|
import com.hchyun.generator.service.QueryService;
|
||||||
|
import com.hchyun.generator.service.UniQueryService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -32,28 +35,46 @@ import java.util.Map;
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@Api("query")
|
||||||
@RequestMapping("/query")
|
@RequestMapping("/query")
|
||||||
public class QueryController extends BaseController {
|
public class QueryController extends BaseController {
|
||||||
protected final Logger logger = LoggerFactory.getLogger(QueryController.class);
|
protected final Logger logger = LoggerFactory.getLogger(QueryController.class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QueryService queryService;
|
private QueryService queryService;
|
||||||
|
@Autowired
|
||||||
|
private UniQueryService uniQueryService;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('query:list')")
|
|
||||||
@GetMapping("/{id}")
|
@ApiOperation("获取查询基本信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id){
|
@PreAuthorize("@ss.hasPermi('query:real:list')")
|
||||||
|
@GetMapping("/real/{id}")
|
||||||
|
public AjaxResult getRealInfo(@PathVariable("id") Long id) {
|
||||||
try {
|
try {
|
||||||
ServerResult<UniQuery> serverResult = queryService.selectQueryById(id);
|
if (id == null) {
|
||||||
|
return AjaxResult.error("id不能为空!");
|
||||||
|
}
|
||||||
|
ServerResult<List<UniCon>> serverResult = queryService.getRealInfo(id);
|
||||||
|
if (serverResult.isStart()) {
|
||||||
|
return AjaxResult.success(serverResult.getData());
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error(serverResult.getMsg());
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('query:real:data')")
|
||||||
|
@PutMapping("/real")
|
||||||
|
public Serializable getRealData(@Validated @RequestBody UniQuery uniQuery){
|
||||||
|
try {
|
||||||
|
ServerResult<List<Map<String,Object>>> serverResult = queryService.getRealData(uniQuery);
|
||||||
if (serverResult.isStart()){
|
if (serverResult.isStart()){
|
||||||
UniQuery uniQuery = serverResult.getData();
|
return getDataTable(serverResult.getData());
|
||||||
Map<String,Object> modeMap = new HashMap<String, Object>();
|
|
||||||
List<UniCon> uniCons = uniQuery.getUniCons();
|
|
||||||
uniQuery.setUniCons(null);
|
|
||||||
modeMap.put("info",uniQuery);
|
|
||||||
modeMap.put("list",uniCons);
|
|
||||||
return AjaxResult.success(modeMap);
|
|
||||||
}else {
|
}else {
|
||||||
return AjaxResult.error(serverResult.getMsg());
|
return AjaxResult.error(serverResult.getMsg());
|
||||||
}
|
}
|
||||||
|
|
@ -62,6 +83,29 @@ public class QueryController extends BaseController {
|
||||||
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('query:list')")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
try {
|
||||||
|
ServerResult<UniQuery> serverResult = queryService.selectQueryById(id);
|
||||||
|
if (serverResult.isStart()) {
|
||||||
|
UniQuery uniQuery = serverResult.getData();
|
||||||
|
Map<String, Object> modeMap = new HashMap<String, Object>();
|
||||||
|
List<UniCon> uniCons = uniQuery.getUniCons();
|
||||||
|
uniQuery.setUniCons(null);
|
||||||
|
modeMap.put("info", uniQuery);
|
||||||
|
modeMap.put("list", uniCons);
|
||||||
|
return AjaxResult.success(modeMap);
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error(serverResult.getMsg());
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
// @PreAuthorize("@ss.hasPermi('query:list')")
|
// @PreAuthorize("@ss.hasPermi('query:list')")
|
||||||
// @GetMapping("/list")
|
// @GetMapping("/list")
|
||||||
// public AjaxResult list(UniQuery uniQuery){
|
// public AjaxResult list(UniQuery uniQuery){
|
||||||
|
|
@ -75,15 +119,15 @@ public class QueryController extends BaseController {
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('query:edit')")
|
@PreAuthorize("@ss.hasPermi('query:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody UniQuery uniQuery){
|
public AjaxResult edit(@Validated @RequestBody UniQuery uniQuery) {
|
||||||
try {
|
try {
|
||||||
ServerResult serverResult = queryService.updateQueryInfo(uniQuery);
|
ServerResult serverResult = queryService.updateQueryInfo(uniQuery);
|
||||||
if (serverResult.isStart()){
|
if (serverResult.isStart()) {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error(serverResult.getMsg());
|
return AjaxResult.error(serverResult.getMsg());
|
||||||
}
|
}
|
||||||
}catch (RuntimeException e){
|
} catch (RuntimeException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
}
|
}
|
||||||
|
|
@ -91,30 +135,32 @@ public class QueryController extends BaseController {
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('query:preview')")
|
@PreAuthorize("@ss.hasPermi('query:preview')")
|
||||||
@PutMapping("preview")
|
@PutMapping("preview")
|
||||||
public Serializable Preview(@Validated @RequestBody UniQuery uniQuery){
|
public Serializable Preview(@Validated @RequestBody UniQuery uniQuery) {
|
||||||
try {
|
try {
|
||||||
startPage(uniQuery);
|
startPage(uniQuery);
|
||||||
ServerResult<List<Map<String,Object>>> serverResult = queryService.previewQuery(uniQuery);
|
ServerResult<List<Map<String, Object>>> serverResult = queryService.previewQuery(uniQuery);
|
||||||
if (serverResult.isStart()){
|
if (serverResult.isStart()) {
|
||||||
return getDataTable(serverResult.getData());
|
return getDataTable(serverResult.getData());
|
||||||
}else {
|
} else {
|
||||||
return AjaxResult.error(serverResult.getMsg());
|
return AjaxResult.error(serverResult.getMsg());
|
||||||
}
|
}
|
||||||
}catch (RuntimeException e){
|
} catch (RuntimeException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('query:edit')")
|
@PreAuthorize("@ss.hasPermi('query:edit')")
|
||||||
@GetMapping("/export/{id}")
|
@GetMapping("/export/{id}")
|
||||||
public AjaxResult Export(@PathVariable("id") Long id){
|
public AjaxResult Export(@PathVariable("id") Long id) {
|
||||||
try {
|
try {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}catch (RuntimeException e){
|
} catch (RuntimeException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
return AjaxResult.error(ReturnConstants.SYS_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置请求分页数据
|
* 设置请求分页数据
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,7 @@ public interface QueryDao {
|
||||||
Integer insertUniCon(List<UniCon> uniCons);
|
Integer insertUniCon(List<UniCon> uniCons);
|
||||||
|
|
||||||
List<Map<String,Object>> UniQuery(String paramSQL);
|
List<Map<String,Object>> UniQuery(String paramSQL);
|
||||||
|
|
||||||
|
List<UniCon> queryRealInfo(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@ApiModel("接口类名")
|
@ApiModel("接口类名")
|
||||||
public class Apiclass extends BaseEntity {
|
public class Apiclass extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类id
|
* 类id
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.utils.StringUtils;
|
||||||
*/
|
*/
|
||||||
public class GenTable extends BaseEntity
|
public class GenTable extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 编号 */
|
/** 编号 */
|
||||||
private Long tableId;
|
private Long tableId;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import com.hchyun.common.utils.StringUtils;
|
||||||
*/
|
*/
|
||||||
public class GenTableColumn extends BaseEntity
|
public class GenTableColumn extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 编号 */
|
/** 编号 */
|
||||||
private Long columnId;
|
private Long columnId;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
||||||
* @date 2021-01-24
|
* @date 2021-01-24
|
||||||
*/
|
*/
|
||||||
public class Module extends BaseEntity {
|
public class Module extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模块id
|
* 模块id
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @date 2021-01-30
|
* @date 2021-01-30
|
||||||
*/
|
*/
|
||||||
public class UniCon {
|
public class UniCon {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
|
|
@ -43,6 +43,11 @@ public class UniCon {
|
||||||
*/
|
*/
|
||||||
private String ucMock;
|
private String ucMock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真实数据
|
||||||
|
*/
|
||||||
|
private String ucReal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
|
|
@ -125,4 +130,12 @@ public class UniCon {
|
||||||
public void setUcDescribe(String ucDescribe) {
|
public void setUcDescribe(String ucDescribe) {
|
||||||
this.ucDescribe = ucDescribe;
|
this.ucDescribe = ucDescribe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUcReal() {
|
||||||
|
return ucReal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUcReal(String ucReal) {
|
||||||
|
this.ucReal = ucReal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13,7 +14,6 @@ import java.util.List;
|
||||||
* @date 2021-01-30
|
* @date 2021-01-30
|
||||||
*/
|
*/
|
||||||
public class UniQuery extends BaseEntity {
|
public class UniQuery extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
|
|
@ -35,12 +35,26 @@ public class UniQuery extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String uqDescribe;
|
private String uqDescribe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布(0:否,1:发布)
|
||||||
|
*/
|
||||||
|
private Integer isRelease;
|
||||||
|
|
||||||
private List<UniCon> uniCons;
|
private List<UniCon> uniCons;
|
||||||
|
|
||||||
private Integer pageNum;
|
private Integer pageNum;
|
||||||
|
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getIsRelease() {
|
||||||
|
return isRelease;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsRelease(Integer isRelease) {
|
||||||
|
this.isRelease = isRelease;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getPageNum() {
|
public Integer getPageNum() {
|
||||||
return pageNum;
|
return pageNum;
|
||||||
}
|
}
|
||||||
|
|
@ -58,11 +72,15 @@ public class UniQuery extends BaseEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UniCon> getUniCons() {
|
public List<UniCon> getUniCons() {
|
||||||
return uniCons;
|
if (uniCons == null){
|
||||||
|
return uniCons = new ArrayList<UniCon>();
|
||||||
|
}else {
|
||||||
|
return uniCons;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUniCons(List<UniCon> uniCons) {
|
public void setUniCons(List<UniCon> uniCons) {
|
||||||
this.uniCons = uniCons;
|
this.uniCons = uniCons;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hchyun.generator.service;
|
package com.hchyun.generator.service;
|
||||||
|
|
||||||
import com.hchyun.common.utils.ServerResult;
|
import com.hchyun.common.utils.ServerResult;
|
||||||
|
import com.hchyun.generator.entity.UniCon;
|
||||||
import com.hchyun.generator.entity.UniQuery;
|
import com.hchyun.generator.entity.UniQuery;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -32,4 +33,18 @@ public interface QueryService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ServerResult<List<Map<String,Object>>> previewQuery(UniQuery uniQuery);
|
ServerResult<List<Map<String,Object>>> previewQuery(UniQuery uniQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取真实查询基本信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ServerResult<List<UniCon>> getRealInfo(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取查询信息
|
||||||
|
* @param uniQuery
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ServerResult<List<Map<String,Object>>> getRealData(UniQuery uniQuery);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.hchyun.generator.service.impl;
|
package com.hchyun.generator.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.hchyun.common.constant.ReturnConstants;
|
import com.hchyun.common.constant.ReturnConstants;
|
||||||
import com.hchyun.common.utils.DateUtils;
|
import com.hchyun.common.utils.DateUtils;
|
||||||
import com.hchyun.common.utils.ServerResult;
|
import com.hchyun.common.utils.ServerResult;
|
||||||
|
|
@ -17,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -27,13 +29,16 @@ import java.util.Map;
|
||||||
@Service
|
@Service
|
||||||
public class QueryServiceImpl implements QueryService {
|
public class QueryServiceImpl implements QueryService {
|
||||||
private Logger logger = LoggerFactory.getLogger(QueryServiceImpl.class);
|
private Logger logger = LoggerFactory.getLogger(QueryServiceImpl.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QueryDao queryDao;
|
private QueryDao queryDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UniQueryDao uniQueryDao;
|
private UniQueryDao uniQueryDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询万能查询的基本信息和条件信息
|
* 查询万能查询的基本信息和条件信息
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -46,15 +51,44 @@ public class QueryServiceImpl implements QueryService {
|
||||||
} else {
|
} else {
|
||||||
return new ServerResult<UniQuery>(false, ReturnConstants.RESULT_EMPTY);
|
return new ServerResult<UniQuery>(false, ReturnConstants.RESULT_EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
return new ServerResult<UniQuery>(false, ReturnConstants.SYS_FAILL);
|
return new ServerResult<UniQuery>(false, ReturnConstants.SYS_FAILL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServerResult<List<Map<String, Object>>> getRealData(UniQuery uniQuery) {
|
||||||
|
try {
|
||||||
|
List<UniCon> uniCons = uniQuery.getUniCons();
|
||||||
|
Integer pageNum = uniQuery.getPageNum();
|
||||||
|
Integer pageSize = uniQuery.getPageSize();
|
||||||
|
uniQuery = uniQueryDao.selectUniQueryById(uniQuery.getId());
|
||||||
|
String sql = uniQuery.getUqSql().toLowerCase();
|
||||||
|
sql = sql.toLowerCase();
|
||||||
|
if (uniQuery.getIsRelease() == 0) {
|
||||||
|
return new ServerResult<List<Map<String, Object>>>(false, ReturnConstants.STATE_ERROR);
|
||||||
|
} else {
|
||||||
|
if (uniCons.size() > 0) {
|
||||||
|
sql += " where ";
|
||||||
|
for (UniCon uniCon : uniCons) {
|
||||||
|
sql += conversionReal(uniCon);
|
||||||
|
}
|
||||||
|
sql+= " 1 = 1";
|
||||||
|
}
|
||||||
|
PageHelper.startPage(pageNum, pageSize, "");
|
||||||
|
List<Map<String, Object>> dataMap = queryDao.UniQuery(sql);
|
||||||
|
return new ServerResult<List<Map<String, Object>>>(true, dataMap);
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
return new ServerResult<List<Map<String, Object>>>(false, ReturnConstants.SYS_FAILL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新万能查询基本信息和条件
|
* 更新万能查询基本信息和条件
|
||||||
|
*
|
||||||
* @param uniQuery
|
* @param uniQuery
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,16 +98,16 @@ public class QueryServiceImpl implements QueryService {
|
||||||
try {
|
try {
|
||||||
Integer uqrenewal = uniQueryDao.updateUniQuery(uniQuery);
|
Integer uqrenewal = uniQueryDao.updateUniQuery(uniQuery);
|
||||||
if (uqrenewal > 0) {
|
if (uqrenewal > 0) {
|
||||||
if (uniQuery.getUniCons()!=null){
|
if (uniQuery.getUniCons() != null) {
|
||||||
queryDao.deleteUniCon(uniQuery.getId());
|
queryDao.deleteUniCon(uniQuery.getId());
|
||||||
Integer ucrenewal = queryDao.insertUniCon(uniQuery.getUniCons());
|
Integer ucrenewal = queryDao.insertUniCon(uniQuery.getUniCons());
|
||||||
if (ucrenewal==0){
|
if (ucrenewal == 0) {
|
||||||
return new ServerResult(false,"操作失败!");
|
return new ServerResult(false, "操作失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new ServerResult(true);
|
return new ServerResult(true);
|
||||||
}
|
}
|
||||||
return new ServerResult(false,"操作失败!");
|
return new ServerResult(false, "操作失败!");
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
|
@ -82,68 +116,113 @@ public class QueryServiceImpl implements QueryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ServerResult<List<Map<String,Object>>> previewQuery(UniQuery uniQuery) {
|
public ServerResult<List<Map<String, Object>>> previewQuery(UniQuery uniQuery) {
|
||||||
try {
|
try {
|
||||||
String sql = uniQuery.getUqSql();
|
String sql = uniQuery.getUqSql();
|
||||||
List<UniCon> uniConList = uniQuery.getUniCons();
|
List<UniCon> uniConList = uniQuery.getUniCons();
|
||||||
sql = sql.toLowerCase();
|
sql = sql.toLowerCase();
|
||||||
if (sql.contains("insert")||sql.contains("delete ")||sql.contains("update ")||sql.contains("drop ")||sql.contains("database ")||sql.contains("create ")||sql.contains("view ")||sql.contains("alter ")){
|
if (sql.contains("insert") || sql.contains("delete ") || sql.contains("update ") || sql.contains("drop ") || sql.contains("database ") || sql.contains("create ") || sql.contains("view ") || sql.contains("alter ")) {
|
||||||
return new ServerResult<List<Map<String,Object>>>(false,"sql语句含有insert,delete,update,drop,database,view,alter等特殊字符!");
|
return new ServerResult<List<Map<String, Object>>>(false, "sql语句含有insert,delete,update,drop,database,view,alter等特殊字符!");
|
||||||
}
|
}
|
||||||
sql = sql + " where ";
|
if (uniConList.size() > 0) {
|
||||||
if(uniConList!=null){
|
sql = sql + " where ";
|
||||||
for (UniCon uniCon: uniConList) {
|
for (UniCon uniCon : uniConList) {
|
||||||
|
sql += conversionPreview(uniCon);
|
||||||
sql += conversion(uniCon);
|
|
||||||
}
|
}
|
||||||
sql = sql + " 1=1";
|
sql+= " 1 = 1";
|
||||||
}
|
}
|
||||||
|
List<Map<String, Object>> dataMap = queryDao.UniQuery(sql);
|
||||||
List<Map<String,Object>> dataMap = queryDao.UniQuery(sql);
|
return new ServerResult<List<Map<String, Object>>>(true, dataMap);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
return new ServerResult<List<Map<String,Object>>>(true,dataMap);
|
|
||||||
}catch (RuntimeException e){
|
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
return new ServerResult<List<Map<String,Object>>>(false,e.getMessage());
|
return new ServerResult<List<Map<String, Object>>>(false, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServerResult<List<UniCon>> getRealInfo(Long id) {
|
||||||
|
try {
|
||||||
|
List<UniCon> uniCons = queryDao.queryRealInfo(id);
|
||||||
|
return new ServerResult<List<UniCon>>(true, uniCons);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
return new ServerResult<List<UniCon>>(false, ReturnConstants.DB_EX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String conversion(UniCon uniCon){
|
public String conversionReal(UniCon uniCon) {
|
||||||
if (uniCon.getType().equals("datetime")){
|
if (uniCon.getUcReal() == null) {
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
|
if (uniCon.getUcType().equals("datetime")) {
|
||||||
|
uniCon.setUcReal(DateUtils.getDate(uniCon.getUcReal()));
|
||||||
|
}
|
||||||
|
String sql = "";
|
||||||
|
if (uniCon.getUcCon().equals("EQ")) {
|
||||||
|
sql += uniCon.getUcKey() + " = '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("NE")) {
|
||||||
|
sql += uniCon.getUcKey() + " != '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("GT")) {
|
||||||
|
sql += uniCon.getUcKey() + " > '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("GTE")) {
|
||||||
|
sql += uniCon.getUcKey() + " >= '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("LT")) {
|
||||||
|
sql += uniCon.getUcKey() + " < '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("LTE")) {
|
||||||
|
sql += uniCon.getUcKey() + " <= '" + uniCon.getUcReal() + "' and ";
|
||||||
|
} else if (uniCon.getUcCon().equals("LIKE")) {
|
||||||
|
sql += uniCon.getUcKey() + " like '%" + uniCon.getUcReal() + "%'";
|
||||||
|
} else if (uniCon.getUcCon().equals("BETWEEN")) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(uniCon.getUcReal());
|
||||||
|
if (uniCon.getUcType().equals("input")) {
|
||||||
|
Object begin = jsonObject.get("begin");
|
||||||
|
Object end = jsonObject.get("end");
|
||||||
|
sql += uniCon.getUcKey() + " between '" + begin + "' AND '" + end + "' and ";
|
||||||
|
} else if (uniCon.getUcType().equals("datetime")) {
|
||||||
|
Object startTime = jsonObject.get("startTime");
|
||||||
|
Object endTime = jsonObject.get("endTime");
|
||||||
|
sql += uniCon.getUcKey() + " between '" + startTime + "' AND '" + endTime + "' and ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sql;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String conversionPreview(UniCon uniCon) {
|
||||||
|
if (uniCon.getType().equals("datetime")) {
|
||||||
uniCon.setUcMock(DateUtils.getDate(uniCon.getUcMock()));
|
uniCon.setUcMock(DateUtils.getDate(uniCon.getUcMock()));
|
||||||
}
|
}
|
||||||
String sql = "";
|
String sql = "";
|
||||||
if (uniCon.getUcCon().equals("EQ")){
|
if (uniCon.getUcCon().equals("EQ")) {
|
||||||
sql += uniCon.getUcKey() + " = '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " = '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("NE")){
|
} else if (uniCon.getUcCon().equals("NE")) {
|
||||||
sql += uniCon.getUcKey() + " != '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " != '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("GT")){
|
} else if (uniCon.getUcCon().equals("GT")) {
|
||||||
sql += uniCon.getUcKey() + " > '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " > '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("GTE")){
|
} else if (uniCon.getUcCon().equals("GTE")) {
|
||||||
sql += uniCon.getUcKey() + " >= '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " >= '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("LT")){
|
} else if (uniCon.getUcCon().equals("LT")) {
|
||||||
sql += uniCon.getUcKey() + " < '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " < '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("LTE")){
|
} else if (uniCon.getUcCon().equals("LTE")) {
|
||||||
sql += uniCon.getUcKey() + " <= '" + uniCon.getUcMock()+ "' and ";
|
sql += uniCon.getUcKey() + " <= '" + uniCon.getUcMock() + "' and ";
|
||||||
}else if (uniCon.getUcCon().equals("LIKE")){
|
} else if (uniCon.getUcCon().equals("LIKE")) {
|
||||||
sql += uniCon.getUcKey() + " like '%" + uniCon.getUcMock()+ "%' and ";
|
sql += uniCon.getUcKey() + " like '%" + uniCon.getUcMock() + "%'";
|
||||||
}else if (uniCon.getUcCon().equals("BETWEEN")){
|
} else if (uniCon.getUcCon().equals("BETWEEN")) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(uniCon.getUcMock());
|
JSONObject jsonObject = JSONObject.parseObject(uniCon.getUcMock());
|
||||||
if (uniCon.getUcType().equals("input")){
|
if (uniCon.getUcType().equals("input")) {
|
||||||
Object begin = jsonObject.get("begin");
|
Object begin = jsonObject.get("begin");
|
||||||
Object end = jsonObject.get("end");
|
Object end = jsonObject.get("end");
|
||||||
sql += uniCon.getUcKey() + " between '" + begin +"' AND '" + end + "' and";
|
sql += uniCon.getUcKey() + " between '" + begin + "' AND '" + end + "' and ";
|
||||||
}else if (uniCon.getUcType().equals("datetime")){
|
} else if (uniCon.getUcType().equals("datetime")) {
|
||||||
Object startTime = jsonObject.get("startTime");
|
Object startTime = jsonObject.get("startTime");
|
||||||
Object endTime = jsonObject.get("endTime");
|
Object endTime = jsonObject.get("endTime");
|
||||||
sql += uniCon.getUcKey() + " between '" + startTime +"' AND '" + endTime + "' and";
|
sql += uniCon.getUcKey() + " between '" + startTime + "' AND '" + endTime + "' and ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,10 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryRealInfo" parameterType="Long" resultMap="UniConResult">
|
||||||
|
select * from gen_uni_con where uq_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectQueryInfo" parameterType="Long" resultMap="QueryResult">
|
<select id="selectQueryInfo" parameterType="Long" resultMap="QueryResult">
|
||||||
select uq.id, uq.uq_name, uq.uq_sql, uq.uq_describe, uq.create_by, uq.create_time, uq.update_by, uq.update_time,
|
select uq.id, uq.uq_name, uq.uq_sql, uq.uq_describe, uq.create_by, uq.create_time, uq.update_by, uq.update_time,
|
||||||
uc.id as uc_id, uc.uq_id, uc.uc_name, uc.uc_key, uc.uc_con, uc.uc_mock, uc.uc_describe ,uc.uc_type,uc.type
|
uc.id as uc_id, uc.uq_id, uc.uc_name, uc.uc_key, uc.uc_con, uc.uc_mock, uc.uc_describe ,uc.uc_type,uc.type
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
<result property="uqName" column="uq_name" />
|
<result property="uqName" column="uq_name" />
|
||||||
<result property="uqSql" column="uq_sql" />
|
<result property="uqSql" column="uq_sql" />
|
||||||
<result property="uqDescribe" column="uq_describe" />
|
<result property="uqDescribe" column="uq_describe" />
|
||||||
|
<result property="isRelease" column="is_release" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
|
|
@ -17,7 +18,7 @@
|
||||||
|
|
||||||
|
|
||||||
<sql id="selectUniQueryVo">
|
<sql id="selectUniQueryVo">
|
||||||
select id, uq_name, uq_sql, uq_describe, create_by, create_time, update_by, update_time from gen_uni_query
|
select id, uq_name, uq_sql, uq_describe, is_release, create_by, create_time, update_by, update_time from gen_uni_query
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUniQueryList" parameterType="UniQuery" resultMap="UniQueryResult">
|
<select id="selectUniQueryList" parameterType="UniQuery" resultMap="UniQueryResult">
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import com.hchyun.quartz.util.CronUtils;
|
||||||
*/
|
*/
|
||||||
public class SysJob extends BaseEntity implements Serializable
|
public class SysJob extends BaseEntity implements Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 任务ID */
|
/** 任务ID */
|
||||||
@Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
|
@Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysJobLog extends BaseEntity
|
public class SysJobLog extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@Excel(name = "日志序号")
|
@Excel(name = "日志序号")
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
*/
|
*/
|
||||||
public class Regular extends BaseEntity
|
public class Regular extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysConfig extends BaseEntity
|
public class SysConfig extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 参数主键 */
|
/** 参数主键 */
|
||||||
@Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
|
@Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysLogininfor extends BaseEntity
|
public class SysLogininfor extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@Excel(name = "序号", cellType = ColumnType.NUMERIC)
|
@Excel(name = "序号", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysNotice extends BaseEntity
|
public class SysNotice extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 公告ID */
|
/** 公告ID */
|
||||||
private Long noticeId;
|
private Long noticeId;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysOperLog extends BaseEntity
|
public class SysOperLog extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 日志主键 */
|
/** 日志主键 */
|
||||||
@Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
|
@Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import com.hchyun.common.core.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class SysPost extends BaseEntity
|
public class SysPost extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 岗位序号 */
|
/** 岗位序号 */
|
||||||
@Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
|
@Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@ApiModel("成绩")
|
@ApiModel("成绩")
|
||||||
public class Results extends BaseEntity
|
public class Results extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
@ApiModelProperty("id")
|
@ApiModelProperty("id")
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
*/
|
*/
|
||||||
public class Stu extends BaseEntity
|
public class Stu extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
*/
|
*/
|
||||||
public class TestTree extends TreeEntity
|
public class TestTree extends TreeEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 主键id */
|
/** 主键id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue