diff --git a/neutrino-proxy-admin/src/api/article.js b/neutrino-proxy-admin/src/api/article.js deleted file mode 100644 index 9eacd90d..00000000 --- a/neutrino-proxy-admin/src/api/article.js +++ /dev/null @@ -1,40 +0,0 @@ -import request from '@/utils/request' - -export function fetchList(query) { - return request({ - url: '/article/list', - method: 'get', - params: query - }) -} - -export function fetchArticle() { - return request({ - url: '/article/detail', - method: 'get' - }) -} - -export function fetchPv(pv) { - return request({ - url: '/article/pv', - method: 'get', - params: { pv } - }) -} - -export function createArticle(data) { - return request({ - url: '/article/create', - method: 'post', - data - }) -} - -export function updateArticle(data) { - return request({ - url: '/article/update', - method: 'post', - data - }) -} diff --git a/neutrino-proxy-admin/src/api/qiniu.js b/neutrino-proxy-admin/src/api/qiniu.js deleted file mode 100644 index a0375844..00000000 --- a/neutrino-proxy-admin/src/api/qiniu.js +++ /dev/null @@ -1,8 +0,0 @@ -import request from '@/utils/request' - -export function getToken() { - return request({ - url: '/qiniu/upload/token', // 假地址 自行替换 - method: 'get' - }) -} diff --git a/neutrino-proxy-admin/src/api/remoteSearch.js b/neutrino-proxy-admin/src/api/remoteSearch.js deleted file mode 100644 index f2792789..00000000 --- a/neutrino-proxy-admin/src/api/remoteSearch.js +++ /dev/null @@ -1,9 +0,0 @@ -import request from '@/utils/request' - -export function userSearch(name) { - return request({ - url: '/search/user', - method: 'get', - params: { name } - }) -} diff --git a/neutrino-proxy-admin/src/router/index.js b/neutrino-proxy-admin/src/router/index.js index 50d272b5..96bfea8e 100644 --- a/neutrino-proxy-admin/src/router/index.js +++ b/neutrino-proxy-admin/src/router/index.js @@ -29,17 +29,6 @@ export const constantRouterMap = [ { path: '/authredirect', component: _import('login/authredirect'), hidden: true }, { path: '/404', component: _import('errorPage/404'), hidden: true }, { path: '/401', component: _import('errorPage/401'), hidden: true }, - // { - // path: '', - // component: Layout, - // redirect: 'dashboard', - // children: [{ - // path: 'dashboard', - // component: _import('dashboard/index'), - // name: 'dashboard', - // meta: { title: 'dashboard', icon: 'dashboard', noCache: true } - // }] - // }, { path: '', component: Layout, @@ -51,18 +40,6 @@ export const constantRouterMap = [ meta: { title: 'home', icon: 'dashboard', noCache: true } }] } - - // , { - // path: '/documentation', - // component: Layout, - // redirect: '/documentation/index', - // children: [{ - // path: 'index', - // component: _import('documentation/index'), - // name: 'documentation', - // meta: { title: 'documentation', icon: 'documentation', noCache: true } - // }] - // } ] export default new Router({ @@ -72,184 +49,6 @@ export default new Router({ }) export const asyncRouterMap = [ - // { - // path: '/permission', - // component: Layout, - // redirect: '/permission/index', - // meta: { roles: ['admin'] }, // you can set roles in root nav - // children: [{ - // path: 'index', - // component: _import('permission/index'), - // name: 'permission', - // meta: { - // title: 'permission', - // icon: 'lock', - // roles: ['admin'] // or you can only set roles in sub nav - // } - // }] - // }, - // - // { - // path: '/icon', - // component: Layout, - // children: [{ - // path: 'index', - // component: _import('svg-icons/index'), - // name: 'icons', - // meta: { title: 'icons', icon: 'icon', noCache: true } - // }] - // }, - // - // { - // path: '/components', - // component: Layout, - // redirect: 'noredirect', - // name: 'component-demo', - // meta: { - // title: 'components', - // icon: 'component' - // }, - // children: [ - // { path: 'tinymce', component: _import('components-demo/tinymce'), name: 'tinymce-demo', meta: { title: 'tinymce' }}, - // { path: 'markdown', component: _import('components-demo/markdown'), name: 'markdown-demo', meta: { title: 'markdown' }}, - // { path: 'json-editor', component: _import('components-demo/jsonEditor'), name: 'jsonEditor-demo', meta: { title: 'jsonEditor' }}, - // { path: 'dnd-list', component: _import('components-demo/dndList'), name: 'dndList-demo', meta: { title: 'dndList' }}, - // { path: 'splitpane', component: _import('components-demo/splitpane'), name: 'splitpane-demo', meta: { title: 'splitPane' }}, - // { path: 'avatar-upload', component: _import('components-demo/avatarUpload'), name: 'avatarUpload-demo', meta: { title: 'avatarUpload' }}, - // { path: 'dropzone', component: _import('components-demo/dropzone'), name: 'dropzone-demo', meta: { title: 'dropzone' }}, - // { path: 'sticky', component: _import('components-demo/sticky'), name: 'sticky-demo', meta: { title: 'sticky' }}, - // { path: 'count-to', component: _import('components-demo/countTo'), name: 'countTo-demo', meta: { title: 'countTo' }}, - // { path: 'mixin', component: _import('components-demo/mixin'), name: 'componentMixin-demo', meta: { title: 'componentMixin' }}, - // { path: 'back-to-top', component: _import('components-demo/backToTop'), name: 'backToTop-demo', meta: { title: 'backToTop' }} - // ] - // }, - // - // { - // path: '/charts', - // component: Layout, - // redirect: 'noredirect', - // name: 'charts', - // meta: { - // title: 'charts', - // icon: 'chart' - // }, - // children: [ - // { path: 'keyboard', component: _import('charts/keyboard'), name: 'keyboardChart', meta: { title: 'keyboardChart', noCache: true }}, - // { path: 'line', component: _import('charts/line'), name: 'lineChart', meta: { title: 'lineChart', noCache: true }}, - // { path: 'mixchart', component: _import('charts/mixChart'), name: 'mixChart', meta: { title: 'mixChart', noCache: true }} - // ] - // }, - // - // { - // path: '/example', - // component: Layout, - // redirect: '/example/table/complex-table', - // name: 'example', - // meta: { - // title: 'example', - // icon: 'example' - // }, - // children: [ - // { - // path: '/example/table', - // component: _import('example/table/index'), - // redirect: '/example/table/complex-table', - // name: 'Table', - // meta: { - // title: 'Table', - // icon: 'table' - // }, - // children: [ - // { path: 'dynamic-table', component: _import('example/table/dynamicTable/index'), name: 'dynamicTable', meta: { title: 'dynamicTable' }}, - // { path: 'drag-table', component: _import('example/table/dragTable'), name: 'dragTable', meta: { title: 'dragTable' }}, - // { path: 'inline-edit-table', component: _import('example/table/inlineEditTable'), name: 'inlineEditTable', meta: { title: 'inlineEditTable' }}, - // { path: 'complex-table', component: _import('example/table/complexTable'), name: 'complexTable', meta: { title: 'complexTable' }} - // ] - // }, - // { path: 'tab/index', icon: 'tab', component: _import('example/tab/index'), name: 'tab', meta: { title: 'tab' }} - // ] - // }, - // - // { - // path: '/form', - // component: Layout, - // redirect: 'noredirect', - // name: 'form', - // meta: { - // title: 'form', - // icon: 'form' - // }, - // children: [ - // { path: 'create-form', component: _import('form/create'), name: 'createForm', meta: { title: 'createForm', icon: 'table' }}, - // { path: 'edit-form', component: _import('form/edit'), name: 'editForm', meta: { title: 'editForm', icon: 'table' }} - // ] - // }, - // - // { - // path: '/error', - // component: Layout, - // redirect: 'noredirect', - // name: 'errorPages', - // meta: { - // title: 'errorPages', - // icon: '404' - // }, - // children: [ - // { path: '401', component: _import('errorPage/401'), name: 'page401', meta: { title: 'page401', noCache: true }}, - // { path: '404', component: _import('errorPage/404'), name: 'page404', meta: { title: 'page404', noCache: true }} - // ] - // }, - // - // { - // path: '/error-log', - // component: Layout, - // redirect: 'noredirect', - // children: [{ path: 'log', component: _import('errorLog/index'), name: 'errorLog', meta: { title: 'errorLog', icon: 'bug' }}] - // }, - // - // { - // path: '/excel', - // component: Layout, - // redirect: '/excel/export-excel', - // name: 'excel', - // meta: { - // title: 'excel', - // icon: 'excel' - // }, - // children: [ - // { path: 'export-excel', component: _import('excel/exportExcel'), name: 'exportExcel', meta: { title: 'exportExcel' }}, - // { path: 'export-selected-excel', component: _import('excel/selectExcel'), name: 'selectExcel', meta: { title: 'selectExcel' }}, - // { path: 'upload-excel', component: _import('excel/uploadExcel'), name: 'uploadExcel', meta: { title: 'uploadExcel' }} - // ] - // }, - // - // { - // path: '/zip', - // component: Layout, - // redirect: '/zip/download', - // children: [{ path: 'download', component: _import('zip/index'), name: 'exportZip', meta: { title: 'exportZip', icon: 'zip' }}] - // }, - // - // { - // path: '/theme', - // component: Layout, - // redirect: 'noredirect', - // children: [{ path: 'index', component: _import('theme/index'), name: 'theme', meta: { title: 'theme', icon: 'theme' }}] - // }, - // - // { - // path: '/clipboard', - // component: Layout, - // redirect: 'noredirect', - // children: [{ path: 'index', component: _import('clipboard/index'), name: 'clipboardDemo', meta: { title: 'clipboardDemo', icon: 'clipboard' }}] - // }, - // - // { - // path: '/i18n', - // component: Layout, - // children: [{ path: 'index', component: _import('i18n-demo/index'), name: 'i18n', meta: { title: 'i18n', icon: 'international' }}] - // }, - { path: '*', redirect: '/404', hidden: true }, { path: '/proxy', diff --git a/neutrino-proxy-admin/src/views/charts/keyboard.vue b/neutrino-proxy-admin/src/views/charts/keyboard.vue deleted file mode 100644 index 30ed5762..00000000 --- a/neutrino-proxy-admin/src/views/charts/keyboard.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/charts/line.vue b/neutrino-proxy-admin/src/views/charts/line.vue deleted file mode 100644 index c45c3813..00000000 --- a/neutrino-proxy-admin/src/views/charts/line.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/charts/mixChart.vue b/neutrino-proxy-admin/src/views/charts/mixChart.vue deleted file mode 100644 index 1ca476e6..00000000 --- a/neutrino-proxy-admin/src/views/charts/mixChart.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/clipboard/index.vue b/neutrino-proxy-admin/src/views/clipboard/index.vue deleted file mode 100644 index 83945235..00000000 --- a/neutrino-proxy-admin/src/views/clipboard/index.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/avatarUpload.vue b/neutrino-proxy-admin/src/views/components-demo/avatarUpload.vue deleted file mode 100644 index f993a4f6..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/avatarUpload.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/backToTop.vue b/neutrino-proxy-admin/src/views/components-demo/backToTop.vue deleted file mode 100644 index 6abb652a..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/backToTop.vue +++ /dev/null @@ -1,150 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/countTo.vue b/neutrino-proxy-admin/src/views/components-demo/countTo.vue deleted file mode 100644 index b30204d9..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/countTo.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/dndList.vue b/neutrino-proxy-admin/src/views/components-demo/dndList.vue deleted file mode 100644 index b9779a31..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/dndList.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/dropzone.vue b/neutrino-proxy-admin/src/views/components-demo/dropzone.vue deleted file mode 100644 index a31a702b..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/dropzone.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/jsonEditor.vue b/neutrino-proxy-admin/src/views/components-demo/jsonEditor.vue deleted file mode 100644 index 75299bc0..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/jsonEditor.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/markdown.vue b/neutrino-proxy-admin/src/views/components-demo/markdown.vue deleted file mode 100644 index 61a3b51f..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/markdown.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/mixin.vue b/neutrino-proxy-admin/src/views/components-demo/mixin.vue deleted file mode 100644 index 78adb069..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/mixin.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/splitpane.vue b/neutrino-proxy-admin/src/views/components-demo/splitpane.vue deleted file mode 100644 index d870197e..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/splitpane.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/sticky.vue b/neutrino-proxy-admin/src/views/components-demo/sticky.vue deleted file mode 100644 index 49772bea..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/sticky.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/components-demo/tinymce.vue b/neutrino-proxy-admin/src/views/components-demo/tinymce.vue deleted file mode 100644 index 284660c4..00000000 --- a/neutrino-proxy-admin/src/views/components-demo/tinymce.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - diff --git a/neutrino-proxy-admin/src/views/documentation/index.vue b/neutrino-proxy-admin/src/views/documentation/index.vue deleted file mode 100644 index d8381592..00000000 --- a/neutrino-proxy-admin/src/views/documentation/index.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/example/tab/components/tabPane.vue b/neutrino-proxy-admin/src/views/example/tab/components/tabPane.vue deleted file mode 100644 index 5d11d33b..00000000 --- a/neutrino-proxy-admin/src/views/example/tab/components/tabPane.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/example/tab/index.vue b/neutrino-proxy-admin/src/views/example/tab/index.vue deleted file mode 100644 index 2a3239a3..00000000 --- a/neutrino-proxy-admin/src/views/example/tab/index.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/example/table/complexTable.vue b/neutrino-proxy-admin/src/views/example/table/complexTable.vue deleted file mode 100644 index b96b8f9c..00000000 --- a/neutrino-proxy-admin/src/views/example/table/complexTable.vue +++ /dev/null @@ -1,354 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/example/table/dragTable.vue b/neutrino-proxy-admin/src/views/example/table/dragTable.vue deleted file mode 100644 index 5534f2f8..00000000 --- a/neutrino-proxy-admin/src/views/example/table/dragTable.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - diff --git a/neutrino-proxy-admin/src/views/example/table/dynamicTable/fixedThead.vue b/neutrino-proxy-admin/src/views/example/table/dynamicTable/fixedThead.vue deleted file mode 100644 index 9f4cfc5f..00000000 --- a/neutrino-proxy-admin/src/views/example/table/dynamicTable/fixedThead.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/example/table/dynamicTable/index.vue b/neutrino-proxy-admin/src/views/example/table/dynamicTable/index.vue deleted file mode 100644 index 51f0da18..00000000 --- a/neutrino-proxy-admin/src/views/example/table/dynamicTable/index.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/example/table/dynamicTable/unfixedThead.vue b/neutrino-proxy-admin/src/views/example/table/dynamicTable/unfixedThead.vue deleted file mode 100644 index fab8e5b6..00000000 --- a/neutrino-proxy-admin/src/views/example/table/dynamicTable/unfixedThead.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/example/table/index.vue b/neutrino-proxy-admin/src/views/example/table/index.vue deleted file mode 100644 index de92c020..00000000 --- a/neutrino-proxy-admin/src/views/example/table/index.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/example/table/inlineEditTable.vue b/neutrino-proxy-admin/src/views/example/table/inlineEditTable.vue deleted file mode 100644 index 3d2ad00f..00000000 --- a/neutrino-proxy-admin/src/views/example/table/inlineEditTable.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/excel/exportExcel.vue b/neutrino-proxy-admin/src/views/excel/exportExcel.vue deleted file mode 100644 index be12ea4b..00000000 --- a/neutrino-proxy-admin/src/views/excel/exportExcel.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/excel/selectExcel.vue b/neutrino-proxy-admin/src/views/excel/selectExcel.vue deleted file mode 100644 index bd62ade7..00000000 --- a/neutrino-proxy-admin/src/views/excel/selectExcel.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/excel/uploadExcel.vue b/neutrino-proxy-admin/src/views/excel/uploadExcel.vue deleted file mode 100644 index 187f43af..00000000 --- a/neutrino-proxy-admin/src/views/excel/uploadExcel.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/neutrino-proxy-admin/src/views/form/components/ArticleDetail.vue b/neutrino-proxy-admin/src/views/form/components/ArticleDetail.vue deleted file mode 100644 index ce9dc03d..00000000 --- a/neutrino-proxy-admin/src/views/form/components/ArticleDetail.vue +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - diff --git a/neutrino-proxy-admin/src/views/form/create.vue b/neutrino-proxy-admin/src/views/form/create.vue deleted file mode 100644 index ea5302dc..00000000 --- a/neutrino-proxy-admin/src/views/form/create.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/form/edit.vue b/neutrino-proxy-admin/src/views/form/edit.vue deleted file mode 100644 index 097b6140..00000000 --- a/neutrino-proxy-admin/src/views/form/edit.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/i18n-demo/index.vue b/neutrino-proxy-admin/src/views/i18n-demo/index.vue deleted file mode 100644 index dc842a71..00000000 --- a/neutrino-proxy-admin/src/views/i18n-demo/index.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - - - diff --git a/neutrino-proxy-admin/src/views/i18n-demo/local.js b/neutrino-proxy-admin/src/views/i18n-demo/local.js deleted file mode 100644 index a4c07203..00000000 --- a/neutrino-proxy-admin/src/views/i18n-demo/local.js +++ /dev/null @@ -1,36 +0,0 @@ - -export default { - zh: { - i18nView: { - title: '切换语言', - note: '目前只翻译了当前页面和侧边栏和导航,未完待续,敬请期待...', - datePlaceholder: '请选择日期', - tableDate: '日期', - tableName: '姓名', - tableAddress: '地址', - default: '默认按钮', - primary: '主要按钮', - success: '成功按钮', - info: '信息按钮', - warning: '警告按钮', - danger: '危险按钮' - } - - }, - en: { - i18nView: { - title: 'Switch Language', - note: 'Currently only translated the i18n page and the sidebar and levelbar, please look forword to...', - datePlaceholder: 'Pick a day', - tableDate: 'tableDate', - tableName: 'tableName', - tableAddress: 'tableAddress', - default: 'default:', - primary: 'primary', - success: 'success', - info: 'info', - warning: 'warning', - danger: 'danger' - } - } -} diff --git a/neutrino-proxy-admin/src/views/qiniu/upload.vue b/neutrino-proxy-admin/src/views/qiniu/upload.vue deleted file mode 100644 index 5f05789b..00000000 --- a/neutrino-proxy-admin/src/views/qiniu/upload.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - diff --git a/neutrino-proxy-admin/src/views/zip/index.vue b/neutrino-proxy-admin/src/views/zip/index.vue deleted file mode 100644 index 54320a8e..00000000 --- a/neutrino-proxy-admin/src/views/zip/index.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/DataCleanMapper.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/DataCleanMapper.java index 4bf599d8..998ef2d2 100644 --- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/DataCleanMapper.java +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/DataCleanMapper.java @@ -42,4 +42,14 @@ public interface DataCleanMapper extends SqlMapper { @Delete("delete from `client_connect_record` where create_time < ?") void cleanClientConnectRecord(long date); + + @Delete("delete from `flow_report_minute` where create_time < ?") + void cleanFlowMinuteReport(long date); + + @Delete("delete from `flow_report_hour` where create_time < ?") + void cleanFlowHourReport(long date); + + @Delete("delete from `flow_report_day` where create_time < ?") + void cleanFlowDayReport(long date); + } diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/job/DataCleanJob.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/job/DataCleanJob.java index d3345b10..49fe230c 100644 --- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/job/DataCleanJob.java +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/job/DataCleanJob.java @@ -64,6 +64,19 @@ public class DataCleanJob implements IJobHandler { */ private static final Integer CLIENT_CONNECT_RECORD_KEEP_DAYS = 30; + /** + * 流量统计分钟报表记录保留天数 + */ + private static final Integer FLOW_MINUTE_REPORT_KEEP_DAYS = 2; + /** + * 流量统计小时报表记录保留天数 + */ + private static final Integer FLOW_HOUR_REPORT_KEEP_DAYS = 90; + /** + * 流量统计天报表记录保留天数 + */ + private static final Integer FLOW_DAY_REPORT_KEEP_DAYS = 400; + @Override public void execute(String s) throws Exception { JobParams jobParams = getParams(s); @@ -85,6 +98,24 @@ public class DataCleanJob implements IJobHandler { log.info("清理客户端连接日志 date:{}", sdf.format(date)); dataCleanMapper.cleanClientConnectRecord(date.getTime()); } + + { + Date date = DateUtil.addDate(new Date(), Calendar.DATE, -1 * jobParams.getFlowMinuteReportKeepDays()); + log.info("清理流通统计分钟报表日志 date:{}", sdf.format(date)); + dataCleanMapper.cleanFlowMinuteReport(date.getTime()); + } + + { + Date date = DateUtil.addDate(new Date(), Calendar.DATE, -1 * jobParams.getFlowHourReportKeepDays()); + log.info("清理流通统计小时报表日志 date:{}", sdf.format(date)); + dataCleanMapper.cleanFlowHourReport(date.getTime()); + } + + { + Date date = DateUtil.addDate(new Date(), Calendar.DATE, -1 * jobParams.getFlowDayReportKeepDays()); + log.info("清理流通统计日报表日志 date:{}", sdf.format(date)); + dataCleanMapper.cleanFlowDayReport(date.getTime()); + } } public static JobParams getParams(String s) { @@ -107,5 +138,8 @@ public class DataCleanJob implements IJobHandler { private Integer jobLogKeepDays; private Integer userLoginRecordKeepDays; private Integer clientConnectRecordKeepDays; + private Integer flowMinuteReportKeepDays; + private Integer flowHourReportKeepDays; + private Integer flowDayReportKeepDays; } }