Commit 63f84a83 authored by 赵建伟's avatar 赵建伟

add del rule、find rule list、front codes

parent 46d2f33b
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency> </dependency>
<!-- 集成热部署插件 --> <!-- 集成热部署插件 -->
<dependency> <dependency>
......
...@@ -36,9 +36,10 @@ public class Constants { ...@@ -36,9 +36,10 @@ public class Constants {
// 双表规则类型 // 双表规则类型
public static final String TABLE_DUPLEX = "duplex"; public static final String TABLE_DUPLEX = "duplex";
// public static final String CHECK_SIMPLE = "check_single"; public static final String UNIQUE = "unique";
// public static final String CHECK_MULTIPLE = "check_multiple"; public static final String UNBLANK = "unblank";
// public static final String MONITOR_VOLATILITY = "monitor_volatility"; public static final String REFER = "refer";
// public static final String MONITOR_SPECIAL = "monitor_special"; public static final String VOLATILITY = "volatility";
public static final String SPECIAL = "special";
} }
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";
}
}
...@@ -2,20 +2,21 @@ package com.gmei.data.dqmp.controller; ...@@ -2,20 +2,21 @@ package com.gmei.data.dqmp.controller;
import javax.validation.Valid; import javax.validation.Valid;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; 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.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; 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.service.DqRuleService;
import com.gmei.data.dqmp.vo.DqRuleVo; import com.gmei.data.dqmp.vo.DqRuleVo;
@RestController @Controller
@RequestMapping(value = "/dqrule") @RequestMapping(value = "/dqRule")
public class DqRuleController { public class DqRuleController extends BaseController{
@Autowired @Autowired
private DqRuleService dqRuleService; private DqRuleService dqRuleService;
...@@ -26,17 +27,29 @@ public class DqRuleController { ...@@ -26,17 +27,29 @@ public class DqRuleController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@ResponseBody
@RequestMapping(value = "/add", method = RequestMethod.POST) @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()) { if (bindingResult.hasErrors()) {
return new DqRuleVo(-1,bindingResult.getFieldError().getDefaultMessage()); return model(model,false,bindingResult.getFieldError().getDefaultMessage());
} }
Boolean isAddSuc = dqRuleService.addDqRule(dqRuleVo); Boolean isAddSuc = dqRuleService.addDqRule(dqRuleVo);
if(isAddSuc) { if(isAddSuc) {
return new DqRuleVo(); return model(model,true,"");
}else { }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,"数据质量规则删除失败!");
} }
} }
} }
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;
}
}
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";
}
}
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!");
}
}
}
package com.gmei.data.dqmp.controller; package com.gmei.data.dqmp.controller.api;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -8,18 +8,22 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,18 +8,22 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; 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.service.DqRuleService;
import com.gmei.data.dqmp.utils.ImportExcelUtils; import com.gmei.data.dqmp.utils.ImportExcelUtils;
import com.gmei.data.dqmp.vo.BaseVo; import com.gmei.data.dqmp.vo.BaseVo;
@RestController @RestController
@RequestMapping(value = "/excel") @RequestMapping(value = "/api/excel")
public class EasyExcelController { public class DqRuleImportApiController {
@Autowired @Autowired
private DqRuleService dqRuleService; private DqRuleService dqRuleService;
private static final Logger logger = LoggerFactory.getLogger(EasyExcelController.class); private static final Logger logger = LoggerFactory.getLogger(DqRuleImportApiController.class);
@PostMapping(value = "export") @PostMapping(value = "export")
public BaseVo exportExcel() { public BaseVo exportExcel() {
...@@ -28,6 +32,9 @@ public class EasyExcelController { ...@@ -28,6 +32,9 @@ public class EasyExcelController {
@PostMapping(value = "importUnique") @PostMapping(value = "importUnique")
public BaseVo importUniqueExcel(HttpServletRequest httpServletRequest) { public BaseVo importUniqueExcel(HttpServletRequest httpServletRequest) {
if(!checkIsLegal(httpServletRequest,Constants.UNIQUE)) {
return new BaseVo(-1,"上传的数据质量规则文件错误,请核实!");
}
try { try {
ImportExcelUtils.saxReadUniqueListString(httpServletRequest,dqRuleService); ImportExcelUtils.saxReadUniqueListString(httpServletRequest,dqRuleService);
}catch (Exception e) { }catch (Exception e) {
...@@ -39,6 +46,9 @@ public class EasyExcelController { ...@@ -39,6 +46,9 @@ public class EasyExcelController {
@PostMapping(value = "importUnblank") @PostMapping(value = "importUnblank")
public BaseVo importUnblankExcel(HttpServletRequest httpServletRequest) { public BaseVo importUnblankExcel(HttpServletRequest httpServletRequest) {
if(!checkIsLegal(httpServletRequest,Constants.UNBLANK)) {
return new BaseVo(-1,"上传的数据质量规则文件错误,请核实!");
}
try { try {
ImportExcelUtils.saxReadUnblankListString(httpServletRequest,dqRuleService); ImportExcelUtils.saxReadUnblankListString(httpServletRequest,dqRuleService);
}catch (Exception e) { }catch (Exception e) {
...@@ -50,6 +60,9 @@ public class EasyExcelController { ...@@ -50,6 +60,9 @@ public class EasyExcelController {
@PostMapping(value = "importRefer") @PostMapping(value = "importRefer")
public BaseVo importReferExcel(HttpServletRequest httpServletRequest) { public BaseVo importReferExcel(HttpServletRequest httpServletRequest) {
if(!checkIsLegal(httpServletRequest,Constants.REFER)) {
return new BaseVo(-1,"上传的数据质量规则文件错误,请核实!");
}
try { try {
ImportExcelUtils.saxReadReferListString(httpServletRequest,dqRuleService); ImportExcelUtils.saxReadReferListString(httpServletRequest,dqRuleService);
}catch (Exception e) { }catch (Exception e) {
...@@ -61,6 +74,9 @@ public class EasyExcelController { ...@@ -61,6 +74,9 @@ public class EasyExcelController {
@PostMapping(value = "importVolatility") @PostMapping(value = "importVolatility")
public BaseVo importVolatilityExcel(HttpServletRequest httpServletRequest) { public BaseVo importVolatilityExcel(HttpServletRequest httpServletRequest) {
if(!checkIsLegal(httpServletRequest,Constants.VOLATILITY)) {
return new BaseVo(-1,"上传的数据质量规则文件错误,请核实!");
}
try { try {
ImportExcelUtils.saxReadVolatilityListString(httpServletRequest,dqRuleService); ImportExcelUtils.saxReadVolatilityListString(httpServletRequest,dqRuleService);
}catch (Exception e) { }catch (Exception e) {
...@@ -72,6 +88,9 @@ public class EasyExcelController { ...@@ -72,6 +88,9 @@ public class EasyExcelController {
@PostMapping(value = "importSpecial") @PostMapping(value = "importSpecial")
public BaseVo importExcel(HttpServletRequest httpServletRequest) { public BaseVo importExcel(HttpServletRequest httpServletRequest) {
if(!checkIsLegal(httpServletRequest,Constants.SPECIAL)) {
return new BaseVo(-1,"上传的数据质量规则文件错误,请核实!");
}
try { try {
ImportExcelUtils.saxReadSpecialListString(httpServletRequest,dqRuleService); ImportExcelUtils.saxReadSpecialListString(httpServletRequest,dqRuleService);
}catch (Exception e) { }catch (Exception e) {
...@@ -81,4 +100,25 @@ public class EasyExcelController { ...@@ -81,4 +100,25 @@ public class EasyExcelController {
return new BaseVo(); 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;
}
} }
...@@ -25,6 +25,8 @@ public class TblSqlCheckDuplex { ...@@ -25,6 +25,8 @@ public class TblSqlCheckDuplex {
private String comment; private String comment;
private Integer parentId;
private Date createTime; private Date createTime;
private String sqlContent; private String sqlContent;
...@@ -117,6 +119,14 @@ public class TblSqlCheckDuplex { ...@@ -117,6 +119,14 @@ public class TblSqlCheckDuplex {
this.comment = comment == null ? null : comment.trim(); this.comment = comment == null ? null : comment.trim();
} }
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
......
...@@ -855,6 +855,66 @@ public class TblSqlCheckDuplexCriteria { ...@@ -855,6 +855,66 @@ public class TblSqlCheckDuplexCriteria {
return (Criteria) this; 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() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -19,6 +19,8 @@ public class TblSqlCheckSingle { ...@@ -19,6 +19,8 @@ public class TblSqlCheckSingle {
private String comment; private String comment;
private Integer parentId;
private Date createTime; private Date createTime;
private String sqlContent; private String sqlContent;
...@@ -87,6 +89,14 @@ public class TblSqlCheckSingle { ...@@ -87,6 +89,14 @@ public class TblSqlCheckSingle {
this.comment = comment == null ? null : comment.trim(); this.comment = comment == null ? null : comment.trim();
} }
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
......
...@@ -645,6 +645,66 @@ public class TblSqlCheckSingleCriteria { ...@@ -645,6 +645,66 @@ public class TblSqlCheckSingleCriteria {
return (Criteria) this; 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() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -23,6 +23,8 @@ public class TblSqlMonitorSpecial { ...@@ -23,6 +23,8 @@ public class TblSqlMonitorSpecial {
private String comment; private String comment;
private Integer parentId;
private Date createTime; private Date createTime;
private String sqlContent; private String sqlContent;
...@@ -107,6 +109,14 @@ public class TblSqlMonitorSpecial { ...@@ -107,6 +109,14 @@ public class TblSqlMonitorSpecial {
this.comment = comment == null ? null : comment.trim(); this.comment = comment == null ? null : comment.trim();
} }
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
......
...@@ -785,6 +785,66 @@ public class TblSqlMonitorSpecialCriteria { ...@@ -785,6 +785,66 @@ public class TblSqlMonitorSpecialCriteria {
return (Criteria) this; 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() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -19,6 +19,8 @@ public class TblSqlMonitorVolatility { ...@@ -19,6 +19,8 @@ public class TblSqlMonitorVolatility {
private String comment; private String comment;
private Integer parentId;
private Date createTime; private Date createTime;
private String sqlContent; private String sqlContent;
...@@ -87,6 +89,14 @@ public class TblSqlMonitorVolatility { ...@@ -87,6 +89,14 @@ public class TblSqlMonitorVolatility {
this.comment = comment == null ? null : comment.trim(); this.comment = comment == null ? null : comment.trim();
} }
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
......
...@@ -645,6 +645,66 @@ public class TblSqlMonitorVolatilityCriteria { ...@@ -645,6 +645,66 @@ public class TblSqlMonitorVolatilityCriteria {
return (Criteria) this; 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() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
......
package com.gmei.data.dqmp.service; 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.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 { public interface DqRuleService {
Boolean addDqRule(DqRuleVo dqRuleVo); Boolean addDqRule(DqRuleVo dqRuleVo);
List<DqUniqueRuleVo> findUniqueDqRuleList();
List<DqUnblankRuleVo> findUnblankDqRuleList();
List<DqReferRuleVo> findReferDqRuleList();
List<DqVolatilityRuleVo> findVolatilityDqRuleList();
List<DqSpecialRuleVo> findSpecialDqRuleList();
Boolean delDqRule(DqRuleVo dqRuleVo);
} }
...@@ -3,7 +3,7 @@ package com.gmei.data.dqmp.vo; ...@@ -3,7 +3,7 @@ package com.gmei.data.dqmp.vo;
public class BaseVo { public class BaseVo {
private int status = 0; private int status = 0;
private String msg = "success!"; private String msg = "success!";
private String user; //private String user;
public BaseVo() { public BaseVo() {
} }
...@@ -29,11 +29,11 @@ public class BaseVo { ...@@ -29,11 +29,11 @@ public class BaseVo {
this.msg = msg; this.msg = msg;
} }
public String getUser() { // public String getUser() {
return user; // return user;
} // }
//
public void setUser(String user) { // public void setUser(String user) {
this.user = user; // this.user = user;
} // }
} }
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;
}
...@@ -33,6 +33,8 @@ public class DqRuleVo extends BaseVo{ ...@@ -33,6 +33,8 @@ public class DqRuleVo extends BaseVo{
private String checkFilters; private String checkFilters;
private String referFilters; private String referFilters;
private Integer id;
public DqRuleVo() { public DqRuleVo() {
super(); super();
} }
...@@ -162,6 +164,15 @@ public class DqRuleVo extends BaseVo{ ...@@ -162,6 +164,15 @@ public class DqRuleVo extends BaseVo{
this.comment = comment; this.comment = comment;
} }
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override @Override
public String toString() { public String toString() {
return "DqRuleVo [checkType=" + checkType + ", isValid=" + isValid + ", checkTime=" + checkTime + ", comment=" return "DqRuleVo [checkType=" + checkType + ", isValid=" + isValid + ", checkTime=" + checkTime + ", comment="
......
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;
}
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;
}
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;
}
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;
}
...@@ -6,6 +6,8 @@ spring: ...@@ -6,6 +6,8 @@ spring:
#---thymeleaf config --- #---thymeleaf config ---
thymeleaf: thymeleaf:
cache: false cache: false
content-type: text/html
mode: LEGACYHTML5
#---email config--- #---email config---
mail: mail:
......
...@@ -6,6 +6,8 @@ spring: ...@@ -6,6 +6,8 @@ spring:
#---thymeleaf config --- #---thymeleaf config ---
thymeleaf: thymeleaf:
cache: false cache: false
content-type: text/html
mode: LEGACYHTML5
#---email config--- #---email config---
mail: mail:
......
...@@ -6,6 +6,8 @@ spring: ...@@ -6,6 +6,8 @@ spring:
#---thymeleaf config --- #---thymeleaf config ---
thymeleaf: thymeleaf:
cache: false cache: false
content-type: text/html
mode: LEGACYHTML5
#---email config--- #---email config---
mail: mail:
......
...@@ -35,19 +35,23 @@ ...@@ -35,19 +35,23 @@
<!-- 需要生成的数据库表 --> <!-- 需要生成的数据库表 -->
<!-- <table tableName="tbl_client_version_info" domainObjectName="TblClientVersionInfo"/> --> <!-- <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_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_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_unblank" domainObjectName="TblResultCheckUnblank"/>
<table tableName="tbl_result_check_refer" domainObjectName="TblResultCheckRefer"/> <table tableName="tbl_result_check_refer" domainObjectName="TblResultCheckRefer"/>
<table tableName="tbl_result_monitor_volatility" domainObjectName="TblResultMonitorVolatility"/> <table tableName="tbl_result_monitor_volatility" domainObjectName="TblResultMonitorVolatility"/>
<table tableName="tbl_result_monitor_special" domainObjectName="TblResultMonitorSpecial"/> <table tableName="tbl_result_monitor_special" domainObjectName="TblResultMonitorSpecial"/>
<table tableName="tbl_indicator_operator_info" domainObjectName="TblIndicatorOperatorInfo"/> --> <table tableName="tbl_indicator_operator_info" domainObjectName="TblIndicatorOperatorInfo"/> -->
<!-- <table tableName="tbl_rule_template" domainObjectName="TblRuleTemplate"/> --> <!-- <table tableName="tbl_rule_template" domainObjectName="TblRuleTemplate"/> -->
<!-- <table tableName="tbl_rule_info_simple" domainObjectName="TblRuleInfoSimple"/> <table tableName="tbl_rule_info_simple" domainObjectName="TblRuleInfoSimple">
<table tableName="tbl_rule_info_duplex" domainObjectName="TblRuleInfoDuplex"/> --> <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"/> --> <!-- <table tableName="tbl_sys_param_info" domainObjectName="TblSysParamInfo"/> -->
</context> </context>
</generatorConfiguration> </generatorConfiguration>
...@@ -133,23 +133,26 @@ ...@@ -133,23 +133,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoDuplexWithBLOBs" > <insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoDuplexWithBLOBs" >
insert into tbl_rule_info_duplex (id, check_type, check_db_name, <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
check_tb_name, check_col_name, refer_db_name, SELECT LAST_INSERT_ID()
refer_tb_name, refer_col_name, is_valid, </selectKey>
check_time, comment, create_time, insert into tbl_rule_info_duplex (check_type, check_db_name, check_tb_name,
check_filters, refer_filters) check_col_name, refer_db_name, refer_tb_name,
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR}, refer_col_name, is_valid, check_time,
#{checkTbName,jdbcType=VARCHAR}, #{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR}, comment, create_time, check_filters,
#{referTbName,jdbcType=VARCHAR}, #{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, refer_filters)
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, values (#{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR}, #{checkTbName,jdbcType=VARCHAR},
#{checkFilters,jdbcType=LONGVARCHAR}, #{referFilters,jdbcType=LONGVARCHAR}) #{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>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoDuplexWithBLOBs" > <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 insert into tbl_rule_info_duplex
<trim prefix="(" suffix=")" suffixOverrides="," > <trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="checkType != null" > <if test="checkType != null" >
check_type, check_type,
</if> </if>
...@@ -191,9 +194,6 @@ ...@@ -191,9 +194,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="checkType != null" > <if test="checkType != null" >
#{checkType,jdbcType=VARCHAR}, #{checkType,jdbcType=VARCHAR},
</if> </if>
......
...@@ -132,23 +132,26 @@ ...@@ -132,23 +132,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoSimple" > <insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoSimple" >
insert into tbl_rule_info_simple (id, check_type, db_name, <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
tb_name, col_name, time_col_name, SELECT LAST_INSERT_ID()
indicator_type, start_time, is_valid, </selectKey>
check_time, comment, create_time, insert into tbl_rule_info_simple (check_type, db_name, tb_name,
filters) col_name, time_col_name, indicator_type,
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR}, start_time, is_valid, check_time,
#{tbName,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR}, comment, create_time, filters
#{indicatorType,jdbcType=VARCHAR}, #{startTime,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, )
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, values (#{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{filters,jdbcType=LONGVARCHAR}) #{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>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblRuleInfoSimple" > <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 insert into tbl_rule_info_simple
<trim prefix="(" suffix=")" suffixOverrides="," > <trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="checkType != null" > <if test="checkType != null" >
check_type, check_type,
</if> </if>
...@@ -187,9 +190,6 @@ ...@@ -187,9 +190,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="checkType != null" > <if test="checkType != null" >
#{checkType,jdbcType=VARCHAR}, #{checkType,jdbcType=VARCHAR},
</if> </if>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<result column="is_valid" property="isValid" jdbcType="INTEGER" /> <result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="check_time" property="checkTime" jdbcType="VARCHAR" /> <result column="check_time" property="checkTime" jdbcType="VARCHAR" />
<result column="comment" property="comment" 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" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlCheckDuplex" extends="BaseResultMap" > <resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlCheckDuplex" extends="BaseResultMap" >
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
</sql> </sql>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, check_type, check_db_name, check_tb_name, check_col_name, refer_db_name, refer_tb_name, 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>
<sql id="Blob_Column_List" > <sql id="Blob_Column_List" >
sql_content sql_content
...@@ -135,13 +136,13 @@ ...@@ -135,13 +136,13 @@
insert into tbl_sql_check_duplex (id, check_type, check_db_name, insert into tbl_sql_check_duplex (id, check_type, check_db_name,
check_tb_name, check_col_name, refer_db_name, check_tb_name, check_col_name, refer_db_name,
refer_tb_name, refer_col_name, is_valid, refer_tb_name, refer_col_name, is_valid,
check_time, comment, create_time, check_time, comment, parent_id,
sql_content) create_time, sql_content)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{checkDbName,jdbcType=VARCHAR},
#{checkTbName,jdbcType=VARCHAR}, #{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR}, #{checkTbName,jdbcType=VARCHAR}, #{checkColName,jdbcType=VARCHAR}, #{referDbName,jdbcType=VARCHAR},
#{referTbName,jdbcType=VARCHAR}, #{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{referTbName,jdbcType=VARCHAR}, #{referColName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
#{sqlContent,jdbcType=LONGVARCHAR}) #{createTime,jdbcType=TIMESTAMP}, #{sqlContent,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckDuplex" > <insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckDuplex" >
insert into tbl_sql_check_duplex insert into tbl_sql_check_duplex
...@@ -179,6 +180,9 @@ ...@@ -179,6 +180,9 @@
<if test="comment != null" > <if test="comment != null" >
comment, comment,
</if> </if>
<if test="parentId != null" >
parent_id,
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time, create_time,
</if> </if>
...@@ -220,6 +224,9 @@ ...@@ -220,6 +224,9 @@
<if test="comment != null" > <if test="comment != null" >
#{comment,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -270,6 +277,9 @@ ...@@ -270,6 +277,9 @@
<if test="record.comment != null" > <if test="record.comment != null" >
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
</if> </if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" > <if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -294,6 +304,7 @@ ...@@ -294,6 +304,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR} sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if test="_parameter != null" > <if test="_parameter != null" >
...@@ -313,6 +324,7 @@ ...@@ -313,6 +324,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP} create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" > <if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -351,6 +363,9 @@ ...@@ -351,6 +363,9 @@
<if test="comment != null" > <if test="comment != null" >
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -372,6 +387,7 @@ ...@@ -372,6 +387,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR} sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -388,6 +404,7 @@ ...@@ -388,6 +404,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP} create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="is_valid" property="isValid" jdbcType="INTEGER" /> <result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="check_time" property="checkTime" jdbcType="VARCHAR" /> <result column="check_time" property="checkTime" jdbcType="VARCHAR" />
<result column="comment" property="comment" 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" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlCheckSingle" extends="BaseResultMap" > <resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlCheckSingle" extends="BaseResultMap" >
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List" > <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>
<sql id="Blob_Column_List" > <sql id="Blob_Column_List" >
sql_content sql_content
...@@ -130,12 +132,12 @@ ...@@ -130,12 +132,12 @@
<insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckSingle" > <insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckSingle" >
insert into tbl_sql_check_single (id, check_type, db_name, insert into tbl_sql_check_single (id, check_type, db_name,
tb_name, col_name, is_valid, tb_name, col_name, is_valid,
check_time, comment, create_time, check_time, comment, parent_id,
sql_content) create_time, sql_content)
values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{checkType,jdbcType=VARCHAR}, #{dbName,jdbcType=VARCHAR},
#{tbName,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{tbName,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
#{sqlContent,jdbcType=LONGVARCHAR}) #{createTime,jdbcType=TIMESTAMP}, #{sqlContent,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckSingle" > <insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlCheckSingle" >
insert into tbl_sql_check_single insert into tbl_sql_check_single
...@@ -164,6 +166,9 @@ ...@@ -164,6 +166,9 @@
<if test="comment != null" > <if test="comment != null" >
comment, comment,
</if> </if>
<if test="parentId != null" >
parent_id,
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time, create_time,
</if> </if>
...@@ -196,6 +201,9 @@ ...@@ -196,6 +201,9 @@
<if test="comment != null" > <if test="comment != null" >
#{comment,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -237,6 +245,9 @@ ...@@ -237,6 +245,9 @@
<if test="record.comment != null" > <if test="record.comment != null" >
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
</if> </if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" > <if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -258,6 +269,7 @@ ...@@ -258,6 +269,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR} sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if test="_parameter != null" > <if test="_parameter != null" >
...@@ -274,6 +286,7 @@ ...@@ -274,6 +286,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP} create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" > <if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -303,6 +316,9 @@ ...@@ -303,6 +316,9 @@
<if test="comment != null" > <if test="comment != null" >
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -321,6 +337,7 @@ ...@@ -321,6 +337,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR} sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -334,6 +351,7 @@ ...@@ -334,6 +351,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP} create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<result column="is_valid" property="isValid" jdbcType="INTEGER" /> <result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="check_time" property="checkTime" jdbcType="VARCHAR" /> <result column="check_time" property="checkTime" jdbcType="VARCHAR" />
<result column="comment" property="comment" 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" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlMonitorSpecial" extends="BaseResultMap" > <resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlMonitorSpecial" extends="BaseResultMap" >
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
</sql> </sql>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, db_name, tb_name, col_name, time_col_name, indicator_type, start_time, is_valid, 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>
<sql id="Blob_Column_List" > <sql id="Blob_Column_List" >
sql_content sql_content
...@@ -134,13 +135,13 @@ ...@@ -134,13 +135,13 @@
insert into tbl_sql_monitor_special (id, db_name, tb_name, insert into tbl_sql_monitor_special (id, db_name, tb_name,
col_name, time_col_name, indicator_type, col_name, time_col_name, indicator_type,
start_time, is_valid, check_time, 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}, values (#{id,jdbcType=INTEGER}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR}, #{colName,jdbcType=VARCHAR}, #{timeColName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR},
#{startTime,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{checkTime,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>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorSpecial" > <insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorSpecial" >
insert into tbl_sql_monitor_special insert into tbl_sql_monitor_special
...@@ -175,6 +176,9 @@ ...@@ -175,6 +176,9 @@
<if test="comment != null" > <if test="comment != null" >
comment, comment,
</if> </if>
<if test="parentId != null" >
parent_id,
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time, create_time,
</if> </if>
...@@ -213,6 +217,9 @@ ...@@ -213,6 +217,9 @@
<if test="comment != null" > <if test="comment != null" >
#{comment,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -260,6 +267,9 @@ ...@@ -260,6 +267,9 @@
<if test="record.comment != null" > <if test="record.comment != null" >
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
</if> </if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" > <if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -283,6 +293,7 @@ ...@@ -283,6 +293,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR} sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if test="_parameter != null" > <if test="_parameter != null" >
...@@ -301,6 +312,7 @@ ...@@ -301,6 +312,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP} create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" > <if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -336,6 +348,9 @@ ...@@ -336,6 +348,9 @@
<if test="comment != null" > <if test="comment != null" >
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -356,6 +371,7 @@ ...@@ -356,6 +371,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR} sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -371,6 +387,7 @@ ...@@ -371,6 +387,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP} create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="is_valid" property="isValid" jdbcType="INTEGER" /> <result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="check_time" property="checkTime" jdbcType="VARCHAR" /> <result column="check_time" property="checkTime" jdbcType="VARCHAR" />
<result column="comment" property="comment" 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" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" extends="BaseResultMap" > <resultMap id="ResultMapWithBLOBs" type="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" extends="BaseResultMap" >
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List" > <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>
<sql id="Blob_Column_List" > <sql id="Blob_Column_List" >
sql_content sql_content
...@@ -130,12 +132,12 @@ ...@@ -130,12 +132,12 @@
<insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" > <insert id="insert" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" >
insert into tbl_sql_monitor_volatility (id, db_name, tb_name, insert into tbl_sql_monitor_volatility (id, db_name, tb_name,
col_name, indicator_type, is_valid, col_name, indicator_type, is_valid,
check_time, comment, create_time, check_time, comment, parent_id,
sql_content) create_time, sql_content)
values (#{id,jdbcType=INTEGER}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{dbName,jdbcType=VARCHAR}, #{tbName,jdbcType=VARCHAR},
#{colName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER}, #{colName,jdbcType=VARCHAR}, #{indicatorType,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{checkTime,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
#{sqlContent,jdbcType=LONGVARCHAR}) #{createTime,jdbcType=TIMESTAMP}, #{sqlContent,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" > <insert id="insertSelective" parameterType="com.gmei.data.dqmp.domain.TblSqlMonitorVolatility" >
insert into tbl_sql_monitor_volatility insert into tbl_sql_monitor_volatility
...@@ -164,6 +166,9 @@ ...@@ -164,6 +166,9 @@
<if test="comment != null" > <if test="comment != null" >
comment, comment,
</if> </if>
<if test="parentId != null" >
parent_id,
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time, create_time,
</if> </if>
...@@ -196,6 +201,9 @@ ...@@ -196,6 +201,9 @@
<if test="comment != null" > <if test="comment != null" >
#{comment,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -237,6 +245,9 @@ ...@@ -237,6 +245,9 @@
<if test="record.comment != null" > <if test="record.comment != null" >
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
</if> </if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" > <if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -258,6 +269,7 @@ ...@@ -258,6 +269,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR} sql_content = #{record.sqlContent,jdbcType=LONGVARCHAR}
<if test="_parameter != null" > <if test="_parameter != null" >
...@@ -274,6 +286,7 @@ ...@@ -274,6 +286,7 @@
is_valid = #{record.isValid,jdbcType=INTEGER}, is_valid = #{record.isValid,jdbcType=INTEGER},
check_time = #{record.checkTime,jdbcType=VARCHAR}, check_time = #{record.checkTime,jdbcType=VARCHAR},
comment = #{record.comment,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP} create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" > <if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -303,6 +316,9 @@ ...@@ -303,6 +316,9 @@
<if test="comment != null" > <if test="comment != null" >
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
</if> </if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -321,6 +337,7 @@ ...@@ -321,6 +337,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
sql_content = #{sqlContent,jdbcType=LONGVARCHAR} sql_content = #{sqlContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
...@@ -334,6 +351,7 @@ ...@@ -334,6 +351,7 @@
is_valid = #{isValid,jdbcType=INTEGER}, is_valid = #{isValid,jdbcType=INTEGER},
check_time = #{checkTime,jdbcType=VARCHAR}, check_time = #{checkTime,jdbcType=VARCHAR},
comment = #{comment,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP} create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
<!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>
<!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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment