Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
DQMP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
DQMP
Commits
63f84a83
Commit
63f84a83
authored
Dec 21, 2019
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add del rule、find rule list、front codes
parent
46d2f33b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1082 additions
and
83 deletions
+1082
-83
pom.xml
pom.xml
+5
-0
Constants.java
src/main/java/com/gmei/data/dqmp/common/Constants.java
+5
-4
BaseController.java
...in/java/com/gmei/data/dqmp/controller/BaseController.java
+22
-0
DqRuleController.java
.../java/com/gmei/data/dqmp/controller/DqRuleController.java
+23
-10
DqRuleImportController.java
...com/gmei/data/dqmp/controller/DqRuleImportController.java
+128
-0
IndexController.java
...n/java/com/gmei/data/dqmp/controller/IndexController.java
+42
-0
DqRuleApiController.java
...om/gmei/data/dqmp/controller/api/DqRuleApiController.java
+42
-0
DqRuleImportApiController.java
...i/data/dqmp/controller/api/DqRuleImportApiController.java
+44
-4
TblSqlCheckDuplex.java
...ain/java/com/gmei/data/dqmp/domain/TblSqlCheckDuplex.java
+10
-0
TblSqlCheckDuplexCriteria.java
.../com/gmei/data/dqmp/domain/TblSqlCheckDuplexCriteria.java
+60
-0
TblSqlCheckSingle.java
...ain/java/com/gmei/data/dqmp/domain/TblSqlCheckSingle.java
+10
-0
TblSqlCheckSingleCriteria.java
.../com/gmei/data/dqmp/domain/TblSqlCheckSingleCriteria.java
+60
-0
TblSqlMonitorSpecial.java
.../java/com/gmei/data/dqmp/domain/TblSqlMonitorSpecial.java
+10
-0
TblSqlMonitorSpecialCriteria.java
...m/gmei/data/dqmp/domain/TblSqlMonitorSpecialCriteria.java
+60
-0
TblSqlMonitorVolatility.java
...va/com/gmei/data/dqmp/domain/TblSqlMonitorVolatility.java
+10
-0
TblSqlMonitorVolatilityCriteria.java
...mei/data/dqmp/domain/TblSqlMonitorVolatilityCriteria.java
+60
-0
DqRuleService.java
src/main/java/com/gmei/data/dqmp/service/DqRuleService.java
+19
-0
DqRuleServiceImpl.java
...va/com/gmei/data/dqmp/service/impl/DqRuleServiceImpl.java
+0
-0
BaseVo.java
src/main/java/com/gmei/data/dqmp/vo/BaseVo.java
+8
-8
DqReferRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqReferRuleVo.java
+20
-0
DqRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqRuleVo.java
+11
-0
DqSpecialRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqSpecialRuleVo.java
+19
-0
DqUnblankRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqUnblankRuleVo.java
+16
-0
DqUniqueRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqUniqueRuleVo.java
+16
-0
DqVolatilityRuleVo.java
src/main/java/com/gmei/data/dqmp/vo/DqVolatilityRuleVo.java
+17
-0
application-dev.yml
src/main/resources/application-dev.yml
+2
-0
application-prod.yml
src/main/resources/application-prod.yml
+2
-0
application-test.yml
src/main/resources/application-test.yml
+2
-0
generator.xml
src/main/resources/generator.xml
+9
-5
TblRuleInfoDuplexMapper.xml
...main/resources/mybatis/mapper/TblRuleInfoDuplexMapper.xml
+16
-16
TblRuleInfoSimpleMapper.xml
...main/resources/mybatis/mapper/TblRuleInfoSimpleMapper.xml
+16
-16
TblSqlCheckDuplexMapper.xml
...main/resources/mybatis/mapper/TblSqlCheckDuplexMapper.xml
+22
-5
TblSqlCheckSingleMapper.xml
...main/resources/mybatis/mapper/TblSqlCheckSingleMapper.xml
+23
-5
TblSqlMonitorSpecialMapper.xml
...n/resources/mybatis/mapper/TblSqlMonitorSpecialMapper.xml
+22
-5
TblSqlMonitorVolatilityMapper.xml
...esources/mybatis/mapper/TblSqlMonitorVolatilityMapper.xml
+23
-5
index.html
src/main/resources/templates/index.html
+212
-0
result.html
src/main/resources/templates/result.html
+16
-0
logo.ico
src/main/resources/templates/static/img/logo.ico
+0
-0
No files found.
pom.xml
View file @
63f84a83
...
...
@@ -66,6 +66,11 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-thymeleaf
</artifactId>
</dependency>
<dependency>
<groupId>
net.sourceforge.nekohtml
</groupId>
<artifactId>
nekohtml
</artifactId>
<version>
1.9.22
</version>
</dependency>
<!-- 集成热部署插件 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
src/main/java/com/gmei/data/dqmp/common/Constants.java
View file @
63f84a83
...
...
@@ -36,9 +36,10 @@ public class Constants {
// 双表规则类型
public
static
final
String
TABLE_DUPLEX
=
"duplex"
;
// public static final String CHECK_SIMPLE = "check_single";
// public static final String CHECK_MULTIPLE = "check_multiple";
// public static final String MONITOR_VOLATILITY = "monitor_volatility";
// public static final String MONITOR_SPECIAL = "monitor_special";
public
static
final
String
UNIQUE
=
"unique"
;
public
static
final
String
UNBLANK
=
"unblank"
;
public
static
final
String
REFER
=
"refer"
;
public
static
final
String
VOLATILITY
=
"volatility"
;
public
static
final
String
SPECIAL
=
"special"
;
}
src/main/java/com/gmei/data/dqmp/controller/BaseController.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
controller
;
import
org.springframework.ui.Model
;
public
class
BaseController
{
/**
* 执行结果页面属性返回
* @param model
* @param isSuc
* @param msg
* @return
*/
protected
String
model
(
Model
model
,
boolean
isSuc
,
String
msg
)
{
if
(
isSuc
)
{
model
.
addAttribute
(
"result"
,
"success!"
);
}
else
{
model
.
addAttribute
(
"result"
,
msg
);
}
return
"result"
;
}
}
src/main/java/com/gmei/data/dqmp/controller/DqRuleController.java
View file @
63f84a83
...
...
@@ -2,20 +2,21 @@ package com.gmei.data.dqmp.controller;
import
javax.validation.Valid
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gmei.data.dqmp.service.DqRuleService
;
import
com.gmei.data.dqmp.vo.DqRuleVo
;
@
Rest
Controller
@RequestMapping
(
value
=
"/dq
r
ule"
)
public
class
DqRuleController
{
@Controller
@RequestMapping
(
value
=
"/dq
R
ule"
)
public
class
DqRuleController
extends
BaseController
{
@Autowired
private
DqRuleService
dqRuleService
;
...
...
@@ -26,17 +27,29 @@ public class DqRuleController {
* @param bindingResult
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
DqRuleVo
addDqRule
(
@RequestBody
@Valid
DqRuleVo
dqRuleVo
,
BindingResult
bindingResult
)
{
public
String
addDqRule
(
@RequestBody
@Valid
DqRuleVo
dqRuleVo
,
BindingResult
bindingResult
,
Model
model
)
{
if
(
bindingResult
.
hasErrors
())
{
return
new
DqRuleVo
(-
1
,
bindingResult
.
getFieldError
().
getDefaultMessage
());
return
model
(
model
,
false
,
bindingResult
.
getFieldError
().
getDefaultMessage
());
}
Boolean
isAddSuc
=
dqRuleService
.
addDqRule
(
dqRuleVo
);
if
(
isAddSuc
)
{
return
new
DqRuleVo
(
);
return
model
(
model
,
true
,
""
);
}
else
{
return
new
DqRuleVo
(-
1
,
"Rule add error!"
);
return
model
(
model
,
false
,
"Rule add error!"
);
}
}
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
GET
)
public
String
delDqRule
(
DqRuleVo
dqRuleVo
,
Model
model
)
{
if
(
dqRuleVo
.
getId
()
==
null
||
StringUtils
.
isBlank
(
dqRuleVo
.
getCheckType
()))
{
return
model
(
model
,
false
,
"Params is error!"
);
}
Boolean
isDelSuc
=
dqRuleService
.
delDqRule
(
dqRuleVo
);
if
(
isDelSuc
)
{
return
model
(
model
,
true
,
""
);
}
else
{
return
model
(
model
,
false
,
"数据质量规则删除失败!"
);
}
}
}
src/main/java/com/gmei/data/dqmp/controller/DqRuleImportController.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
controller
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.gmei.data.dqmp.common.Constants
;
import
com.gmei.data.dqmp.service.DqRuleService
;
import
com.gmei.data.dqmp.utils.ImportExcelUtils
;
import
com.gmei.data.dqmp.vo.BaseVo
;
@Controller
@RequestMapping
(
value
=
"/excel"
)
public
class
DqRuleImportController
extends
BaseController
{
@Autowired
private
DqRuleService
dqRuleService
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DqRuleImportController
.
class
);
@PostMapping
(
value
=
"export"
)
public
BaseVo
exportExcel
()
{
return
new
BaseVo
();
}
@PostMapping
(
value
=
"importUnique"
)
public
String
importUniqueExcel
(
HttpServletRequest
httpServletRequest
,
Model
model
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
UNIQUE
))
{
return
model
(
model
,
false
,
"上传的数据质量规则文件格式或内容错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadUniqueListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
model
(
model
,
false
,
e
.
getMessage
());
}
return
model
(
model
,
true
,
""
);
}
@PostMapping
(
value
=
"importUnblank"
)
public
String
importUnblankExcel
(
HttpServletRequest
httpServletRequest
,
Model
model
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
UNBLANK
))
{
return
model
(
model
,
false
,
"上传的数据质量规则文件格式或内容错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadUnblankListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
model
(
model
,
false
,
e
.
getMessage
());
}
return
model
(
model
,
true
,
""
);
}
@PostMapping
(
value
=
"importRefer"
)
public
String
importReferExcel
(
HttpServletRequest
httpServletRequest
,
Model
model
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
REFER
))
{
return
model
(
model
,
false
,
"上传的数据质量规则文件格式或内容错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadReferListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
model
(
model
,
false
,
e
.
getMessage
());
}
return
model
(
model
,
true
,
""
);
}
@PostMapping
(
value
=
"importVolatility"
)
public
String
importVolatilityExcel
(
HttpServletRequest
httpServletRequest
,
Model
model
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
VOLATILITY
))
{
return
model
(
model
,
false
,
"上传的数据质量规则文件格式或内容错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadVolatilityListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
model
(
model
,
false
,
e
.
getMessage
());
}
return
model
(
model
,
true
,
""
);
}
@PostMapping
(
value
=
"importSpecial"
)
public
String
importExcel
(
HttpServletRequest
httpServletRequest
,
Model
model
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
SPECIAL
))
{
return
model
(
model
,
false
,
"上传的数据质量规则文件格式或内容错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadSpecialListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
model
(
model
,
false
,
e
.
getMessage
());
}
return
model
(
model
,
true
,
""
);
}
/**
* 上传文件格式、内容校验
*
* @param httpServletRequest
* @param type
* @return
*/
private
Boolean
checkIsLegal
(
HttpServletRequest
httpServletRequest
,
String
type
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
httpServletRequest
;
MultipartFile
requestFile
=
multipartRequest
.
getFile
(
"file"
);
String
originalFilename
=
requestFile
.
getOriginalFilename
();
if
(!
originalFilename
.
endsWith
(
ExcelTypeEnum
.
XLS
.
getValue
())
&&
!
originalFilename
.
endsWith
(
ExcelTypeEnum
.
XLSX
.
getValue
()))
{
logger
.
error
(
"Excel导入错误文件名称:{}"
,
originalFilename
);
return
false
;
}
else
{
if
(!
originalFilename
.
contains
(
type
))
{
logger
.
error
(
"导入的不是非空性校验规则文件:{}"
,
originalFilename
);
return
false
;
}
}
return
true
;
}
}
src/main/java/com/gmei/data/dqmp/controller/IndexController.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
controller
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
com.gmei.data.dqmp.service.DqRuleService
;
import
com.gmei.data.dqmp.vo.DqReferRuleVo
;
import
com.gmei.data.dqmp.vo.DqSpecialRuleVo
;
import
com.gmei.data.dqmp.vo.DqUnblankRuleVo
;
import
com.gmei.data.dqmp.vo.DqUniqueRuleVo
;
import
com.gmei.data.dqmp.vo.DqVolatilityRuleVo
;
@Controller
public
class
IndexController
{
@Autowired
private
DqRuleService
dqRuleService
;
/**
* 首页中功能列表
* @param model
* @return
*/
@GetMapping
(
"/"
)
public
String
index
(
Model
model
)
{
List
<
DqUniqueRuleVo
>
uniqueList
=
dqRuleService
.
findUniqueDqRuleList
();
List
<
DqUnblankRuleVo
>
unblankList
=
dqRuleService
.
findUnblankDqRuleList
();
List
<
DqReferRuleVo
>
referList
=
dqRuleService
.
findReferDqRuleList
();
List
<
DqVolatilityRuleVo
>
volatilityList
=
dqRuleService
.
findVolatilityDqRuleList
();
List
<
DqSpecialRuleVo
>
specialList
=
dqRuleService
.
findSpecialDqRuleList
();
model
.
addAttribute
(
"uniqueList"
,
uniqueList
);
model
.
addAttribute
(
"unblankList"
,
unblankList
);
model
.
addAttribute
(
"referList"
,
referList
);
model
.
addAttribute
(
"volatilityList"
,
volatilityList
);
model
.
addAttribute
(
"specialList"
,
specialList
);
return
"index"
;
}
}
src/main/java/com/gmei/data/dqmp/controller/api/DqRuleApiController.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
controller
.
api
;
import
javax.validation.Valid
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gmei.data.dqmp.service.DqRuleService
;
import
com.gmei.data.dqmp.vo.DqRuleVo
;
@RestController
@RequestMapping
(
value
=
"/api/dqrule"
)
public
class
DqRuleApiController
{
@Autowired
private
DqRuleService
dqRuleService
;
/**
* 校验规则新增
* @param dqRuleVo
* @param bindingResult
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
DqRuleVo
addDqRule
(
@RequestBody
@Valid
DqRuleVo
dqRuleVo
,
BindingResult
bindingResult
)
{
if
(
bindingResult
.
hasErrors
())
{
return
new
DqRuleVo
(-
1
,
bindingResult
.
getFieldError
().
getDefaultMessage
());
}
Boolean
isAddSuc
=
dqRuleService
.
addDqRule
(
dqRuleVo
);
if
(
isAddSuc
)
{
return
new
DqRuleVo
();
}
else
{
return
new
DqRuleVo
(-
1
,
"Rule add error!"
);
}
}
}
src/main/java/com/gmei/data/dqmp/controller/
EasyExcel
Controller.java
→
src/main/java/com/gmei/data/dqmp/controller/
api/DqRuleImportApi
Controller.java
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
controller
;
package
com
.
gmei
.
data
.
dqmp
.
controller
.
api
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -8,18 +8,22 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.gmei.data.dqmp.common.Constants
;
import
com.gmei.data.dqmp.service.DqRuleService
;
import
com.gmei.data.dqmp.utils.ImportExcelUtils
;
import
com.gmei.data.dqmp.vo.BaseVo
;
@RestController
@RequestMapping
(
value
=
"/excel"
)
public
class
EasyExcel
Controller
{
@RequestMapping
(
value
=
"/
api/
excel"
)
public
class
DqRuleImportApi
Controller
{
@Autowired
private
DqRuleService
dqRuleService
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EasyExcel
Controller
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DqRuleImportApi
Controller
.
class
);
@PostMapping
(
value
=
"export"
)
public
BaseVo
exportExcel
()
{
...
...
@@ -28,6 +32,9 @@ public class EasyExcelController {
@PostMapping
(
value
=
"importUnique"
)
public
BaseVo
importUniqueExcel
(
HttpServletRequest
httpServletRequest
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
UNIQUE
))
{
return
new
BaseVo
(-
1
,
"上传的数据质量规则文件错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadUniqueListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
...
...
@@ -39,6 +46,9 @@ public class EasyExcelController {
@PostMapping
(
value
=
"importUnblank"
)
public
BaseVo
importUnblankExcel
(
HttpServletRequest
httpServletRequest
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
UNBLANK
))
{
return
new
BaseVo
(-
1
,
"上传的数据质量规则文件错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadUnblankListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
...
...
@@ -50,6 +60,9 @@ public class EasyExcelController {
@PostMapping
(
value
=
"importRefer"
)
public
BaseVo
importReferExcel
(
HttpServletRequest
httpServletRequest
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
REFER
))
{
return
new
BaseVo
(-
1
,
"上传的数据质量规则文件错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadReferListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
...
...
@@ -61,6 +74,9 @@ public class EasyExcelController {
@PostMapping
(
value
=
"importVolatility"
)
public
BaseVo
importVolatilityExcel
(
HttpServletRequest
httpServletRequest
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
VOLATILITY
))
{
return
new
BaseVo
(-
1
,
"上传的数据质量规则文件错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadVolatilityListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
...
...
@@ -72,6 +88,9 @@ public class EasyExcelController {
@PostMapping
(
value
=
"importSpecial"
)
public
BaseVo
importExcel
(
HttpServletRequest
httpServletRequest
)
{
if
(!
checkIsLegal
(
httpServletRequest
,
Constants
.
SPECIAL
))
{
return
new
BaseVo
(-
1
,
"上传的数据质量规则文件错误,请核实!"
);
}
try
{
ImportExcelUtils
.
saxReadSpecialListString
(
httpServletRequest
,
dqRuleService
);
}
catch
(
Exception
e
)
{
...
...
@@ -81,4 +100,25 @@ public class EasyExcelController {
return
new
BaseVo
();
}
/**
* 上传文件格式、内容校验
* @param httpServletRequest
* @param type
* @return
*/
private
Boolean
checkIsLegal
(
HttpServletRequest
httpServletRequest
,
String
type
)
{
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
httpServletRequest
;
MultipartFile
requestFile
=
multipartRequest
.
getFile
(
"file"
);
String
originalFilename
=
requestFile
.
getOriginalFilename
();
if
(!
originalFilename
.
endsWith
(
ExcelTypeEnum
.
XLS
.
getValue
())
&&
!
originalFilename
.
endsWith
(
ExcelTypeEnum
.
XLSX
.
getValue
()))
{
logger
.
error
(
"Excel导入错误文件名称:{}"
,
originalFilename
);
return
false
;
}
else
{
if
(!
originalFilename
.
contains
(
type
))
{
logger
.
error
(
"导入的不是非空性校验规则文件:{}"
,
originalFilename
);
return
false
;
}
}
return
true
;
}
}
src/main/java/com/gmei/data/dqmp/domain/TblSqlCheckDuplex.java
View file @
63f84a83
...
...
@@ -25,6 +25,8 @@ public class TblSqlCheckDuplex {
private
String
comment
;
private
Integer
parentId
;
private
Date
createTime
;
private
String
sqlContent
;
...
...
@@ -117,6 +119,14 @@ public class TblSqlCheckDuplex {
this
.
comment
=
comment
==
null
?
null
:
comment
.
trim
();
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlCheckDuplexCriteria.java
View file @
63f84a83
...
...
@@ -855,6 +855,66 @@ public class TblSqlCheckDuplexCriteria {
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNull
()
{
addCriterion
(
"parent_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNotNull
()
{
addCriterion
(
"parent_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id ="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <>"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"parent_id >"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id >="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThan
(
Integer
value
)
{
addCriterion
(
"parent_id <"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id not in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id not between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlCheckSingle.java
View file @
63f84a83
...
...
@@ -19,6 +19,8 @@ public class TblSqlCheckSingle {
private
String
comment
;
private
Integer
parentId
;
private
Date
createTime
;
private
String
sqlContent
;
...
...
@@ -87,6 +89,14 @@ public class TblSqlCheckSingle {
this
.
comment
=
comment
==
null
?
null
:
comment
.
trim
();
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlCheckSingleCriteria.java
View file @
63f84a83
...
...
@@ -645,6 +645,66 @@ public class TblSqlCheckSingleCriteria {
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNull
()
{
addCriterion
(
"parent_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNotNull
()
{
addCriterion
(
"parent_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id ="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <>"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"parent_id >"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id >="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThan
(
Integer
value
)
{
addCriterion
(
"parent_id <"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id not in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id not between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlMonitorSpecial.java
View file @
63f84a83
...
...
@@ -23,6 +23,8 @@ public class TblSqlMonitorSpecial {
private
String
comment
;
private
Integer
parentId
;
private
Date
createTime
;
private
String
sqlContent
;
...
...
@@ -107,6 +109,14 @@ public class TblSqlMonitorSpecial {
this
.
comment
=
comment
==
null
?
null
:
comment
.
trim
();
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlMonitorSpecialCriteria.java
View file @
63f84a83
...
...
@@ -785,6 +785,66 @@ public class TblSqlMonitorSpecialCriteria {
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNull
()
{
addCriterion
(
"parent_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNotNull
()
{
addCriterion
(
"parent_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id ="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <>"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"parent_id >"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id >="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThan
(
Integer
value
)
{
addCriterion
(
"parent_id <"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id not in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id not between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlMonitorVolatility.java
View file @
63f84a83
...
...
@@ -19,6 +19,8 @@ public class TblSqlMonitorVolatility {
private
String
comment
;
private
Integer
parentId
;
private
Date
createTime
;
private
String
sqlContent
;
...
...
@@ -87,6 +89,14 @@ public class TblSqlMonitorVolatility {
this
.
comment
=
comment
==
null
?
null
:
comment
.
trim
();
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
...
...
src/main/java/com/gmei/data/dqmp/domain/TblSqlMonitorVolatilityCriteria.java
View file @
63f84a83
...
...
@@ -645,6 +645,66 @@ public class TblSqlMonitorVolatilityCriteria {
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNull
()
{
addCriterion
(
"parent_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIsNotNull
()
{
addCriterion
(
"parent_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id ="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <>"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"parent_id >"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id >="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThan
(
Integer
value
)
{
addCriterion
(
"parent_id <"
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"parent_id <="
,
value
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"parent_id not in"
,
values
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andParentIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"parent_id not between"
,
value1
,
value2
,
"parentId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
...
...
src/main/java/com/gmei/data/dqmp/service/DqRuleService.java
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
service
;
import
java.util.List
;
import
com.gmei.data.dqmp.vo.DqReferRuleVo
;
import
com.gmei.data.dqmp.vo.DqRuleVo
;
import
com.gmei.data.dqmp.vo.DqSpecialRuleVo
;
import
com.gmei.data.dqmp.vo.DqUnblankRuleVo
;
import
com.gmei.data.dqmp.vo.DqUniqueRuleVo
;
import
com.gmei.data.dqmp.vo.DqVolatilityRuleVo
;
public
interface
DqRuleService
{
Boolean
addDqRule
(
DqRuleVo
dqRuleVo
);
List
<
DqUniqueRuleVo
>
findUniqueDqRuleList
();
List
<
DqUnblankRuleVo
>
findUnblankDqRuleList
();
List
<
DqReferRuleVo
>
findReferDqRuleList
();
List
<
DqVolatilityRuleVo
>
findVolatilityDqRuleList
();
List
<
DqSpecialRuleVo
>
findSpecialDqRuleList
();
Boolean
delDqRule
(
DqRuleVo
dqRuleVo
);
}
src/main/java/com/gmei/data/dqmp/service/impl/DqRuleServiceImpl.java
View file @
63f84a83
This diff is collapsed.
Click to expand it.
src/main/java/com/gmei/data/dqmp/vo/BaseVo.java
View file @
63f84a83
...
...
@@ -3,7 +3,7 @@ package com.gmei.data.dqmp.vo;
public
class
BaseVo
{
private
int
status
=
0
;
private
String
msg
=
"success!"
;
private
String
user
;
//
private String user;
public
BaseVo
()
{
}
...
...
@@ -29,11 +29,11 @@ public class BaseVo {
this
.
msg
=
msg
;
}
public
String
getUser
()
{
return
user
;
}
public
void
setUser
(
String
user
)
{
this
.
user
=
user
;
}
//
public String getUser() {
//
return user;
//
}
//
//
public void setUser(String user) {
//
this.user = user;
//
}
}
src/main/java/com/gmei/data/dqmp/vo/DqReferRuleVo.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
vo
;
import
lombok.Data
;
@Data
public
class
DqReferRuleVo
{
private
Integer
id
;
private
String
checkType
;
private
String
status
;
private
String
checkTime
;
private
String
checkDbName
;
private
String
checkTbName
;
private
String
checkColName
;
private
String
checkFilters
;
private
String
referDbName
;
private
String
referTbName
;
private
String
referColName
;
private
String
referFilters
;
private
String
comment
;
}
src/main/java/com/gmei/data/dqmp/vo/DqRuleVo.java
View file @
63f84a83
...
...
@@ -33,6 +33,8 @@ public class DqRuleVo extends BaseVo{
private
String
checkFilters
;
private
String
referFilters
;
private
Integer
id
;
public
DqRuleVo
()
{
super
();
}
...
...
@@ -161,6 +163,15 @@ public class DqRuleVo extends BaseVo{
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
@Override
public
String
toString
()
{
...
...
src/main/java/com/gmei/data/dqmp/vo/DqSpecialRuleVo.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
vo
;
import
lombok.Data
;
@Data
public
class
DqSpecialRuleVo
{
private
Integer
id
;
private
String
checkType
;
private
String
status
;
private
String
checkTime
;
private
String
dbName
;
private
String
tbName
;
private
String
colName
;
private
String
timeColName
;
private
String
indicatorType
;
private
String
startTime
;
private
String
filters
;
private
String
comment
;
}
src/main/java/com/gmei/data/dqmp/vo/DqUnblankRuleVo.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
vo
;
import
lombok.Data
;
@Data
public
class
DqUnblankRuleVo
{
private
Integer
id
;
private
String
checkType
;
private
String
status
;
private
String
checkTime
;
private
String
dbName
;
private
String
tbName
;
private
String
colName
;
private
String
filters
;
private
String
comment
;
}
src/main/java/com/gmei/data/dqmp/vo/DqUniqueRuleVo.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
vo
;
import
lombok.Data
;
@Data
public
class
DqUniqueRuleVo
{
private
Integer
id
;
private
String
checkType
;
private
String
status
;
private
String
checkTime
;
private
String
dbName
;
private
String
tbName
;
private
String
colName
;
private
String
filters
;
private
String
comment
;
}
src/main/java/com/gmei/data/dqmp/vo/DqVolatilityRuleVo.java
0 → 100644
View file @
63f84a83
package
com
.
gmei
.
data
.
dqmp
.
vo
;
import
lombok.Data
;
@Data
public
class
DqVolatilityRuleVo
{
private
Integer
id
;
private
String
checkType
;
private
String
status
;
private
String
checkTime
;
private
String
dbName
;
private
String
tbName
;
private
String
colName
;
private
String
indicatorType
;
private
String
filters
;
private
String
comment
;
}
src/main/resources/application-dev.yml
View file @
63f84a83
...
...
@@ -6,6 +6,8 @@ spring:
#---thymeleaf config ---
thymeleaf
:
cache
:
false
content-type
:
text/html
mode
:
LEGACYHTML5
#---email config---
mail
:
...
...
src/main/resources/application-prod.yml
View file @
63f84a83
...
...
@@ -6,6 +6,8 @@ spring:
#---thymeleaf config ---
thymeleaf
:
cache
:
false
content-type
:
text/html
mode
:
LEGACYHTML5
#---email config---
mail
:
...
...
src/main/resources/application-test.yml
View file @
63f84a83
...
...
@@ -6,6 +6,8 @@ spring:
#---thymeleaf config ---
thymeleaf
:
cache
:
false
content-type
:
text/html
mode
:
LEGACYHTML5
#---email config---
mail
:
...
...
src/main/resources/generator.xml
View file @
63f84a83
...
...
@@ -35,19 +35,23 @@
<!-- 需要生成的数据库表 -->
<!-- <table tableName="tbl_client_version_info" domainObjectName="TblClientVersionInfo"/> -->
<
!-- <table tableName="tbl_sql_check_single" domainObjectName="TblSqlCheckSingle"/> --
>
<
table
tableName=
"tbl_sql_check_single"
domainObjectName=
"TblSqlCheckSingle"
/
>
<table
tableName=
"tbl_sql_check_duplex"
domainObjectName=
"TblSqlCheckDuplex"
/>
<
!-- <
table tableName="tbl_sql_monitor_volatility" domainObjectName="TblSqlMonitorVolatility"/>
<table
tableName=
"tbl_sql_monitor_volatility"
domainObjectName=
"TblSqlMonitorVolatility"
/>
<table
tableName=
"tbl_sql_monitor_special"
domainObjectName=
"TblSqlMonitorSpecial"
/>
<table tableName="tbl_result_check_unique" domainObjectName="TblResultCheckUnique"/>
<
!-- <
table tableName="tbl_result_check_unique" domainObjectName="TblResultCheckUnique"/>
<table tableName="tbl_result_check_unblank" domainObjectName="TblResultCheckUnblank"/>
<table tableName="tbl_result_check_refer" domainObjectName="TblResultCheckRefer"/>
<table tableName="tbl_result_monitor_volatility" domainObjectName="TblResultMonitorVolatility"/>
<table tableName="tbl_result_monitor_special" domainObjectName="TblResultMonitorSpecial"/>
<table tableName="tbl_indicator_operator_info" domainObjectName="TblIndicatorOperatorInfo"/> -->
<!-- <table tableName="tbl_rule_template" domainObjectName="TblRuleTemplate"/> -->
<!-- <table tableName="tbl_rule_info_simple" domainObjectName="TblRuleInfoSimple"/>
<table tableName="tbl_rule_info_duplex" domainObjectName="TblRuleInfoDuplex"/> -->
<table
tableName=
"tbl_rule_info_simple"
domainObjectName=
"TblRuleInfoSimple"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<table
tableName=
"tbl_rule_info_duplex"
domainObjectName=
"TblRuleInfoDuplex"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<!-- <table tableName="tbl_sys_param_info" domainObjectName="TblSysParamInfo"/> -->
</context>
</generatorConfiguration>
src/main/resources/mybatis/mapper/TblRuleInfoDuplexMapper.xml
View file @
63f84a83
...
...
@@ -133,23 +133,26 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.gmei.data.dqmp.domain.TblRuleInfoDuplexWithBLOBs"
>
insert into tbl_rule_info_duplex (id, check_type, check_db_name,
check_tb_name, check_col_name, refer_db_name,
refer_tb_name, refer_col_name, is_valid,
check_time, comment, create_time,
check_filters, refer_filters)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR},
#{checkTbName,jdbcType=VARCHAR}, #{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR},
#{referTbName,jdbcType=VARCHAR}, #{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{checkFilters,jdbcType=LONGVARCHAR}, #{referFilters,jdbcType=LONGVARCHAR})
<selectKey
resultType=
"java.lang.Integer"
keyProperty=
"id"
order=
"AFTER"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tbl_rule_info_duplex (check_type, check_db_name, check_tb_name,
check_col_name, refer_db_name, refer_tb_name,
refer_col_name, is_valid, check_time,
comment, create_time, check_filters,
refer_filters)
values (#{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR}, #{checkTbName,jdbcType=VARCHAR},
#{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR}, #{referTbName,jdbcType=VARCHAR},
#{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{checkTime,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{checkFilters,jdbcType=LONGVARCHAR},
#{referFilters,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblRuleInfoDuplexWithBLOBs"
>
<selectKey
resultType=
"java.lang.Integer"
keyProperty=
"id"
order=
"AFTER"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tbl_rule_info_duplex
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"checkType != null"
>
check_type,
</if>
...
...
@@ -191,9 +194,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"checkType != null"
>
#{checkType,jdbcType=VARCHAR},
</if>
...
...
src/main/resources/mybatis/mapper/TblRuleInfoSimpleMapper.xml
View file @
63f84a83
...
...
@@ -132,23 +132,26 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.gmei.data.dqmp.domain.TblRuleInfoSimple"
>
insert into tbl_rule_info_simple (id, check_type, db_name,
tb_name, col_name, time_col_name,
indicator_type, start_time, is_valid,
check_time, comment, create_time,
filters)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR},
#{tbName,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR},
#{indicatorType,jdbcType=VARCHAR}, #{startTime,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{filters,jdbcType=LONGVARCHAR})
<selectKey
resultType=
"java.lang.Integer"
keyProperty=
"id"
order=
"AFTER"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tbl_rule_info_simple (check_type, db_name, tb_name,
col_name, time_col_name, indicator_type,
start_time, is_valid, check_time,
comment, create_time, filters
)
values (#{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR},
#{startTime,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{checkTime,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{filters,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblRuleInfoSimple"
>
<selectKey
resultType=
"java.lang.Integer"
keyProperty=
"id"
order=
"AFTER"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tbl_rule_info_simple
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"checkType != null"
>
check_type,
</if>
...
...
@@ -187,9 +190,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"checkType != null"
>
#{checkType,jdbcType=VARCHAR},
</if>
...
...
src/main/resources/mybatis/mapper/TblSqlCheckDuplexMapper.xml
View file @
63f84a83
...
...
@@ -13,6 +13,7 @@
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"INTEGER"
/>
<result
column=
"check_time"
property=
"checkTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"comment"
property=
"comment"
jdbcType=
"VARCHAR"
/>
<result
column=
"parent_id"
property=
"parentId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.gmei.data.dqmp.domain.TblSqlCheckDuplex"
extends=
"BaseResultMap"
>
...
...
@@ -78,7 +79,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
id, check_type, check_db_name, check_tb_name, check_col_name, refer_db_name, refer_tb_name,
refer_col_name, is_valid, check_time, comment, create_time
refer_col_name, is_valid, check_time, comment,
parent_id,
create_time
</sql>
<sql
id=
"Blob_Column_List"
>
sql_content
...
...
@@ -135,13 +136,13 @@
insert into tbl_sql_check_duplex (id, check_type, check_db_name,
check_tb_name, check_col_name, refer_db_name,
refer_tb_name, refer_col_name, is_valid,
check_time, comment,
create_time
,
sql_content)
check_time, comment,
parent_id
,
create_time,
sql_content)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR},
#{checkTbName,jdbcType=VARCHAR}, #{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR},
#{referTbName,jdbcType=VARCHAR}, #{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
createTime,jdbcType=TIMESTAMP
},
#{sqlContent,jdbcType=LONGVARCHAR})
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
parentId,jdbcType=INTEGER
},
#{
createTime,jdbcType=TIMESTAMP}, #{
sqlContent,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlCheckDuplex"
>
insert into tbl_sql_check_duplex
...
...
@@ -179,6 +180,9 @@
<if
test=
"comment != null"
>
comment,
</if>
<if
test=
"parentId != null"
>
parent_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -220,6 +224,9 @@
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
#{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -270,6 +277,9 @@
<if
test=
"record.comment != null"
>
comment = #{record.comment,jdbcType=VARCHAR},
</if>
<if
test=
"record.parentId != null"
>
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -294,6 +304,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -313,6 +324,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -351,6 +363,9 @@
<if
test=
"comment != null"
>
comment = #{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -372,6 +387,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
...
...
@@ -388,6 +404,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
...
...
src/main/resources/mybatis/mapper/TblSqlCheckSingleMapper.xml
View file @
63f84a83
...
...
@@ -10,6 +10,7 @@
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"INTEGER"
/>
<result
column=
"check_time"
property=
"checkTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"comment"
property=
"comment"
jdbcType=
"VARCHAR"
/>
<result
column=
"parent_id"
property=
"parentId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.gmei.data.dqmp.domain.TblSqlCheckSingle"
extends=
"BaseResultMap"
>
...
...
@@ -74,7 +75,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, check_type, db_name, tb_name, col_name, is_valid, check_time, comment, create_time
id, check_type, db_name, tb_name, col_name, is_valid, check_time, comment, parent_id,
create_time
</sql>
<sql
id=
"Blob_Column_List"
>
sql_content
...
...
@@ -130,12 +132,12 @@
<insert
id=
"insert"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlCheckSingle"
>
insert into tbl_sql_check_single (id, check_type, db_name,
tb_name, col_name, is_valid,
check_time, comment,
create_time
,
sql_content)
check_time, comment,
parent_id
,
create_time,
sql_content)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR},
#{tbName,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
createTime,jdbcType=TIMESTAMP
},
#{sqlContent,jdbcType=LONGVARCHAR})
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
parentId,jdbcType=INTEGER
},
#{
createTime,jdbcType=TIMESTAMP}, #{
sqlContent,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlCheckSingle"
>
insert into tbl_sql_check_single
...
...
@@ -164,6 +166,9 @@
<if
test=
"comment != null"
>
comment,
</if>
<if
test=
"parentId != null"
>
parent_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -196,6 +201,9 @@
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
#{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -237,6 +245,9 @@
<if
test=
"record.comment != null"
>
comment = #{record.comment,jdbcType=VARCHAR},
</if>
<if
test=
"record.parentId != null"
>
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -258,6 +269,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -274,6 +286,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -303,6 +316,9 @@
<if
test=
"comment != null"
>
comment = #{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -321,6 +337,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
...
...
@@ -334,6 +351,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
...
...
src/main/resources/mybatis/mapper/TblSqlMonitorSpecialMapper.xml
View file @
63f84a83
...
...
@@ -12,6 +12,7 @@
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"INTEGER"
/>
<result
column=
"check_time"
property=
"checkTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"comment"
property=
"comment"
jdbcType=
"VARCHAR"
/>
<result
column=
"parent_id"
property=
"parentId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.gmei.data.dqmp.domain.TblSqlMonitorSpecial"
extends=
"BaseResultMap"
>
...
...
@@ -77,7 +78,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
id, db_name, tb_name, col_name, time_col_name, indicator_type, start_time, is_valid,
check_time, comment, create_time
check_time, comment,
parent_id,
create_time
</sql>
<sql
id=
"Blob_Column_List"
>
sql_content
...
...
@@ -134,13 +135,13 @@
insert into tbl_sql_monitor_special (id, db_name, tb_name,
col_name, time_col_name, indicator_type,
start_time, is_valid, check_time,
comment,
create_time, sql_content
)
comment,
parent_id, create_time,
sql_content
)
values (#{id,jdbcType=INTEGER}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR},
#{startTime,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{checkTime,jdbcType=VARCHAR},
#{comment,jdbcType=VARCHAR}, #{
createTime,jdbcType=TIMESTAMP}, #{sqlContent,jdbcType=LONGVARCHAR}
)
#{comment,jdbcType=VARCHAR}, #{
parentId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{sqlContent,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlMonitorSpecial"
>
insert into tbl_sql_monitor_special
...
...
@@ -175,6 +176,9 @@
<if
test=
"comment != null"
>
comment,
</if>
<if
test=
"parentId != null"
>
parent_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -213,6 +217,9 @@
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
#{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -260,6 +267,9 @@
<if
test=
"record.comment != null"
>
comment = #{record.comment,jdbcType=VARCHAR},
</if>
<if
test=
"record.parentId != null"
>
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -283,6 +293,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -301,6 +312,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -336,6 +348,9 @@
<if
test=
"comment != null"
>
comment = #{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -356,6 +371,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
...
...
@@ -371,6 +387,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
...
...
src/main/resources/mybatis/mapper/TblSqlMonitorVolatilityMapper.xml
View file @
63f84a83
...
...
@@ -10,6 +10,7 @@
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"INTEGER"
/>
<result
column=
"check_time"
property=
"checkTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"comment"
property=
"comment"
jdbcType=
"VARCHAR"
/>
<result
column=
"parent_id"
property=
"parentId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.gmei.data.dqmp.domain.TblSqlMonitorVolatility"
extends=
"BaseResultMap"
>
...
...
@@ -74,7 +75,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, db_name, tb_name, col_name, indicator_type, is_valid, check_time, comment, create_time
id, db_name, tb_name, col_name, indicator_type, is_valid, check_time, comment, parent_id,
create_time
</sql>
<sql
id=
"Blob_Column_List"
>
sql_content
...
...
@@ -130,12 +132,12 @@
<insert
id=
"insert"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlMonitorVolatility"
>
insert into tbl_sql_monitor_volatility (id, db_name, tb_name,
col_name, indicator_type, is_valid,
check_time, comment,
create_time
,
sql_content)
check_time, comment,
parent_id
,
create_time,
sql_content)
values (#{id,jdbcType=INTEGER}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{colName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
createTime,jdbcType=TIMESTAMP
},
#{sqlContent,jdbcType=LONGVARCHAR})
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{
parentId,jdbcType=INTEGER
},
#{
createTime,jdbcType=TIMESTAMP}, #{
sqlContent,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gmei.data.dqmp.domain.TblSqlMonitorVolatility"
>
insert into tbl_sql_monitor_volatility
...
...
@@ -164,6 +166,9 @@
<if
test=
"comment != null"
>
comment,
</if>
<if
test=
"parentId != null"
>
parent_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -196,6 +201,9 @@
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
#{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -237,6 +245,9 @@
<if
test=
"record.comment != null"
>
comment = #{record.comment,jdbcType=VARCHAR},
</if>
<if
test=
"record.parentId != null"
>
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -258,6 +269,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -274,6 +286,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -303,6 +316,9 @@
<if
test=
"comment != null"
>
comment = #{comment,jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -321,6 +337,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
...
...
@@ -334,6 +351,7 @@
is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
...
...
src/main/resources/templates/index.html
0 → 100644
View file @
63f84a83
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<title>
WT
</title>
</head>
<style
type=
"text/css"
>
.table
{
width
:
100%
;
margin
:
auto
;
}
.tableCenter
{
text-align
:
center
;
}
</style>
<body>
<div
style=
"text-align: center"
>
<h1>
数据质量管理平台
</h1>
<hr></hr>
<h2>
数据质量规则导入
</h2>
<form
action=
"/excel/importUnique"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
></input>
<button
type=
"submit"
>
唯一性质量规则上传
</button>
</form>
<form
action=
"/excel/importUnblank"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
></input>
<button
type=
"submit"
>
非空性质量规则上传
</button>
</form>
<form
action=
"/excel/importRefer"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
></input>
<button
type=
"submit"
>
参照性质量规则上传
</button>
</form>
<form
action=
"/excel/importVolatility"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
></input>
<button
type=
"submit"
>
波动性质量规则上传
</button>
</form>
<form
action=
"/excel/importSpecial"
method=
"post"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"file"
></input>
<button
type=
"submit"
>
特殊性质量规则上传
</button>
</form>
<hr></hr>
<h2>
数据质量规则列表查询
</h2>
<h3>
唯一性校验规则列表
</h3>
<div
class=
"tableCenter"
>
<table
class=
"table"
style=
"table-layout: fixed;"
>
<tr>
<th>
序号
</th>
<th>
数据库名
</th>
<th>
数据表名
</th>
<th>
数据列名
</th>
<th>
过滤条件
</th>
<th>
当前状态
</th>
<th>
校验时间
</th>
<th>
备注
</th>
<th>
操作
</th>
</tr>
<tr
th:each=
"dqRule,dqRuleStat : ${uniqueList}"
>
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th
th:text=
"${dqRule.id}"
></th>
<td
th:text=
"${dqRule.dbName}"
></td>
<td
th:text=
"${dqRule.tbName}"
></td>
<th
th:text=
"${dqRule.colName}"
></th>
<th
th:text=
"${dqRule.filters}"
></th>
<th
th:text=
"${dqRule.status}"
></th>
<th
th:text=
"${dqRule.checkTime}"
></th>
<th
th:text=
"${dqRule.comment}"
></th>
<td><a
th:href=
"@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}"
>
删除
</a></td>
</tr>
</table>
</div>
<h3>
非空性校验规则列表
</h3>
<div
class=
"tableCenter"
>
<table
class=
"table"
style=
"table-layout: fixed;"
>
<tr>
<th>
序号
</th>
<th>
数据库名
</th>
<th>
数据表名
</th>
<th>
数据列名
</th>
<th>
过滤条件
</th>
<th>
当前状态
</th>
<th>
校验时间
</th>
<th>
备注
</th>
<th>
操作
</th>
</tr>
<tr
th:each=
"dqRule,dqRuleStat : ${unblankList}"
>
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th
th:text=
"${dqRule.id}"
></th>
<td
th:text=
"${dqRule.dbName}"
></td>
<td
th:text=
"${dqRule.tbName}"
></td>
<th
th:text=
"${dqRule.colName}"
></th>
<th
th:text=
"${dqRule.filters}"
></th>
<th
th:text=
"${dqRule.status}"
></th>
<th
th:text=
"${dqRule.checkTime}"
></th>
<th
th:text=
"${dqRule.comment}"
></th>
<td><a
th:href=
"@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}"
>
删除
</a></td>
</tr>
</table>
</div>
<h3>
参照性校验规则列表
</h3>
<div
class=
"tableCenter"
>
<table
class=
"table"
style=
"table-layout: fixed;"
>
<tr>
<th>
序号
</th>
<th>
校验数据库名
</th>
<th>
校验数据表名
</th>
<th>
校验数据列名
</th>
<th>
校验过滤条件
</th>
<th>
参照数据库名
</th>
<th>
参照数据表名
</th>
<th>
参照数据列名
</th>
<th>
参照过滤条件
</th>
<th>
当前状态
</th>
<th>
校验时间
</th>
<th>
备注
</th>
<th>
操作
</th>
</tr>
<tr
th:each=
"dqRule,dqRuleStat : ${referList}"
>
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th
th:text=
"${dqRule.id}"
></th>
<td
th:text=
"${dqRule.checkDbName}"
></td>
<td
th:text=
"${dqRule.checkTbName}"
></td>
<th
th:text=
"${dqRule.checkColName}"
></th>
<th
th:text=
"${dqRule.checkFilters}"
></th>
<td
th:text=
"${dqRule.referDbName}"
></td>
<td
th:text=
"${dqRule.referTbName}"
></td>
<th
th:text=
"${dqRule.referColName}"
></th>
<th
th:text=
"${dqRule.referFilters}"
></th>
<th
th:text=
"${dqRule.status}"
></th>
<th
th:text=
"${dqRule.checkTime}"
></th>
<th
th:text=
"${dqRule.comment}"
></th>
<td><a
th:href=
"@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}"
>
删除
</a></td>
</tr>
</table>
</div>
<h3>
波动性校验规则列表
</h3>
<div
class=
"tableCenter"
>
<table
class=
"table"
style=
"table-layout: fixed;"
>
<tr>
<th>
序号
</th>
<th>
数据库名
</th>
<th>
数据表名
</th>
<th>
数据列名
</th>
<th>
指标类型
</th>
<th>
过滤条件
</th>
<th>
当前状态
</th>
<th>
校验时间
</th>
<th>
备注
</th>
<th>
操作
</th>
</tr>
<tr
th:each=
"dqRule,dqRuleStat : ${volatilityList}"
>
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th
th:text=
"${dqRule.id}"
></th>
<td
th:text=
"${dqRule.dbName}"
></td>
<td
th:text=
"${dqRule.tbName}"
></td>
<th
th:text=
"${dqRule.colName}"
></th>
<th
th:text=
"${dqRule.indicatorType}"
></th>
<th
th:text=
"${dqRule.filters}"
></th>
<th
th:text=
"${dqRule.status}"
></th>
<th
th:text=
"${dqRule.checkTime}"
></th>
<th
th:text=
"${dqRule.comment}"
></th>
<td><a
th:href=
"@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}"
>
删除
</a></td>
</tr>
</table>
</div>
<h3>
特殊性校验规则列表
</h3>
<div
class=
"tableCenter"
>
<table
class=
"table"
style=
"table-layout: fixed;"
>
<tr>
<th>
序号
</th>
<th>
数据库名
</th>
<th>
数据表名
</th>
<th>
数据列名
</th>
<th>
数据时间列名
</th>
<th>
指标类型
</th>
<th>
数据校验起始时间
</th>
<th>
过滤条件
</th>
<th>
当前状态
</th>
<th>
校验时间
</th>
<th>
备注
</th>
<th>
操作
</th>
</tr>
<tr
th:each=
"dqRule,dqRuleStat : ${specialList}"
>
<!-- <th th:text="${dqRuleStat.index}"></th> -->
<th
th:text=
"${dqRule.id}"
></th>
<td
th:text=
"${dqRule.dbName}"
></td>
<td
th:text=
"${dqRule.tbName}"
></td>
<th
th:text=
"${dqRule.colName}"
></th>
<th
th:text=
"${dqRule.timeColName}"
></th>
<th
th:text=
"${dqRule.indicatorType}"
></th>
<th
th:text=
"${dqRule.startTime}"
></th>
<th
th:text=
"${dqRule.filters}"
></th>
<th
th:text=
"${dqRule.status}"
></th>
<th
th:text=
"${dqRule.checkTime}"
></th>
<th
th:text=
"${dqRule.comment}"
></th>
<td><a
th:href=
"@{/dqRule/del(id=${dqRule.id},checkType=${dqRule.checkType})}"
>
删除
</a></td>
</tr>
</table>
</div>
<hr></hr>
</div>
</body>
</html>
src/main/resources/templates/result.html
0 → 100644
View file @
63f84a83
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
></meta>
<title>
运行结果
</title>
</head>
<body>
<div
style=
"text-align: center"
>
<br></br>
执行结果:
<input
type=
"text"
th:value=
"${result}"
disabled=
"true"
style=
"width: 280px;"
/></input>
<hr></hr>
<div
style=
"text-align: center"
>
<a
href=
"/"
>
返回首页
</a>
</div>
</div>
</body>
</html>
src/main/resources/templates/static/img/logo.ico
0 → 100644
View file @
63f84a83
16.6 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment