Merge branch 'master' of https://gitee.com/anji-plus/report
commit
f626d2ae60
@ -0,0 +1,13 @@
|
||||
----------------------------------------------------------------
|
||||
Thu Jun 24 13:44:40 CST 2021:
|
||||
Booting Derby version The Apache Software Foundation - Apache Derby - 10.14.2.0 - (1828579): instance a816c00e-017a-3c8c-7997-00000fdd7788
|
||||
on database directory memory:D:\anji-code\gitee\aj-report\55b30257-1477-453c-b5b1-a9bbd7a931a7 with class loader sun.misc.Launcher$AppClassLoader@18b4aac2
|
||||
Loaded from file:/C:/Users/raodeming/.m2/repository/org/apache/derby/derby/10.14.2.0/derby-10.14.2.0.jar
|
||||
java.vendor=Oracle Corporation
|
||||
java.runtime.version=1.8.0_191-b12
|
||||
user.dir=D:\anji-code\gitee\aj-report
|
||||
os.name=Windows 10
|
||||
os.arch=amd64
|
||||
os.version=10.0
|
||||
derby.system.home=null
|
||||
Database Class Loader started - derby.database.classpath=''
|
@ -1,14 +1,63 @@
|
||||
module.exports = {
|
||||
base: '/doc/',
|
||||
title: '大屏设计',
|
||||
description: '使用拖拽快速生成动态大屏报表',
|
||||
dest: 'dist',
|
||||
lastUpdated: 'Last Updated',
|
||||
theme: '',
|
||||
themeConfig: {
|
||||
logo: '/logo.png',
|
||||
smoothScroll: true,
|
||||
sidebarDepth: 2,
|
||||
|
||||
}
|
||||
base: '/doc/',
|
||||
title: '大屏设计',
|
||||
description: '使用拖拽快速生成动态大屏报表',
|
||||
dest: 'dist',
|
||||
lastUpdated: 'Last Updated',
|
||||
theme: '',
|
||||
themeConfig: {
|
||||
logo: '/logo.png',
|
||||
smoothScroll: true,
|
||||
sidebarDepth: 2,
|
||||
nav: [
|
||||
{text: '首页', link: '/'},
|
||||
{text: '指南', link: '/guide/'},
|
||||
{text: '操作手册', link: '/operation/'},
|
||||
{text: 'GitHub', link: 'https://github.com/anji-plus/report'},
|
||||
{text: 'Gitee', link: 'https://gitee.com/anji-plus/report'},
|
||||
],
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
{
|
||||
title: '文档',
|
||||
collapsable: false,
|
||||
children: [
|
||||
{title: '介绍', path: '/guide/'},
|
||||
{title: '快速入门', path: '/guide/quickly'},
|
||||
{title: '项目介绍', path: '/guide/productintro'},
|
||||
{title: '系统运行', path: '/guide/deploy'}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
collapsable: false,
|
||||
children: [
|
||||
{title: '常见问题', path: '/guide/question'}
|
||||
]
|
||||
}],
|
||||
'/operation/': [
|
||||
{
|
||||
title: '操作手册',
|
||||
collapsable: false,
|
||||
children: [
|
||||
{title: '数据源', path: '/operation/datasource'},
|
||||
{title: '数据集', path: '/operation/dataset'},
|
||||
{title: '大屏设计', path: '/operation/dashboard'},
|
||||
{title: '国际化', path: '/operation/i18n'},
|
||||
{title: '字典', path: '/operation/dict'},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
['@vuepress/back-to-top', true],
|
||||
],
|
||||
configureWebpack: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/.vuepress/public'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
# 开发手册
|
@ -0,0 +1,3 @@
|
||||
# 数据源
|
||||
|
||||
## 标题一
|
@ -1 +0,0 @@
|
||||
## 文档
|
@ -0,0 +1,150 @@
|
||||
package com.anjiplus.template.gaea.business.cache;
|
||||
|
||||
|
||||
import com.anji.plus.gaea.cache.CacheHelper;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.Cache;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class ReportCacheHelper implements CacheHelper, ApplicationContextAware {
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@Override
|
||||
public String stringGet(String key) {
|
||||
Cache.ValueWrapper valueWrapper = cache.get(key);
|
||||
if (valueWrapper != null) {
|
||||
return (String) valueWrapper.get();
|
||||
}
|
||||
return CacheHelper.super.stringGet(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean setIfAbsent(String key, String value) {
|
||||
cache.putIfAbsent(key, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean exist(String key) {
|
||||
String cacheHoldTime = stringGet(key + "_HoldTime");
|
||||
if (cacheHoldTime != null && Long.parseLong(cacheHoldTime) > 0) {
|
||||
if (Long.parseLong(cacheHoldTime) < System.currentTimeMillis()) {
|
||||
delete(key + "_HoldTime");
|
||||
delete(key);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return cache.get(key) != null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stringSet(String key, String value) {
|
||||
cache.put(key, value);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String regKey(String key) {
|
||||
return CacheHelper.super.regKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stringSetExpire(String key, String value, long seconds) {
|
||||
stringSet(key, value);
|
||||
if (seconds > 0) {
|
||||
//缓存失效时间
|
||||
stringSet(key + "_HoldTime", String.valueOf(System.currentTimeMillis() + seconds * 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> hashGet(String key) {
|
||||
Cache.ValueWrapper t = cache.get(key);
|
||||
if (t != null) {
|
||||
return (Map<String, String>) t.get();
|
||||
}
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String hashGetString(String key, String hashKey) {
|
||||
Map<String, String> stringStringMap = hashGet(key);
|
||||
return stringStringMap.get(hashKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashDel(String key, String hashKey) {
|
||||
Map<String, String> stringStringMap = hashGet(key);
|
||||
stringStringMap.remove(hashKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashBatchDel(String key, Set<String> hashKeys) {
|
||||
Map<String, String> stringStringMap = hashGet(key);
|
||||
hashKeys.forEach(stringStringMap::remove);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hashExist(String key, String hashKey) {
|
||||
if (exist(key)) {
|
||||
Map<String, String> map = hashGet(key);
|
||||
return map.containsKey(hashKey);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hashAnyExist(String key, String[] hashKeys) {
|
||||
return CacheHelper.super.hashAnyExist(key, hashKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashSet(String key, String hashKey, String hashValue) {
|
||||
Map<String, String> map;
|
||||
if (exist(key)) {
|
||||
map = hashGet(key);
|
||||
} else {
|
||||
map = new HashMap<>();
|
||||
}
|
||||
map.put(hashKey, hashValue);
|
||||
hashSet(key, map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashSet(String key, Map<String, String> hash) {
|
||||
cache.put(key, hash);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(String key) {
|
||||
if (exist(key)) {
|
||||
cache.evict(key);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delete(List<String> keys) {
|
||||
keys.forEach(this::delete);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
/*基于内存的本地缓存*/
|
||||
cache = (Cache) applicationContext.getBean("ehCacheCache");
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.anjiplus.template.gaea.business.filter;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anji.plus.gaea.bean.ResponseBean;
|
||||
import com.anji.plus.gaea.cache.CacheHelper;
|
||||
import com.anji.plus.gaea.utils.JwtBean;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 简单的鉴权
|
||||
* Created by raodeming on 2021/6/24.
|
||||
*/
|
||||
@Component
|
||||
public class TokenFilter implements Filter {
|
||||
@Autowired
|
||||
private CacheHelper cacheHelper;
|
||||
@Autowired
|
||||
private JwtBean jwtBean;
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
Filter.super.init(filterConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
String uri = request.getRequestURI();
|
||||
|
||||
if (!uri.startsWith("/login")) {
|
||||
|
||||
//获取token
|
||||
String authorization = request.getHeader("Authorization");
|
||||
if (StringUtils.isBlank(authorization)) {
|
||||
error(response);
|
||||
return;
|
||||
}
|
||||
|
||||
String username = jwtBean.getUsername(authorization);
|
||||
// String uuid = jwtBean.getUUID(authorization);
|
||||
|
||||
if (!cacheHelper.exist(username)) {
|
||||
error(response);
|
||||
return;
|
||||
}
|
||||
|
||||
//延长有效期
|
||||
cacheHelper.stringSetExpire(username, authorization, 3600);
|
||||
}
|
||||
|
||||
//执行
|
||||
filterChain.doFilter(request, response);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
Filter.super.destroy();
|
||||
}
|
||||
|
||||
private void error(HttpServletResponse response) throws IOException {
|
||||
ResponseBean responseBean = ResponseBean.builder().code("500").message("The Token has expired").build();
|
||||
response.getWriter().print(JSONObject.toJSONString(responseBean));
|
||||
response.getOutputStream().flush();
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.controller;
|
||||
|
||||
import com.anji.plus.gaea.annotation.Permission;
|
||||
import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
|
||||
import com.anji.plus.gaea.bean.ResponseBean;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ReportDashboardService;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.controller.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.controller.dto;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.annotation.Unique;
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
@ -1,7 +1,7 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service;
|
||||
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.param.ReportDashboardParam;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.param.ReportDashboardParam;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard;
|
||||
|
||||
/**
|
||||
* @desc ReportDashboard 大屏设计服务接口
|
@ -1,12 +1,10 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
@ -1,14 +1,11 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 折柱图
|
@ -1,8 +1,8 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
@ -1,8 +1,8 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.util;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboard.util;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
@ -1,17 +0,0 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.report.service;
|
||||
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.report.controller.dto.ReportDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.report.controller.param.ReportParam;
|
||||
import com.anjiplus.template.gaea.business.modules.data.report.dao.entity.Report;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @author chenkening
|
||||
* @date 2021/3/26 10:35
|
||||
*/
|
||||
public interface ReportService extends GaeaBaseService<ReportParam, Report> {
|
||||
|
||||
void delReport(ReportDto reportDto);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSet.controller.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSet.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.annotation.Unique;
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
@ -1,11 +1,11 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSet.service;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSet.service;
|
||||
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.OriginalDataDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param.DataSetParam;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSet.controller.param.DataSetParam;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSet.dao.entity.DataSet;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.param;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetParam.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
@ -1,13 +1,13 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetParam.service.impl;
|
||||
|
||||
import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
|
||||
import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.DataSetParamMapper;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetParam.util.ParamsResolverHelper;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.DataSetParamMapper;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity.DataSetParam;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetParam.service.DataSetParamService;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetParam.util.ParamsResolverHelper;
|
||||
import com.anjiplus.template.gaea.business.code.ResponseCode;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetParam.util;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetParam.util;
|
||||
|
||||
import org.springframework.util.PropertyPlaceholderHelper;
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
@ -1,7 +1,7 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetTransform.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetTransform.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.TransformStrategy;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,9 +1,9 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.impl;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSetTransform.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.TransformStrategy;
|
||||
import com.anjiplus.template.gaea.business.code.ResponseCode;
|
||||
import jdk.nashorn.api.scripting.ScriptObjectMirror;
|
||||
import lombok.extern.slf4j.Slf4j;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.config;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.config;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.annotation.Unique;
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.api;
|
||||
|
||||
/**
|
||||
* 配置接口
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.api;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.api;
|
||||
|
||||
/**
|
||||
* 生命周期管理
|
@ -1,6 +1,6 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.api;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.IPooledConnection;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.IPooledConnection;
|
||||
|
||||
/**
|
||||
* 池化的接口
|
@ -1,6 +1,6 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.connection;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.connection;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception.JdbcPoolException;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.exception.JdbcPoolException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.sql.*;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.constant;
|
||||
|
||||
/**
|
||||
* Created by raodeming on 2021/3/19.
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.constant;
|
||||
|
||||
/**
|
||||
* 线程池常量
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource;
|
||||
|
||||
/**
|
||||
* @author binbin.hou
|
@ -1,8 +1,8 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.ILifeCycle;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant.PooledConst;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.ILifeCycle;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.constant.PooledConst;
|
||||
|
||||
/**
|
||||
* @author binbin.hou
|
@ -1,6 +1,6 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IDataSourceConfig;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IDataSourceConfig;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
@ -1,9 +1,9 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.IPooledConnection;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.PooledConnection;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception.JdbcPoolException;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.DriverClassUtil;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.IPooledConnection;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.PooledConnection;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.exception.JdbcPoolException;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.util.DriverClassUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.DriverClassUtil;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.util.DriverClassUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.sql.Connection;
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.exception;
|
||||
|
||||
/**
|
||||
* @author binbin.hou
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.util;
|
||||
|
||||
/**
|
||||
* Created by raodeming on 2021/3/19.
|
@ -1,4 +1,4 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.util;
|
||||
|
||||
import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
|
||||
import com.anjiplus.template.gaea.business.code.ResponseCode;
|
@ -1,8 +1,8 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util;
|
||||
package com.anjiplus.template.gaea.business.modules.dataSource.pool.util;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.dto.DataSourceDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource.PooledDataSource;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource.UnPooledDataSource;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.controller.dto.DataSourceDto;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource.PooledDataSource;
|
||||
import com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource.UnPooledDataSource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.sql.Connection;
|
@ -1,74 +0,0 @@
|
||||
package com.anjiplus.template.gaea.business.modules.export.controller;
|
||||
|
||||
import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
|
||||
import com.anji.plus.gaea.bean.ResponseBean;
|
||||
import com.anji.plus.gaea.curd.controller.GaeaBaseController;
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
import com.anji.plus.gaea.utils.GaeaBeanUtils;
|
||||
import com.anjiplus.template.gaea.business.modules.export.controller.dto.GaeaExportDTO;
|
||||
import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportParam;
|
||||
import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportQueryParam;
|
||||
import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport;
|
||||
import com.anjiplus.template.gaea.business.modules.export.service.GaeaExportService;
|
||||
import com.anji.plus.gaea.export.vo.ExportOperation;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 导出中心(GaeaExport)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-02-07 17:12:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/export")
|
||||
@Api(value = "/export", tags = "导出中心")
|
||||
public class GaeaExportController extends GaeaBaseController<GaeaExportParam, GaeaExport, GaeaExportDTO> {
|
||||
@Autowired
|
||||
private GaeaExportService gaeaExportService;
|
||||
|
||||
@Override
|
||||
public GaeaBaseService<GaeaExportParam, GaeaExport> getService() {
|
||||
return gaeaExportService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GaeaExport getEntity() {
|
||||
return new GaeaExport();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GaeaExportDTO getDTO() {
|
||||
return new GaeaExportDTO();
|
||||
}
|
||||
|
||||
@PostMapping("/queryAdvanceExport")
|
||||
@GaeaAuditLog(pageTitle = "高级查询")
|
||||
public ResponseBean queryExportInfo(@RequestBody GaeaExportQueryParam param) {
|
||||
Page<GaeaExport> exportList=gaeaExportService.getExportListPage(param);
|
||||
List<GaeaExportDTO> list = exportList.getRecords().stream()
|
||||
.map(entity -> GaeaBeanUtils.copyAndFormatter(entity, getDTO()))
|
||||
.collect(Collectors.toList());
|
||||
Page<GaeaExportDTO> pageDto = new Page<>();
|
||||
pageDto.setCurrent(exportList.getCurrent());
|
||||
pageDto.setRecords(list);
|
||||
pageDto.setPages(exportList.getPages());
|
||||
pageDto.setTotal(exportList.getTotal());
|
||||
pageDto.setSize(exportList.getSize());
|
||||
return responseSuccessWithData(pageDto);
|
||||
}
|
||||
|
||||
@PostMapping("/saveExportLog")
|
||||
public Boolean export(@RequestBody ExportOperation exportOperation) {
|
||||
return gaeaExportService.saveExportLog(exportOperation);
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue