Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3e7bf72fe | ||
|
|
a82829002a | ||
|
|
1f723b5d0f | ||
|
|
08a963c4b7 | ||
|
|
66ae66b8a9 | ||
|
|
71eb72d726 | ||
|
|
98ac3c67c1 | ||
|
|
7de1c37d6b | ||
|
|
07de9eec98 | ||
|
|
4b596e99bb | ||
|
|
9d36a4a32a | ||
|
|
c4726941ea | ||
|
|
144adfe73f | ||
|
|
247ec55b17 | ||
|
|
e2c5c6975f | ||
|
|
9fc6541e98 |
|
After Width: | Height: | Size: 440 KiB |
|
After Width: | Height: | Size: 502 KiB |
|
After Width: | Height: | Size: 441 KiB |
|
After Width: | Height: | Size: 435 KiB |
|
After Width: | Height: | Size: 449 KiB |
|
After Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 327 KiB |
|
After Width: | Height: | Size: 427 KiB |
|
After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 354 KiB |
|
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 495 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 315 KiB |
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 311 KiB |
@@ -197,4 +197,4 @@ License管理:
|
|||||||
|
|
||||||
对项目有什么想法或者建议,可以加我微信拉交流群,或者创建[issues](https://gitee.com/dromara/neutrino-proxy/issues),一起完善项目
|
对项目有什么想法或者建议,可以加我微信拉交流群,或者创建[issues](https://gitee.com/dromara/neutrino-proxy/issues),一起完善项目
|
||||||
|
|
||||||
<img src="./MyWeChatQRCode.jpeg" width="100%"/>
|
<img src="MyWeChatQRCode.jpeg" width="100%"/>
|
||||||
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 425 KiB |
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 202 KiB |
@@ -14,3 +14,27 @@ export function fetchLicenseFlowReportList(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function fetchUserFlowMonthReportList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/report/user/flow-month-report/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function fetchLicenseFlowMonthReportList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/report/license/flow-month-report/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function homeData(query) {
|
||||||
|
return request({
|
||||||
|
url: '/report/home/data-view',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ export default {
|
|||||||
clientConnectLog: '客户端连接日志',
|
clientConnectLog: '客户端连接日志',
|
||||||
report: '报表管理',
|
report: '报表管理',
|
||||||
userFlowReport: '用户流量报表',
|
userFlowReport: '用户流量报表',
|
||||||
licenseFlowReport: 'License流量报表'
|
licenseFlowReport: 'License流量报表',
|
||||||
|
userFlowMonthReport: '用户流量月度明细',
|
||||||
|
licenseFlowMonthReport: 'License流量月度明细'
|
||||||
},
|
},
|
||||||
navbar: {
|
navbar: {
|
||||||
logOut: '退出登录',
|
logOut: '退出登录',
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ export const asyncRouterMap = [
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{ path: 'userFlowReport', component: _import('report/userFlowReport'), name: 'userFlowReport', meta: { title: 'userFlowReport' }},
|
{ path: 'userFlowReport', component: _import('report/userFlowReport'), name: 'userFlowReport', meta: { title: 'userFlowReport' }},
|
||||||
{ path: 'licenseFlowReport', component: _import('report/licenseFlowReport'), name: 'licenseFlowReport', meta: { title: 'licenseFlowReport' }}
|
{ path: 'licenseFlowReport', component: _import('report/licenseFlowReport'), name: 'licenseFlowReport', meta: { title: 'licenseFlowReport' }},
|
||||||
|
{ path: 'userFlowMonthReport', component: _import('report/userFlowMonthReport'), name: 'userFlowMonthReport', meta: { title: 'userFlowMonthReport' }},
|
||||||
|
{ path: 'licenseFlowMonthReport', component: _import('report/licenseFlowMonthReport'), name: 'licenseFlowMonthReport', meta: { title: 'licenseFlowMonthReport' }}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
const SIZE_UNINTS = ['B', 'KB', 'MB', 'GB', 'TB']
|
||||||
|
const SIZE_SYSTEM = 1024
|
||||||
|
/**
|
||||||
|
* 根据字节数获取大小描述
|
||||||
|
* 1、小于1024字节的以B为单位
|
||||||
|
* 2、小于1024KB的以KB为单位
|
||||||
|
* 3、小于1024M的以MB为单位
|
||||||
|
* 4、小于1024G的以GB为单位
|
||||||
|
* 5、其他以TB为单位
|
||||||
|
*/
|
||||||
|
export function getSizeDescByByteCount(byteCount) {
|
||||||
|
if (byteCount <= 0) {
|
||||||
|
return '0B'
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = byteCount
|
||||||
|
let index = 0
|
||||||
|
while (index < SIZE_UNINTS.length && res >= SIZE_SYSTEM) {
|
||||||
|
res /= SIZE_SYSTEM
|
||||||
|
index++
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index >= SIZE_UNINTS.length) {
|
||||||
|
index = SIZE_UNINTS.length - 1
|
||||||
|
res *= 1024
|
||||||
|
}
|
||||||
|
|
||||||
|
return parseFloat(res.toFixed(2)) + SIZE_UNINTS[index]
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
|
let that = null
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -22,14 +23,14 @@ export default {
|
|||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '250px'
|
default: '220px'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
upload: 90, // 上行
|
upFlowBytes: 0, // 上行
|
||||||
download: 100, // 下行
|
downFlowBytes: 0, // 下行
|
||||||
text: '今日流量'
|
text: '今日流量'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +42,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
that = this
|
||||||
this.initChart()
|
this.initChart()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -57,7 +59,7 @@ export default {
|
|||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: this.data.text,
|
text: this.data.text,
|
||||||
subtext: '上行:' + this.data.upload + '\n\n' + '下行:' + this.data.download,
|
subtext: '上行:' + this.data.upFlowDesc + '\n\n' + '下行:' + this.data.downFlowDesc + '\n\n' + '汇总:' + this.data.totalFlowDesc,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: 800,
|
fontWeight: 800,
|
||||||
@@ -65,7 +67,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item',
|
||||||
|
formatter: function(value) {
|
||||||
|
return `${value.seriesName} <br/>${value.marker} : ${value.name} ${value.name === '上行' ? that.data.upFlowDesc : that.data.downFlowDesc}`
|
||||||
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['上行', '下行'],
|
data: ['上行', '下行'],
|
||||||
@@ -77,7 +82,7 @@ export default {
|
|||||||
name: this.data.text,
|
name: this.data.text,
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: [45, 65],
|
radius: [45, 65],
|
||||||
center: ['50%', '58%'],
|
center: ['60%', '60%'],
|
||||||
// 隐藏指示线
|
// 隐藏指示线
|
||||||
labelLine: {
|
labelLine: {
|
||||||
normal: {
|
normal: {
|
||||||
@@ -93,30 +98,30 @@ export default {
|
|||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: this.data.upload,
|
value: this.data.upFlowBytes,
|
||||||
name: '上行',
|
name: '上行',
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: this.data.download,
|
value: this.data.downFlowBytes,
|
||||||
name: '下行',
|
name: '下行',
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ export default {
|
|||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '250px'
|
default: '220px'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
onLine: 90, // 进度条最大值
|
onlineCount: 0, // 进度条最大值
|
||||||
total: 100 // 当前进度
|
totalCount: 0 // 当前进度
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: 'License统计',
|
text: 'License统计',
|
||||||
subtext: '在线数:' + this.data.onLine + '\n\n' + '离线数:' + (this.data.total - this.data.onLine),
|
subtext: '在线数量:' + this.data.onlineCount + '\n\n' + '离线数量:' + (this.data.totalCount - this.data.onlineCount) + '\n\n' + '汇总数量:' + this.data.totalCount,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: 800,
|
fontWeight: 800,
|
||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
name: 'License',
|
name: 'License',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: [45, 65],
|
radius: [45, 65],
|
||||||
center: ['50%', '58%'],
|
center: ['60%', '60%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
// 隐藏指示线
|
// 隐藏指示线
|
||||||
labelLine: {
|
labelLine: {
|
||||||
@@ -103,29 +103,29 @@ export default {
|
|||||||
// value当前进度 + 颜色
|
// value当前进度 + 颜色
|
||||||
{
|
{
|
||||||
name: '在线数',
|
name: '在线数',
|
||||||
value: this.data.onLine,
|
value: this.data.onlineCount,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '离线数',
|
name: '离线数',
|
||||||
value: this.data.total - this.data.onLine,
|
value: this.data.totalCount - this.data.onlineCount,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ export default {
|
|||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '250px'
|
default: '220px'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
onLine: 90, // 进度条最大值
|
onlineCount: 0, // 进度条最大值
|
||||||
total: 100 // 当前进度
|
totalCount: 0 // 当前进度
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export default {
|
|||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: '端口映射统计',
|
text: '端口映射统计',
|
||||||
subtext: '在线数:' + this.data.onLine + '\n\n' + '离线数:' + (this.data.total - this.data.onLine),
|
subtext: '在线数量:' + this.data.onlineCount + '\n\n' + '离线数量:' + (this.data.totalCount - this.data.onlineCount) + '\n\n' + '汇总数量:' + this.data.totalCount,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: 800,
|
fontWeight: 800,
|
||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
name: '端口映射',
|
name: '端口映射',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: [45, 65],
|
radius: [45, 65],
|
||||||
center: ['50%', '58%'],
|
center: ['60%', '60%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
// 隐藏指示线
|
// 隐藏指示线
|
||||||
labelLine: {
|
labelLine: {
|
||||||
@@ -92,29 +92,29 @@ export default {
|
|||||||
// value当前进度 + 颜色
|
// value当前进度 + 颜色
|
||||||
{
|
{
|
||||||
name: '在线数',
|
name: '在线数',
|
||||||
value: this.data.onLine,
|
value: this.data.onlineCount,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#2B81B1'
|
color: '#63b2ee'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '离线数',
|
name: '离线数',
|
||||||
value: this.data.total - this.data.onLine,
|
value: this.data.totalCount - this.data.onlineCount,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#dbebf7'
|
color: '#76da91'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
|
import { getSizeDescByByteCount } from '@/utils/utils'
|
||||||
|
let that = null
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -26,16 +28,17 @@ export default {
|
|||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '450px'
|
default: '500px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chartDom: null,
|
chartDom: null,
|
||||||
colorList: ['#2B81B1', '#75ddfa', '#53a7e3', '#029fe8', '#015dae']
|
colorList: ['#63b2ee', '#76da91', '#f8cb7f', '#f89588', '#7cd6cf', '#9192ab', '#7898e1', '#7898e1']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
that = this
|
||||||
this.initChart()
|
this.initChart()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -51,7 +54,7 @@ export default {
|
|||||||
this.myChart = echarts.init(this.chartDom)
|
this.myChart = echarts.init(this.chartDom)
|
||||||
const seriesList = []
|
const seriesList = []
|
||||||
const legendList = []
|
const legendList = []
|
||||||
this.data.list.forEach((item, index) => {
|
this.data.list && this.data.list.forEach((item, index) => {
|
||||||
seriesList.push({
|
seriesList.push({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@@ -71,25 +74,34 @@ export default {
|
|||||||
normal: {
|
normal: {
|
||||||
color: this.colorList[index]
|
color: this.colorList[index]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
smooth: true
|
||||||
})
|
})
|
||||||
legendList.push(item.name)
|
legendList.push(item.name)
|
||||||
})
|
})
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: this.data.text + '折线图',
|
text: this.data.text,
|
||||||
subtext: this.data.subtext || ''
|
subtext: this.data.subtext || ''
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis',
|
||||||
|
formatter: function(value) {
|
||||||
|
let title = that.data.text + '<br/>'
|
||||||
|
value.forEach(item => {
|
||||||
|
title = title + item.marker + item.seriesName + ' : ' + that.data.list[item.seriesIndex].label[item.dataIndex] + '<br/>'
|
||||||
|
})
|
||||||
|
return title
|
||||||
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: legendList,
|
data: legendList,
|
||||||
left: 'right'
|
left: 'right'
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '2%',
|
left: '0',
|
||||||
right: '2%',
|
right: '3%',
|
||||||
bottom: '2%',
|
bottom: '2%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
@@ -99,7 +111,12 @@ export default {
|
|||||||
data: this.data.title
|
data: this.data.title
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value',
|
||||||
|
axisLabel: {
|
||||||
|
formatter: function(value) {
|
||||||
|
return getSizeDescByByteCount(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: seriesList
|
series: seriesList
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dashboard-editor">
|
<div class="dashboard-editor">
|
||||||
<div class="log-div">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-row class="line-chart" :gutter="16">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-card>
|
|
||||||
<traffic-sum-chart :data="echartsData.trafficSumChart" :chartId="'traffic-sum-div1'"/>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-card>
|
|
||||||
<traffic-sum-chart :data="echartsData.trafficSumChart2"/>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="pie-chart" :gutter="16">
|
<el-row class="pie-chart" :gutter="16">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<license-chart :data="echartsData.licenseChart"/>
|
<license-chart :data="licenseChart" v-if="licenseChart"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<port-mapping-chart :data="echartsData.portMappingChart"/>
|
<port-mapping-chart :data="portMappingChart" v-if="portMappingChart"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<daily-traffic-chart :data="echartsData.dailyTrafficChart" :chartId="'daily-traffic-div'"/>
|
<daily-traffic-chart :data="dailyTrafficChart" :chartId="'daily-traffic-div'" v-if="dailyTrafficChart"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<daily-traffic-chart :data="echartsData.historyTrafficChart" :chartId="'history-traffic-div'"/>
|
<daily-traffic-chart :data="historyTrafficChart" :chartId="'history-traffic-div'" v-if="historyTrafficChart"/>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="line-chart" :gutter="16">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card>
|
||||||
|
<traffic-sum-chart :data="trafficSumChart" :chartId="'traffic-sum-div1'" v-if="trafficSumChart"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -48,69 +40,69 @@ import LicenseChart from './components/LicenseChart'
|
|||||||
import PortMappingChart from './components/PortMappingChart'
|
import PortMappingChart from './components/PortMappingChart'
|
||||||
import DailyTrafficChart from './components/DailyTrafficChart'
|
import DailyTrafficChart from './components/DailyTrafficChart'
|
||||||
import TrafficSumChart from './components/TrafficSumChart'
|
import TrafficSumChart from './components/TrafficSumChart'
|
||||||
|
import { homeData } from '@/api/report'
|
||||||
const echartsData = {
|
|
||||||
licenseChart: {
|
|
||||||
total: 100,
|
|
||||||
onLine: 80
|
|
||||||
},
|
|
||||||
portMappingChart: {
|
|
||||||
total: 100,
|
|
||||||
onLine: 25
|
|
||||||
},
|
|
||||||
dailyTrafficChart: {
|
|
||||||
upload: 300,
|
|
||||||
download: 680,
|
|
||||||
text: '今日流量'
|
|
||||||
},
|
|
||||||
historyTrafficChart: {
|
|
||||||
upload: 4100,
|
|
||||||
download: 9520,
|
|
||||||
text: '历史流量'
|
|
||||||
},
|
|
||||||
trafficSumChart: {
|
|
||||||
text: '今日流量',
|
|
||||||
subtext: '当日0-24时',
|
|
||||||
title: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00'],
|
|
||||||
list: [
|
|
||||||
{
|
|
||||||
name: '上行',
|
|
||||||
value: [120, 132, 101, 134, 90, 230, 210]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '下行',
|
|
||||||
value: [112, 333, 150, 60, 99, 50, 102]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
trafficSumChart2: {
|
|
||||||
text: '历史流量',
|
|
||||||
title: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
||||||
list: [
|
|
||||||
{
|
|
||||||
name: '上行',
|
|
||||||
value: [132, 101, 134, 90, 120, 132, 101, 134, 90, 230, 210, 120]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '下行',
|
|
||||||
value: [111, 0, 50, 101, 134, 90, 230, 120, 132, 101, 60, 20]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'dashboard-admin',
|
name: 'dashboard-admin',
|
||||||
components: { TrafficSumChart, DailyTrafficChart, PortMappingChart, LicenseChart },
|
components: { TrafficSumChart, DailyTrafficChart, PortMappingChart, LicenseChart },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
echartsData: echartsData
|
licenseChart: undefined,
|
||||||
|
portMappingChart: undefined,
|
||||||
|
dailyTrafficChart: undefined,
|
||||||
|
historyTrafficChart: undefined,
|
||||||
|
trafficSumChart: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getHomeData()
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getHomeData() {
|
||||||
|
homeData().then(res => {
|
||||||
|
this.licenseChart = res.data.data.license
|
||||||
|
this.portMappingChart = res.data.data.portMapping
|
||||||
|
this.dailyTrafficChart = Object.assign(res.data.data.todayFlow, { text: '今日流量' })
|
||||||
|
this.historyTrafficChart = Object.assign(res.data.data.totalFlow, { text: '流量汇总' })
|
||||||
|
this.trafficSumChart = this.getChartData(res.data.data.last7dFlow)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getChartData(last7dFlow) {
|
||||||
|
const title = []
|
||||||
|
const downFlowDesc = []
|
||||||
|
const totalFlowDesc = []
|
||||||
|
const upFlowDesc = []
|
||||||
|
last7dFlow.dataList.forEach(item => {
|
||||||
|
title.push(item.dateStr)
|
||||||
|
totalFlowDesc.push(item.totalFlowDesc)
|
||||||
|
downFlowDesc.push(item.downFlowDesc)
|
||||||
|
upFlowDesc.push(item.upFlowDesc)
|
||||||
|
})
|
||||||
|
const list = []
|
||||||
|
last7dFlow.seriesList.forEach(item => {
|
||||||
|
let label = []
|
||||||
|
if (item.seriesName.indexOf('上') > -1) {
|
||||||
|
label = upFlowDesc
|
||||||
|
} else if (item.seriesName.indexOf('下') > -1) {
|
||||||
|
label = downFlowDesc
|
||||||
|
} else if (item.seriesName.indexOf('总') > -1) {
|
||||||
|
label = totalFlowDesc
|
||||||
|
}
|
||||||
|
list.push({
|
||||||
|
name: item.seriesName,
|
||||||
|
value: item.seriesData,
|
||||||
|
label: label
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
text: '流量监控',
|
||||||
|
subtext: `最近${last7dFlow.dataList.length || 0}天流量监控`,
|
||||||
|
title: title,
|
||||||
|
list: list
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -127,9 +119,9 @@ export default {
|
|||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
.pie-chart{
|
.pie-chart{
|
||||||
padding-top: 16px;
|
padding-bottom: 16px;
|
||||||
.el-card{
|
.el-card{
|
||||||
min-height: 300px;
|
min-height: 250px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container calendar-list-container">
|
||||||
|
<div class="filter-container">
|
||||||
|
<el-select v-model="listQuery.userId" placeholder="请选择用户" clearable>
|
||||||
|
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="listQuery.licenseId" placeholder="请选择License" clearable>
|
||||||
|
<el-option v-for="item in licenseList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
||||||
|
<el-table-column type="index" width="100" :label="$t('table.id')"></el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.userName')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.userName}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.licenseName')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.licenseName}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.upFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.upFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.downFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.downFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.totalFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.totalFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column width="150px" align="center" :label="$t('table.date')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.date | parseTime('{y}-{m}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
||||||
|
:pageInfo-sizes="[10,20,30, 50]" :pageInfo-size="listQuery.size" layout="total, sizes, prev, pager, next, jumper" :total="total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fetchLicenseFlowMonthReportList } from '@/api/report'
|
||||||
|
import { userList } from '@/api/user'
|
||||||
|
import waves from '@/directive/waves'
|
||||||
|
import { licenseList } from '@/api/license'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'licenseFlowMonthReport',
|
||||||
|
directives: {
|
||||||
|
waves
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableKey: 0,
|
||||||
|
list: null,
|
||||||
|
total: null,
|
||||||
|
listLoading: false,
|
||||||
|
listQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
userId: undefined,
|
||||||
|
licenseId: undefined
|
||||||
|
},
|
||||||
|
userList: [],
|
||||||
|
licenseList: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
selectRow: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
this.getUserList()
|
||||||
|
this.getLicenseList()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getUserList()
|
||||||
|
this.getLicenseList()
|
||||||
|
if (this.$route.query.userId) {
|
||||||
|
this.listQuery.userId = this.$route.query.userId
|
||||||
|
}
|
||||||
|
if (this.$route.query.licenseId) {
|
||||||
|
this.listQuery.licenseId = this.$route.query.licenseId
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
fetchLicenseFlowMonthReportList(this.listQuery).then(response => {
|
||||||
|
this.list = response.data.data.records
|
||||||
|
this.total = response.data.data.total
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getUserList() {
|
||||||
|
userList().then(response => {
|
||||||
|
this.userList = response.data.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getLicenseList() {
|
||||||
|
licenseList().then(response => {
|
||||||
|
this.licenseList = response.data.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.listQuery.size = val
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.listQuery.current = val
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleShowClick(row) {
|
||||||
|
console.log(row)
|
||||||
|
},
|
||||||
|
handleLookOver(row) {
|
||||||
|
this.selectRow = row
|
||||||
|
this.dialogVisible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.job-msg-div{
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -34,6 +34,11 @@
|
|||||||
<span>{{scope.row.totalFlowDesc}}</span>
|
<span>{{scope.row.totalFlowDesc}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.actions')" min-width="230" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" @click="handleFlowMonthReportClick(scope.row)">流量月度明细</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
||||||
@@ -49,7 +54,7 @@ import { userList } from '@/api/user'
|
|||||||
import waves from '@/directive/waves'
|
import waves from '@/directive/waves'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'jobLog',
|
name: 'licenseFlowReport',
|
||||||
directives: {
|
directives: {
|
||||||
waves
|
waves
|
||||||
},
|
},
|
||||||
@@ -115,6 +120,9 @@ export default {
|
|||||||
handleLookOver(row) {
|
handleLookOver(row) {
|
||||||
this.selectRow = row
|
this.selectRow = row
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
handleFlowMonthReportClick(row) {
|
||||||
|
this.$router.push({ path: '/report/licenseFlowMonthReport', query: { userId: row.userId, licenseId: row.licenseId }})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container calendar-list-container">
|
||||||
|
<div class="filter-container">
|
||||||
|
<el-select v-model="listQuery.userId" placeholder="请选择用户" clearable>
|
||||||
|
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
||||||
|
<el-table-column type="index" width="100" :label="$t('table.id')"></el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.userName')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.userName}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.upFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.upFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.downFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.downFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.totalFlow')" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.totalFlowDesc}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column width="150px" align="center" :label="$t('table.date')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.date | parseTime('{y}-{m}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
||||||
|
:pageInfo-sizes="[10,20,30, 50]" :pageInfo-size="listQuery.size" layout="total, sizes, prev, pager, next, jumper" :total="total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { fetchUserFlowMonthReportList } from '@/api/report'
|
||||||
|
import { userList } from '@/api/user'
|
||||||
|
import waves from '@/directive/waves' // 水波纹指令
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'userFlowMonthReport',
|
||||||
|
directives: {
|
||||||
|
waves
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableKey: 0,
|
||||||
|
list: null,
|
||||||
|
total: null,
|
||||||
|
listLoading: false,
|
||||||
|
listQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
userId: undefined
|
||||||
|
},
|
||||||
|
userList: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
selectRow: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
this.getUserList()
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getUserList()
|
||||||
|
if (this.$route.query.userId) {
|
||||||
|
this.listQuery.userId = this.$route.query.userId
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true
|
||||||
|
fetchUserFlowMonthReportList(this.listQuery).then(response => {
|
||||||
|
this.list = response.data.data.records
|
||||||
|
this.total = response.data.data.total
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getUserList() {
|
||||||
|
userList().then(response => {
|
||||||
|
this.userList = response.data.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.listQuery.size = val
|
||||||
|
this.listQuery.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.listQuery.current = val
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleShowClick(row) {
|
||||||
|
console.log(row)
|
||||||
|
},
|
||||||
|
handleLookOver(row) {
|
||||||
|
this.selectRow = row
|
||||||
|
this.dialogVisible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.job-msg-div{
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -29,6 +29,12 @@
|
|||||||
<span>{{scope.row.totalFlowDesc}}</span>
|
<span>{{scope.row.totalFlowDesc}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" :label="$t('table.actions')" min-width="230" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" @click="handleFlowMonthReportClick(scope.row)">流量月度明细</el-button>
|
||||||
|
<el-button size="mini" type="text" @click="handleLicenseFlowMonthReportClick(scope.row)">License流量月度明细</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-pageInfo.sync="listQuery.current"
|
||||||
@@ -44,7 +50,7 @@ import { userList } from '@/api/user'
|
|||||||
import waves from '@/directive/waves' // 水波纹指令
|
import waves from '@/directive/waves' // 水波纹指令
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'jobLog',
|
name: 'userFlowReport',
|
||||||
directives: {
|
directives: {
|
||||||
waves
|
waves
|
||||||
},
|
},
|
||||||
@@ -57,7 +63,7 @@ export default {
|
|||||||
listQuery: {
|
listQuery: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
jobId: undefined
|
userId: undefined
|
||||||
},
|
},
|
||||||
userList: [],
|
userList: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@@ -72,8 +78,8 @@ export default {
|
|||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.getUserList()
|
this.getUserList()
|
||||||
if (this.$route.query.jobId) {
|
if (this.$route.query.userId) {
|
||||||
this.listQuery.jobId = this.$route.query.jobId
|
this.listQuery.userId = this.$route.query.userId
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -110,6 +116,12 @@ export default {
|
|||||||
handleLookOver(row) {
|
handleLookOver(row) {
|
||||||
this.selectRow = row
|
this.selectRow = row
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
handleFlowMonthReportClick(row) {
|
||||||
|
this.$router.push({ path: '/report/userFlowMonthReport', query: { userId: row.userId }})
|
||||||
|
},
|
||||||
|
handleLicenseFlowMonthReportClick(row) {
|
||||||
|
this.$router.push({ path: '/report/licenseFlowMonthReport', query: { userId: row.userId }})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ public class DateUtil {
|
|||||||
public static Date getHourBegin(Date date) {
|
public static Date getHourBegin(Date date) {
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.setTime(date);
|
calendar.setTime(date);
|
||||||
setCalender(calendar, calendar.get(Calendar.HOUR), 0, 0, 0);
|
setCalender(calendar, calendar.get(Calendar.HOUR_OF_DAY), 0, 0, 0);
|
||||||
return calendar.getTime();
|
return calendar.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ public class DateUtil {
|
|||||||
public static Date getHourEnd(Date date) {
|
public static Date getHourEnd(Date date) {
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.setTime(date);
|
calendar.setTime(date);
|
||||||
setCalender(calendar, calendar.get(Calendar.HOUR), 59, 59, 999);
|
setCalender(calendar, calendar.get(Calendar.HOUR_OF_DAY), 59, 59, 999);
|
||||||
return calendar.getTime();
|
return calendar.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
<finalName>${artifactId}</finalName>
|
<finalName>${artifactId}</finalName>
|
||||||
<archive>
|
<archive>
|
||||||
|
|||||||
@@ -9,4 +9,8 @@ public interface Constants {
|
|||||||
* 默认的端口分组ID
|
* 默认的端口分组ID
|
||||||
*/
|
*/
|
||||||
int DEFAULT_PORT_GROUP_ID = 1;
|
int DEFAULT_PORT_GROUP_ID = 1;
|
||||||
|
/**
|
||||||
|
* 首页流量监控展示天数
|
||||||
|
*/
|
||||||
|
int HOME_FLOW_DAYS = 15;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.ClientConnectRecordListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.ClientConnectRecordListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.ClientConnectRecordListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.ClientConnectRecordListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.service.ClientConnectRecordService;
|
import fun.asgc.neutrino.proxy.server.service.ClientConnectRecordService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller;
|
package fun.asgc.neutrino.proxy.server.controller;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LoginReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.LoginReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.LoginRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.LoginRes;
|
||||||
import fun.asgc.neutrino.proxy.server.service.UserService;
|
import fun.asgc.neutrino.proxy.server.service.UserService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.noear.solon.annotation.*;
|
import org.noear.solon.annotation.*;
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoExecuteReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoExecuteReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateEnableStatusReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateEnableStatusReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoExecuteRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoExecuteRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateEnableStatusRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateEnableStatusRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.JobInfoDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.JobInfoDO;
|
||||||
import fun.asgc.neutrino.proxy.server.service.JobInfoService;
|
import fun.asgc.neutrino.proxy.server.service.JobInfoService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobLogListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.JobLogListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobLogListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.JobLogListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.service.JobLogService;
|
import fun.asgc.neutrino.proxy.server.service.JobLogService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.service.LicenseService;
|
import fun.asgc.neutrino.proxy.server.service.LicenseService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.noear.solon.annotation.*;
|
import org.noear.solon.annotation.*;
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupCreateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupDeleteReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupListReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupUpdateEnableStatusReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupCreateRes;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupListRes;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupUpdateEnableStatusRes;
|
||||||
import fun.asgc.neutrino.proxy.server.service.PortGroupService;
|
import fun.asgc.neutrino.proxy.server.service.PortGroupService;
|
||||||
import fun.asgc.neutrino.proxy.server.service.PortPoolService;
|
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.noear.solon.annotation.*;
|
import org.noear.solon.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.service.PortMappingService;
|
import fun.asgc.neutrino.proxy.server.service.PortMappingService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.service.PortPoolService;
|
import fun.asgc.neutrino.proxy.server.service.PortPoolService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.noear.solon.annotation.*;
|
import org.noear.solon.annotation.*;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowMonthReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.UserFlowMonthReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.ReportDataViewRes;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.UserFlowReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.report.*;
|
||||||
import fun.asgc.neutrino.proxy.server.service.ReportService;
|
import fun.asgc.neutrino.proxy.server.service.ReportService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.noear.solon.annotation.Controller;
|
import org.noear.solon.annotation.Controller;
|
||||||
@@ -27,27 +27,13 @@ public class ReportController {
|
|||||||
private ReportService reportService;
|
private ReportService reportService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据一览:
|
* 首页数据一览
|
||||||
* 在线用户数 查询token有效的用户ID数
|
|
||||||
* 在线Client数 查询license表,状态为在线的数量
|
|
||||||
* 今日流量 上行/下行/总计
|
|
||||||
* 历史流量 上行/下行/总计
|
|
||||||
*
|
|
||||||
* 1、点击在线用户数:下方展示在线的用户列表,带分页
|
|
||||||
* 2、点击在线client数:下方展示在线的license列表,带分页
|
|
||||||
* 3、点击今日流量:下方展示今日的流量折线图(小时)。 筛选项:全部/用户列表
|
|
||||||
* 4、点击历史流量:下方展示历史流量折线图。筛选项:日/月 日期选择:日(展示最近30天,最多跨30日),月(展示最近12个月,最多跨12个月)
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Get
|
@Get
|
||||||
@Mapping("/data-view")
|
@Mapping("/home/data-view")
|
||||||
public ReportDataViewRes dataView() {
|
public HomeDataView homeDataView() {
|
||||||
return new ReportDataViewRes()
|
return reportService.homeDataView();
|
||||||
.setUserOnlineNumber(2).setEnableUserNumber(3).setUserNumber(5)
|
|
||||||
.setLicenseNumber(3).setEnableLicenseNumber(6).setLicenseNumber(6)
|
|
||||||
.setServerPortOnlineNumber(3).setEnableServerPortNumber(5).setServerPortNumber(6)
|
|
||||||
.setTotalUpstreamFlow("23K").setTotalDownwardFlow("47M")
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,4 +63,32 @@ public class ReportController {
|
|||||||
|
|
||||||
return reportService.licenseFlowReportPage(pageQuery, req);
|
return reportService.licenseFlowReportPage(pageQuery, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户流量报表月度明细
|
||||||
|
* @param pageQuery
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Get
|
||||||
|
@Mapping("/user/flow-month-report/page")
|
||||||
|
public PageInfo<UserFlowMonthReportRes> userFlowMonthReportPage(PageQuery pageQuery, UserFlowMonthReportReq req) {
|
||||||
|
ParamCheckUtil.checkNotNull(pageQuery, "pageQuery");
|
||||||
|
|
||||||
|
return reportService.userFlowMonthReportPage(pageQuery, req);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* license流量报表月度明细
|
||||||
|
* @param pageQuery
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Get
|
||||||
|
@Mapping("/license/flow-month-report/page")
|
||||||
|
public PageInfo<LicenseFlowMonthReportRes> licenseFlowMonthReportPage(PageQuery pageQuery, LicenseFlowMonthReportReq req) {
|
||||||
|
ParamCheckUtil.checkNotNull(pageQuery, "pageQuery");
|
||||||
|
|
||||||
|
return reportService.licenseFlowMonthReportPage(pageQuery, req);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
|
||||||
import fun.asgc.neutrino.proxy.server.service.UserService;
|
import fun.asgc.neutrino.proxy.server.service.UserService;
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ package fun.asgc.neutrino.proxy.server.controller;
|
|||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.UserLoginRecordListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.UserLoginRecordListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.UserLoginRecordListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.UserLoginRecordListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.service.UserLoginRecordService;
|
import fun.asgc.neutrino.proxy.server.service.UserLoginRecordService;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import org.noear.solon.annotation.Controller;
|
import org.noear.solon.annotation.Controller;
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2022 aoshiguchen
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: aoshiguchen
|
|
||||||
* @date: 2022/12/21
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class LicenseFlowReportReq {
|
|
||||||
private Integer userId;
|
|
||||||
private Integer licenseId;
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2022 aoshiguchen
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: aoshiguchen
|
|
||||||
* @date: 2022/12/21
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class UserFlowReportReq {
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
private Integer userId;
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.req.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LicenseFlowMonthReportReq {
|
||||||
|
private Integer userId;
|
||||||
|
private Integer licenseId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.req.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LicenseFlowReportReq {
|
||||||
|
private Integer userId;
|
||||||
|
private Integer licenseId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.req.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UserFlowMonthReportReq {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.req.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UserFlowReportReq {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户列表请求
|
* 用户列表请求
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.req;
|
package fun.asgc.neutrino.proxy.server.controller.req.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2022 aoshiguchen
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: aoshiguchen
|
|
||||||
* @date: 2022/12/21
|
|
||||||
*/
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@Data
|
|
||||||
public class LicenseFlowReportRes {
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
private Integer userId;
|
|
||||||
/**
|
|
||||||
* 用户名称
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
/**
|
|
||||||
* licenseId
|
|
||||||
*/
|
|
||||||
private Integer licenseId;
|
|
||||||
/**
|
|
||||||
* license名称
|
|
||||||
*/
|
|
||||||
private String licenseName;
|
|
||||||
/**
|
|
||||||
* 上行流量字节数
|
|
||||||
*/
|
|
||||||
private Long upFlowBytes;
|
|
||||||
/**
|
|
||||||
* 下行流量字节数
|
|
||||||
*/
|
|
||||||
private Long downFlowBytes;
|
|
||||||
/**
|
|
||||||
* 总流量字节数
|
|
||||||
*/
|
|
||||||
private Long totalFlowBytes;
|
|
||||||
/**
|
|
||||||
* 上行流量描述
|
|
||||||
*/
|
|
||||||
private String upFlowDesc;
|
|
||||||
/**
|
|
||||||
* 下行流量描述
|
|
||||||
*/
|
|
||||||
private String downFlowDesc;
|
|
||||||
/**
|
|
||||||
* 总流量描述
|
|
||||||
*/
|
|
||||||
private String totalFlowDesc;
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
|
||||||
|
|
||||||
public class PortGroupCreateRes {
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
|
||||||
|
|
||||||
public class PortPoolUpdateGroupRes {
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: aoshiguchen
|
|
||||||
* @date: 2022/9/12
|
|
||||||
*/
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@Data
|
|
||||||
public class ReportDataViewRes {
|
|
||||||
/**
|
|
||||||
* 在线用户数
|
|
||||||
*/
|
|
||||||
private Integer userOnlineNumber;
|
|
||||||
/**
|
|
||||||
* 启用用户数
|
|
||||||
*/
|
|
||||||
private Integer enableUserNumber;
|
|
||||||
/**
|
|
||||||
* 用户总数
|
|
||||||
*/
|
|
||||||
private Integer userNumber;
|
|
||||||
/**
|
|
||||||
* 在线license数
|
|
||||||
*/
|
|
||||||
private Integer licenseOnlineNumber;
|
|
||||||
/**
|
|
||||||
* 启用license数
|
|
||||||
*/
|
|
||||||
private Integer enableLicenseNumber;
|
|
||||||
/**
|
|
||||||
* license总数
|
|
||||||
*/
|
|
||||||
private Integer licenseNumber;
|
|
||||||
/**
|
|
||||||
* 服务端口在线数
|
|
||||||
*/
|
|
||||||
private Integer serverPortOnlineNumber;
|
|
||||||
/**
|
|
||||||
* 启用服务端口数
|
|
||||||
*/
|
|
||||||
private Integer enableServerPortNumber;
|
|
||||||
/**
|
|
||||||
* 总的服务端口数
|
|
||||||
*/
|
|
||||||
private Integer serverPortNumber;
|
|
||||||
/**
|
|
||||||
* 累计上行流量
|
|
||||||
*/
|
|
||||||
private String totalUpstreamFlow;
|
|
||||||
/**
|
|
||||||
* 累计下行流量
|
|
||||||
*/
|
|
||||||
private String totalDownwardFlow;
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2022 aoshiguchen
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: aoshiguchen
|
|
||||||
* @date: 2022/12/21
|
|
||||||
*/
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@Data
|
|
||||||
public class UserFlowReportRes {
|
|
||||||
/**
|
|
||||||
* 用户ID
|
|
||||||
*/
|
|
||||||
private Integer userId;
|
|
||||||
/**
|
|
||||||
* 用户名称
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
/**
|
|
||||||
* 上行流量字节数
|
|
||||||
*/
|
|
||||||
private Long upFlowBytes;
|
|
||||||
/**
|
|
||||||
* 下行流量字节数
|
|
||||||
*/
|
|
||||||
private Long downFlowBytes;
|
|
||||||
/**
|
|
||||||
* 总流量字节数
|
|
||||||
*/
|
|
||||||
private Long totalFlowBytes;
|
|
||||||
/**
|
|
||||||
* 上行流量描述
|
|
||||||
*/
|
|
||||||
private String upFlowDesc;
|
|
||||||
/**
|
|
||||||
* 下行流量描述
|
|
||||||
*/
|
|
||||||
private String downFlowDesc;
|
|
||||||
/**
|
|
||||||
* 总流量描述
|
|
||||||
*/
|
|
||||||
private String totalFlowDesc;
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.log;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新启用状态响应
|
* 更新启用状态响应
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2023/3/26
|
||||||
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public class HomeDataView {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* licenses数据
|
||||||
|
*/
|
||||||
|
private License license;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 端口映射
|
||||||
|
*/
|
||||||
|
private PortMapping portMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日流量
|
||||||
|
*/
|
||||||
|
private TodayFlow todayFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总流量
|
||||||
|
*/
|
||||||
|
private TotalFlow totalFlow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近7日流量
|
||||||
|
*/
|
||||||
|
private Last7dFlow last7dFlow;
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class License {
|
||||||
|
/**
|
||||||
|
* 总数
|
||||||
|
*/
|
||||||
|
private Integer totalCount;
|
||||||
|
/**
|
||||||
|
* 在线数
|
||||||
|
*/
|
||||||
|
private Integer onlineCount;
|
||||||
|
/**
|
||||||
|
* 离线数
|
||||||
|
*/
|
||||||
|
private Integer offlineCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class PortMapping {
|
||||||
|
/**
|
||||||
|
* 总数
|
||||||
|
*/
|
||||||
|
private Integer totalCount;
|
||||||
|
/**
|
||||||
|
* 在线数
|
||||||
|
*/
|
||||||
|
private Integer onlineCount;
|
||||||
|
/**
|
||||||
|
* 离线数
|
||||||
|
*/
|
||||||
|
private Integer offlineCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class TodayFlow {
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class TotalFlow {
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class Last7dFlow {
|
||||||
|
/**
|
||||||
|
* 最近7日流量数据
|
||||||
|
*/
|
||||||
|
private List<SingleDayFlow> dataList;
|
||||||
|
/**
|
||||||
|
* x轴日期
|
||||||
|
*/
|
||||||
|
private List<String> xDate;
|
||||||
|
/**
|
||||||
|
* 图例(上行流量、下行流量、总流量)
|
||||||
|
*/
|
||||||
|
private List<String> legendData;
|
||||||
|
/**
|
||||||
|
* 折线列表
|
||||||
|
*/
|
||||||
|
private List<Series> seriesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class SingleDayFlow {
|
||||||
|
/**
|
||||||
|
* 日期字符串
|
||||||
|
*/
|
||||||
|
private String dateStr;
|
||||||
|
/**
|
||||||
|
* 日期
|
||||||
|
*/
|
||||||
|
private Date date;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public static class Series {
|
||||||
|
/**
|
||||||
|
* 此处目前固定为:line
|
||||||
|
*/
|
||||||
|
private String seriesType;
|
||||||
|
/**
|
||||||
|
* 名称:上行流量、下行流量、总流量
|
||||||
|
*/
|
||||||
|
private String seriesName;
|
||||||
|
/**
|
||||||
|
* y值序列
|
||||||
|
*/
|
||||||
|
private List<Long> seriesData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public class LicenseFlowMonthReportRes {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* licenseId
|
||||||
|
*/
|
||||||
|
private Integer licenseId;
|
||||||
|
/**
|
||||||
|
* license名称
|
||||||
|
*/
|
||||||
|
private String licenseName;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
/**
|
||||||
|
* 日期
|
||||||
|
*/
|
||||||
|
private Date date;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public class LicenseFlowReportRes {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* licenseId
|
||||||
|
*/
|
||||||
|
private Integer licenseId;
|
||||||
|
/**
|
||||||
|
* license名称
|
||||||
|
*/
|
||||||
|
private String licenseName;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public class UserFlowMonthReportRes {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
/**
|
||||||
|
* 日期
|
||||||
|
*/
|
||||||
|
private Date date;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2022/12/21
|
||||||
|
*/
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Data
|
||||||
|
public class UserFlowReportRes {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
/**
|
||||||
|
* 总流量字节数
|
||||||
|
*/
|
||||||
|
private Long totalFlowBytes;
|
||||||
|
/**
|
||||||
|
* 上行流量描述
|
||||||
|
*/
|
||||||
|
private String upFlowDesc;
|
||||||
|
/**
|
||||||
|
* 下行流量描述
|
||||||
|
*/
|
||||||
|
private String downFlowDesc;
|
||||||
|
/**
|
||||||
|
* 总流量描述
|
||||||
|
*/
|
||||||
|
private String totalFlowDesc;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
|
public class PortGroupCreateRes {
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
|
public class PortPoolUpdateGroupRes {
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package fun.asgc.neutrino.proxy.server.controller.res;
|
package fun.asgc.neutrino.proxy.server.controller.res.system;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
public interface FlowReportDayMapper extends BaseMapper<FlowReportDayDO> {
|
public interface FlowReportDayMapper extends BaseMapper<FlowReportDayDO> {
|
||||||
default void clean(Date date) {
|
default void clean(Date date) {
|
||||||
this.delete(new LambdaQueryWrapper<FlowReportDayDO>()
|
this.delete(new LambdaQueryWrapper<FlowReportDayDO>()
|
||||||
.lt(FlowReportDayDO::getCreateTime, date)
|
.lt(FlowReportDayDO::getDate, date)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ public interface FlowReportDayMapper extends BaseMapper<FlowReportDayDO> {
|
|||||||
|
|
||||||
default List<FlowReportDayDO> findListByDateRange(Date startDate, Date endDate) {
|
default List<FlowReportDayDO> findListByDateRange(Date startDate, Date endDate) {
|
||||||
return this.selectList(new LambdaQueryWrapper<FlowReportDayDO>()
|
return this.selectList(new LambdaQueryWrapper<FlowReportDayDO>()
|
||||||
.le(FlowReportDayDO::getDate, startDate)
|
.ge(FlowReportDayDO::getDate, startDate)
|
||||||
.gt(FlowReportDayDO::getDate, endDate)
|
.le(FlowReportDayDO::getDate, endDate)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
public interface FlowReportHourMapper extends BaseMapper<FlowReportHourDO> {
|
public interface FlowReportHourMapper extends BaseMapper<FlowReportHourDO> {
|
||||||
default void clean(Date date) {
|
default void clean(Date date) {
|
||||||
this.delete(new LambdaQueryWrapper<FlowReportHourDO>()
|
this.delete(new LambdaQueryWrapper<FlowReportHourDO>()
|
||||||
.lt(FlowReportHourDO::getCreateTime, date)
|
.lt(FlowReportHourDO::getDate, date)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import java.util.Set;
|
|||||||
public interface FlowReportMinuteMapper extends BaseMapper<FlowReportMinuteDO> {
|
public interface FlowReportMinuteMapper extends BaseMapper<FlowReportMinuteDO> {
|
||||||
default void clean(Date date) {
|
default void clean(Date date) {
|
||||||
this.delete(new LambdaQueryWrapper<FlowReportMinuteDO>()
|
this.delete(new LambdaQueryWrapper<FlowReportMinuteDO>()
|
||||||
.lt(FlowReportMinuteDO::getCreateTime, date)
|
.lt(FlowReportMinuteDO::getDate, date)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package fun.asgc.neutrino.proxy.server.dal;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.PortGroupListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortGroupDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortGroupDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortMappingListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.PortMappingListRes;
|
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortMappingDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortMappingDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|||||||
@@ -24,9 +24,8 @@ package fun.asgc.neutrino.proxy.server.dal;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortPoolListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortPoolListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.AvailablePortListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortPoolListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.PortPoolListRes;
|
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.dal;
|
package fun.asgc.neutrino.proxy.server.dal;
|
||||||
|
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.controller.res.report.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.service.bo.FlowBO;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
|
import fun.asgc.neutrino.proxy.server.service.bo.SingleDayFlowBO;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -23,9 +22,48 @@ public interface ReportMapper {
|
|||||||
*/
|
*/
|
||||||
List<UserFlowReportRes> userFlowReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
List<UserFlowReportRes> userFlowReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
/**
|
/**
|
||||||
* 基于用户维度的流量报表
|
* 基于License维度的流量报表
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LicenseFlowReportRes> licenseFLowReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
List<LicenseFlowReportRes> licenseFLowReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户流量月度明细
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UserFlowMonthReportRes> userFlowMonthReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
|
/**
|
||||||
|
* License流量月度明细
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LicenseFlowMonthReportRes> licenseFLowMonthReportList(@Param("userId") Integer userId, @Param("licenseId") Integer licenseId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页 - 今日流量
|
||||||
|
* @param curDayBeginDate
|
||||||
|
* @param curDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
FlowBO homeTodayFlow(@Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页 - 总流量
|
||||||
|
* @param curMonthBeginDate
|
||||||
|
* @param curDayBeginDate
|
||||||
|
* @param curDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
FlowBO homeTotalFlow(@Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页最近7日流量
|
||||||
|
* @param beginDate
|
||||||
|
* @param curDayBeginDate
|
||||||
|
* @param curDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SingleDayFlowBO> homeLast7dFlowList(@Param("beginDate") Date beginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import fun.asgc.neutrino.proxy.server.service.FlowReportService;
|
|||||||
import fun.asgc.solon.extend.job.IJobHandler;
|
import fun.asgc.solon.extend.job.IJobHandler;
|
||||||
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Component;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ public class FlowReportForDayJob implements IJobHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(String param) throws Exception {
|
public void execute(String param) throws Exception {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
String dateStr = DateUtil.format(DateUtil.addDate(now, Calendar.DATE, -1), "yyyy-MM-dd");
|
String dateStr = getDateStr(now, param); // DateUtil.format(DateUtil.addDate(now, Calendar.DATE, -1), "yyyy-MM-dd");
|
||||||
Date date = DateUtil.parse(dateStr, "yyyy-MM-dd");
|
Date date = DateUtil.parse(dateStr, "yyyy-MM-dd");
|
||||||
Date startHourDate = DateUtil.getDayBegin(date);
|
Date startHourDate = DateUtil.getDayBegin(date);
|
||||||
Date endHourDate = DateUtil.getDayEnd(date);
|
Date endHourDate = DateUtil.getDayEnd(date);
|
||||||
@@ -99,4 +100,16 @@ public class FlowReportForDayJob implements IJobHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getDateStr(Date now, String params) {
|
||||||
|
if (StringUtils.isNotBlank(params)) {
|
||||||
|
try {
|
||||||
|
// 参数格式错误则取当前时间
|
||||||
|
DateUtil.parse(params, "yyyy-MM-dd");
|
||||||
|
return params;
|
||||||
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return DateUtil.format(DateUtil.addDate(now, Calendar.DATE, -1), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import fun.asgc.neutrino.proxy.server.service.FlowReportService;
|
|||||||
import fun.asgc.solon.extend.job.IJobHandler;
|
import fun.asgc.solon.extend.job.IJobHandler;
|
||||||
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Component;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ public class FlowReportForHourJob implements IJobHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(String param) throws Exception {
|
public void execute(String param) throws Exception {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
String dateStr = DateUtil.format(DateUtil.addDate(now, Calendar.HOUR, -1), "yyyy-MM-dd HH");
|
String dateStr = getDateStr(now, param); // DateUtil.format(DateUtil.addDate(now, Calendar.HOUR, -1), "yyyy-MM-dd HH");
|
||||||
Date date = DateUtil.parse(dateStr, "yyyy-MM-dd HH");
|
Date date = DateUtil.parse(dateStr, "yyyy-MM-dd HH");
|
||||||
Date startHourDate = DateUtil.getHourBegin(date);
|
Date startHourDate = DateUtil.getHourBegin(date);
|
||||||
Date endHourDate = DateUtil.getHourEnd(date);
|
Date endHourDate = DateUtil.getHourEnd(date);
|
||||||
@@ -75,4 +76,17 @@ public class FlowReportForHourJob implements IJobHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getDateStr(Date now, String params) {
|
||||||
|
if (StringUtils.isNotBlank(params)) {
|
||||||
|
try {
|
||||||
|
// 参数格式错误则取当前时间
|
||||||
|
DateUtil.parse(params, "yyyy-MM-dd HH");
|
||||||
|
return params;
|
||||||
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return DateUtil.format(DateUtil.addDate(now, Calendar.HOUR, -1), "yyyy-MM-dd HH");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import fun.asgc.neutrino.proxy.server.service.FlowReportService;
|
|||||||
import fun.asgc.solon.extend.job.IJobHandler;
|
import fun.asgc.solon.extend.job.IJobHandler;
|
||||||
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
import fun.asgc.solon.extend.job.annotation.JobHandler;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Component;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ public class FlowReportForMonthJob implements IJobHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(String param) throws Exception {
|
public void execute(String param) throws Exception {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
String dateStr = DateUtil.format(DateUtil.addDate(now, Calendar.MONTH, -1), "yyyy-MM");
|
String dateStr = getDateStr(now, param); // DateUtil.format(DateUtil.addDate(now, Calendar.MONTH, -1), "yyyy-MM");
|
||||||
Date date = DateUtil.parse(dateStr, "yyyy-MM");
|
Date date = DateUtil.parse(dateStr, "yyyy-MM");
|
||||||
Date startDayDate = DateUtil.getMonthBegin(date);
|
Date startDayDate = DateUtil.getMonthBegin(date);
|
||||||
Date endEndDate = DateUtil.getMonthEnd(date);
|
Date endEndDate = DateUtil.getMonthEnd(date);
|
||||||
@@ -77,4 +78,16 @@ public class FlowReportForMonthJob implements IJobHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getDateStr(Date now, String params) {
|
||||||
|
if (StringUtils.isNotBlank(params)) {
|
||||||
|
try {
|
||||||
|
// 参数格式错误则取当前时间
|
||||||
|
DateUtil.parse(params, "yyyy-MM");
|
||||||
|
return params;
|
||||||
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return DateUtil.format(DateUtil.addDate(now, Calendar.MONTH, -1), "yyyy-MM");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import com.github.pagehelper.PageHelper;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.ClientConnectRecordListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.ClientConnectRecordListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.ClientConnectRecordListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.ClientConnectRecordListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.ClientConnectRecordMapper;
|
import fun.asgc.neutrino.proxy.server.dal.ClientConnectRecordMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoExecuteReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoExecuteReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateEnableStatusReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateEnableStatusReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoExecuteRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoExecuteRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateEnableStatusRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateEnableStatusRes;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.JobInfoMapper;
|
import fun.asgc.neutrino.proxy.server.dal.JobInfoMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.JobInfoDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.JobInfoDO;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import com.github.pagehelper.Page;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.JobLogListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.JobLogListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobLogListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.JobLogListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.JobLogMapper;
|
import fun.asgc.neutrino.proxy.server.dal.JobLogMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.JobLogDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.JobLogDO;
|
||||||
import fun.asgc.solon.extend.job.IJobCallback;
|
import fun.asgc.solon.extend.job.IJobCallback;
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
|||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseCreateReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseCreateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseUpdateEnableStatusReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseUpdateEnableStatusReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseUpdateReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseUpdateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.LicenseDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.LicenseDO;
|
||||||
@@ -78,7 +78,7 @@ public class LicenseService implements Lifecycle {
|
|||||||
|
|
||||||
public List<LicenseListRes> list(LicenseListReq req) {
|
public List<LicenseListRes> list(LicenseListReq req) {
|
||||||
List<LicenseDO> list = licenseMapper.selectList(new LambdaQueryWrapper<LicenseDO>()
|
List<LicenseDO> list = licenseMapper.selectList(new LambdaQueryWrapper<LicenseDO>()
|
||||||
.eq(LicenseDO::getEnable, EnableStatusEnum.ENABLE.getStatus())
|
.eq(null != req.getEnable(), LicenseDO::getEnable, req.getEnable())
|
||||||
);
|
);
|
||||||
List<LicenseListRes> licenseList = assembleConvertLicenses(list);
|
List<LicenseListRes> licenseList = assembleConvertLicenses(list);
|
||||||
return licenseList;
|
return licenseList;
|
||||||
|
|||||||
@@ -10,15 +10,15 @@ import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
|||||||
import fun.asgc.neutrino.proxy.server.constant.Constants;
|
import fun.asgc.neutrino.proxy.server.constant.Constants;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupCreateReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupCreateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupUpdateEnableStatusReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupUpdateEnableStatusReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupCreateRes;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupListRes;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupUpdateEnableStatusRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortGroupMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortGroupMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortPoolMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortPoolMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.LicenseDO;
|
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortGroupDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortGroupDO;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortMappingDO;
|
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
|
||||||
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
|
||||||
import ma.glasnost.orika.MapperFacade;
|
import ma.glasnost.orika.MapperFacade;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.service;
|
package fun.asgc.neutrino.proxy.server.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -12,8 +11,11 @@ import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
|||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingCreateReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingListReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingUpdateEnableStatusReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingUpdateReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortMappingMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortMappingMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortPoolMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortPoolMapper;
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortGroupMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortGroupMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.PortMappingMapper;
|
import fun.asgc.neutrino.proxy.server.dal.PortMappingMapper;
|
||||||
@@ -23,7 +23,6 @@ import org.apache.ibatis.solon.annotation.Db;
|
|||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Component;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package fun.asgc.neutrino.proxy.server.service;
|
package fun.asgc.neutrino.proxy.server.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -8,12 +9,20 @@ import fun.asgc.neutrino.proxy.core.util.DateUtil;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.db.DbConfig;
|
import fun.asgc.neutrino.proxy.server.base.db.DbConfig;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.constant.Constants;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
|
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.JobLogListRes;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowMonthReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowReportReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
|
import fun.asgc.neutrino.proxy.server.controller.req.report.UserFlowMonthReportReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.req.report.UserFlowReportReq;
|
||||||
|
import fun.asgc.neutrino.proxy.server.controller.res.report.*;
|
||||||
|
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
|
||||||
|
import fun.asgc.neutrino.proxy.server.dal.PortMappingMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.ReportMapper;
|
import fun.asgc.neutrino.proxy.server.dal.ReportMapper;
|
||||||
|
import fun.asgc.neutrino.proxy.server.dal.entity.LicenseDO;
|
||||||
|
import fun.asgc.neutrino.proxy.server.dal.entity.PortMappingDO;
|
||||||
|
import fun.asgc.neutrino.proxy.server.service.bo.FlowBO;
|
||||||
|
import fun.asgc.neutrino.proxy.server.service.bo.SingleDayFlowBO;
|
||||||
import fun.asgc.neutrino.proxy.server.util.FormatUtil;
|
import fun.asgc.neutrino.proxy.server.util.FormatUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import ma.glasnost.orika.MapperFacade;
|
import ma.glasnost.orika.MapperFacade;
|
||||||
@@ -21,8 +30,8 @@ import org.apache.ibatis.solon.annotation.Db;
|
|||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Component;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: aoshiguchen
|
* @author: aoshiguchen
|
||||||
@@ -35,9 +44,56 @@ public class ReportService {
|
|||||||
private MapperFacade mapperFacade;
|
private MapperFacade mapperFacade;
|
||||||
@Db
|
@Db
|
||||||
private ReportMapper reportMapper;
|
private ReportMapper reportMapper;
|
||||||
|
@Db
|
||||||
|
private LicenseMapper licenseMapper;
|
||||||
|
@Db
|
||||||
|
private PortMappingMapper portMappingMapper;
|
||||||
@Inject
|
@Inject
|
||||||
private DbConfig dbConfig;
|
private DbConfig dbConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页图表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public HomeDataView homeDataView() {
|
||||||
|
HomeDataView homeDataView = new HomeDataView();
|
||||||
|
homeDataView.setLicense(new HomeDataView.License().setTotalCount(0).setOnlineCount(0));
|
||||||
|
homeDataView.setPortMapping(new HomeDataView.PortMapping().setTotalCount(0).setOnlineCount(0));
|
||||||
|
homeDataView.setTodayFlow(new HomeDataView.TodayFlow().setUpFlowBytes(0L).setDownFlowBytes(0L));
|
||||||
|
homeDataView.setTotalFlow(new HomeDataView.TotalFlow().setUpFlowBytes(0L).setDownFlowBytes(0L));
|
||||||
|
|
||||||
|
// 查询license列表
|
||||||
|
List<LicenseDO> licenseDOList = licenseMapper.listAll();
|
||||||
|
if (CollectionUtil.isNotEmpty(licenseDOList)) {
|
||||||
|
homeDataView.getLicense().setTotalCount(licenseDOList.size());
|
||||||
|
homeDataView.getLicense().setOnlineCount((int)licenseDOList.stream().filter(e -> OnlineStatusEnum.ONLINE.getStatus().equals(e.getIsOnline())).count());
|
||||||
|
}
|
||||||
|
// 查询端口映射列表
|
||||||
|
List<PortMappingDO> portMappingDOList = portMappingMapper.selectList(new LambdaQueryWrapper<>());
|
||||||
|
if (CollectionUtil.isNotEmpty(portMappingDOList)) {
|
||||||
|
homeDataView.getPortMapping().setTotalCount(portMappingDOList.size());
|
||||||
|
homeDataView.getPortMapping().setOnlineCount((int)portMappingDOList.stream().filter(e -> OnlineStatusEnum.ONLINE.getStatus().equals(e.getIsOnline())).count());
|
||||||
|
}
|
||||||
|
// 今日流量
|
||||||
|
Date now = new Date();
|
||||||
|
FlowBO todayFlow = reportMapper.homeTodayFlow(DateUtil.getDayBegin(now), now);
|
||||||
|
homeDataView.setTodayFlow(mapperFacade.map(todayFlow, HomeDataView.TodayFlow.class));
|
||||||
|
|
||||||
|
// 总流量
|
||||||
|
FlowBO totalFlow = reportMapper.homeTotalFlow(DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
|
||||||
|
homeDataView.setTotalFlow(mapperFacade.map(totalFlow, HomeDataView.TotalFlow.class));
|
||||||
|
|
||||||
|
// 最近n日流量
|
||||||
|
Integer days = Constants.HOME_FLOW_DAYS;
|
||||||
|
List<SingleDayFlowBO> last7dFlowList = reportMapper.homeLast7dFlowList(DateUtil.getDayBegin(DateUtil.addDate(now, Calendar.DATE, -(days - 1))), DateUtil.getDayBegin(now), now);
|
||||||
|
homeDataView.setLast7dFlow(new HomeDataView.Last7dFlow());
|
||||||
|
homeDataView.getLast7dFlow().setDataList(mapperFacade.mapAsList(last7dFlowList, HomeDataView.SingleDayFlow.class));
|
||||||
|
|
||||||
|
// 数据处理
|
||||||
|
fillHomeDataView(homeDataView, now);
|
||||||
|
return homeDataView;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户流量报表分页
|
* 用户流量报表分页
|
||||||
* @param pageQuery
|
* @param pageQuery
|
||||||
@@ -66,6 +122,34 @@ public class ReportService {
|
|||||||
return PageInfo.of(list, result.getTotal(), pageQuery.getCurrent(), pageQuery.getSize());
|
return PageInfo.of(list, result.getTotal(), pageQuery.getCurrent(), pageQuery.getSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户流量月度明细
|
||||||
|
* @param pageQuery
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageInfo<UserFlowMonthReportRes> userFlowMonthReportPage(PageQuery pageQuery, UserFlowMonthReportReq req) {
|
||||||
|
Page<UserFlowMonthReportRes> result = PageHelper.startPage(pageQuery.getCurrent(), pageQuery.getSize());
|
||||||
|
Date now = new Date();
|
||||||
|
List<UserFlowMonthReportRes> list = reportMapper.userFlowMonthReportList(req.getUserId(), DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
|
||||||
|
fillUserFlowMonthReport(list);
|
||||||
|
return PageInfo.of(list, result.getTotal(), pageQuery.getCurrent(), pageQuery.getSize());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* license流量月度明细
|
||||||
|
* @param pageQuery
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageInfo<LicenseFlowMonthReportRes> licenseFlowMonthReportPage(PageQuery pageQuery, LicenseFlowMonthReportReq req) {
|
||||||
|
Page<LicenseFlowMonthReportRes> result = PageHelper.startPage(pageQuery.getCurrent(), pageQuery.getSize());
|
||||||
|
Date now = new Date();
|
||||||
|
List<LicenseFlowMonthReportRes> list = reportMapper.licenseFLowMonthReportList(req.getUserId(), req.getLicenseId(), DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
|
||||||
|
fillLicenseFlowMonthReport(list);
|
||||||
|
return PageInfo.of(list, result.getTotal(), pageQuery.getCurrent(), pageQuery.getSize());
|
||||||
|
}
|
||||||
|
|
||||||
private void fillUserFlowReport(List<UserFlowReportRes> list) {
|
private void fillUserFlowReport(List<UserFlowReportRes> list) {
|
||||||
if (CollectionUtil.isEmpty(list)) {
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
return;
|
return;
|
||||||
@@ -99,4 +183,171 @@ public class ReportService {
|
|||||||
item.setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(totalFlowBytes));
|
item.setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(totalFlowBytes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fillUserFlowMonthReport(List<UserFlowMonthReportRes> list) {
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (UserFlowMonthReportRes item : list) {
|
||||||
|
long upFlowBytes = (null == item.getUpFlowBytes()) ? 0 : item.getUpFlowBytes();
|
||||||
|
long downFlowBytes = (null == item.getDownFlowBytes()) ? 0 : item.getDownFlowBytes();
|
||||||
|
long totalFlowBytes = upFlowBytes + downFlowBytes;
|
||||||
|
item.setUpFlowBytes(upFlowBytes);
|
||||||
|
item.setDownFlowBytes(downFlowBytes);
|
||||||
|
item.setTotalFlowBytes(totalFlowBytes);
|
||||||
|
item.setUpFlowDesc(FormatUtil.getSizeDescByByteCount(upFlowBytes));
|
||||||
|
item.setDownFlowDesc(FormatUtil.getSizeDescByByteCount(downFlowBytes));
|
||||||
|
item.setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(totalFlowBytes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillLicenseFlowMonthReport(List<LicenseFlowMonthReportRes> list) {
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (LicenseFlowMonthReportRes item : list) {
|
||||||
|
long upFlowBytes = (null == item.getUpFlowBytes()) ? 0 : item.getUpFlowBytes();
|
||||||
|
long downFlowBytes = (null == item.getDownFlowBytes()) ? 0 : item.getDownFlowBytes();
|
||||||
|
long totalFlowBytes = upFlowBytes + downFlowBytes;
|
||||||
|
item.setUpFlowBytes(upFlowBytes);
|
||||||
|
item.setDownFlowBytes(downFlowBytes);
|
||||||
|
item.setTotalFlowBytes(totalFlowBytes);
|
||||||
|
item.setUpFlowDesc(FormatUtil.getSizeDescByByteCount(upFlowBytes));
|
||||||
|
item.setDownFlowDesc(FormatUtil.getSizeDescByByteCount(downFlowBytes));
|
||||||
|
item.setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(totalFlowBytes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillHomeDataView(HomeDataView homeDataView, Date now) {
|
||||||
|
if (null == homeDataView) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// License
|
||||||
|
if (null == homeDataView.getLicense()) {
|
||||||
|
homeDataView.setLicense(new HomeDataView.License());
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getLicense().getTotalCount()) {
|
||||||
|
homeDataView.getLicense().setTotalCount(0);
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getLicense().getOnlineCount()) {
|
||||||
|
homeDataView.getLicense().setOnlineCount(0);
|
||||||
|
}
|
||||||
|
homeDataView.getLicense().setOfflineCount(homeDataView.getLicense().getTotalCount() - homeDataView.getLicense().getOnlineCount());
|
||||||
|
|
||||||
|
// PortMapping
|
||||||
|
if (null == homeDataView.getPortMapping()) {
|
||||||
|
homeDataView.setPortMapping(new HomeDataView.PortMapping());
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getPortMapping().getTotalCount()) {
|
||||||
|
homeDataView.getPortMapping().setTotalCount(0);
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getPortMapping().getOnlineCount()) {
|
||||||
|
homeDataView.getPortMapping().setOnlineCount(0);
|
||||||
|
}
|
||||||
|
homeDataView.getPortMapping().setOfflineCount(homeDataView.getPortMapping().getTotalCount() - homeDataView.getPortMapping().getOnlineCount());
|
||||||
|
|
||||||
|
// TodayFlow
|
||||||
|
if (null == homeDataView.getTodayFlow()) {
|
||||||
|
homeDataView.setTodayFlow(new HomeDataView.TodayFlow());
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getTodayFlow().getUpFlowBytes()) {
|
||||||
|
homeDataView.getTodayFlow().setUpFlowBytes(0L);
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getTodayFlow().getDownFlowBytes()) {
|
||||||
|
homeDataView.getTodayFlow().setDownFlowBytes(0L);
|
||||||
|
}
|
||||||
|
homeDataView.getTodayFlow().setTotalFlowBytes(homeDataView.getTodayFlow().getUpFlowBytes() + homeDataView.getTodayFlow().getDownFlowBytes());
|
||||||
|
homeDataView.getTodayFlow().setUpFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTodayFlow().getUpFlowBytes()));
|
||||||
|
homeDataView.getTodayFlow().setDownFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTodayFlow().getDownFlowBytes()));
|
||||||
|
homeDataView.getTodayFlow().setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTodayFlow().getTotalFlowBytes()));
|
||||||
|
|
||||||
|
// TotalFlow
|
||||||
|
if (null == homeDataView.getTotalFlow()) {
|
||||||
|
homeDataView.setTotalFlow(new HomeDataView.TotalFlow());
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getTotalFlow().getUpFlowBytes()) {
|
||||||
|
homeDataView.getTotalFlow().setUpFlowBytes(0L);
|
||||||
|
}
|
||||||
|
if (null == homeDataView.getTotalFlow().getDownFlowBytes()) {
|
||||||
|
homeDataView.getTotalFlow().setDownFlowBytes(0L);
|
||||||
|
}
|
||||||
|
homeDataView.getTotalFlow().setTotalFlowBytes(homeDataView.getTotalFlow().getUpFlowBytes() + homeDataView.getTotalFlow().getDownFlowBytes());
|
||||||
|
homeDataView.getTotalFlow().setUpFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTotalFlow().getUpFlowBytes()));
|
||||||
|
homeDataView.getTotalFlow().setDownFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTotalFlow().getDownFlowBytes()));
|
||||||
|
homeDataView.getTotalFlow().setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(homeDataView.getTotalFlow().getTotalFlowBytes()));
|
||||||
|
|
||||||
|
// 最近N日流量
|
||||||
|
Integer days = Constants.HOME_FLOW_DAYS;
|
||||||
|
HomeDataView.Last7dFlow last7dFlow = homeDataView.getLast7dFlow();
|
||||||
|
if (null == last7dFlow) {
|
||||||
|
last7dFlow = new HomeDataView.Last7dFlow();
|
||||||
|
homeDataView.setLast7dFlow(last7dFlow);
|
||||||
|
}
|
||||||
|
if (null == last7dFlow.getDataList()) {
|
||||||
|
last7dFlow.setDataList(Collections.emptyList());
|
||||||
|
}
|
||||||
|
// 数据列表
|
||||||
|
Set<String> existDateStrList = new HashSet<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(last7dFlow.getDataList())) {
|
||||||
|
for (HomeDataView.SingleDayFlow singleDayFlow : last7dFlow.getDataList()) {
|
||||||
|
if (null == singleDayFlow.getUpFlowBytes()) {
|
||||||
|
singleDayFlow.setUpFlowBytes(0L);
|
||||||
|
}
|
||||||
|
if (null == singleDayFlow.getDownFlowBytes()) {
|
||||||
|
singleDayFlow.setDownFlowBytes(0L);
|
||||||
|
}
|
||||||
|
singleDayFlow.setTotalFlowBytes(singleDayFlow.getUpFlowBytes() + singleDayFlow.getDownFlowBytes());
|
||||||
|
singleDayFlow.setUpFlowDesc(FormatUtil.getSizeDescByByteCount(singleDayFlow.getUpFlowBytes()));
|
||||||
|
singleDayFlow.setDownFlowDesc(FormatUtil.getSizeDescByByteCount(singleDayFlow.getDownFlowBytes()));
|
||||||
|
singleDayFlow.setTotalFlowDesc(FormatUtil.getSizeDescByByteCount(singleDayFlow.getTotalFlowBytes()));
|
||||||
|
singleDayFlow.setDateStr(DateUtil.format(singleDayFlow.getDate(), "yyyy-MM-dd"));
|
||||||
|
existDateStrList.add(singleDayFlow.getDateStr());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取最近7天的日期字符串列表。防止因统计数据缺失,造成图表展示错误的问题,缺失的日期数据,自动填充0
|
||||||
|
List<String> dateList = DateUtil.getBetweenTimes(DateUtil.format(DateUtil.addDate(now, Calendar.DATE, -(days - 1)), "yyyy-MM-dd"), DateUtil.format(now, "yyyy-MM-dd"));
|
||||||
|
for (String dateStr : dateList) {
|
||||||
|
if (existDateStrList.contains(dateStr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
last7dFlow.getDataList().add(new HomeDataView.SingleDayFlow()
|
||||||
|
.setDate(DateUtil.parse(dateStr, "yyyy-MM-dd"))
|
||||||
|
.setDateStr(dateStr)
|
||||||
|
.setUpFlowBytes(0L)
|
||||||
|
.setUpFlowDesc("0B")
|
||||||
|
.setDownFlowBytes(0L)
|
||||||
|
.setDownFlowDesc("0B")
|
||||||
|
.setTotalFlowBytes(0L)
|
||||||
|
.setTotalFlowDesc("0B")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按日期升序
|
||||||
|
Collections.sort(last7dFlow.getDataList(), Comparator.comparing(HomeDataView.SingleDayFlow::getDate));
|
||||||
|
// x轴日期
|
||||||
|
last7dFlow.setXDate(last7dFlow.getDataList().stream().map(HomeDataView.SingleDayFlow::getDateStr).collect(Collectors.toList()));
|
||||||
|
// 图例
|
||||||
|
last7dFlow.setLegendData(Lists.newArrayList("上行流量", "下行流量", "总流量"));
|
||||||
|
// 折线图
|
||||||
|
List<HomeDataView.Series> seriesList = Lists.newArrayList();
|
||||||
|
last7dFlow.setSeriesList(seriesList);
|
||||||
|
// 上行流量折线
|
||||||
|
seriesList.add(new HomeDataView.Series()
|
||||||
|
.setSeriesType("line")
|
||||||
|
.setSeriesName(last7dFlow.getLegendData().get(0))
|
||||||
|
.setSeriesData(last7dFlow.getDataList().stream().map(HomeDataView.SingleDayFlow::getUpFlowBytes).collect(Collectors.toList()))
|
||||||
|
);
|
||||||
|
// 下行流量折线
|
||||||
|
seriesList.add(new HomeDataView.Series()
|
||||||
|
.setSeriesType("line")
|
||||||
|
.setSeriesName(last7dFlow.getLegendData().get(1))
|
||||||
|
.setSeriesData(last7dFlow.getDataList().stream().map(HomeDataView.SingleDayFlow::getDownFlowBytes).collect(Collectors.toList()))
|
||||||
|
);
|
||||||
|
// 总流量折线
|
||||||
|
seriesList.add(new HomeDataView.Series()
|
||||||
|
.setSeriesType("line")
|
||||||
|
.setSeriesName(last7dFlow.getLegendData().get(2))
|
||||||
|
.setSeriesData(last7dFlow.getDataList().stream().map(HomeDataView.SingleDayFlow::getTotalFlowBytes).collect(Collectors.toList()))
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import com.github.pagehelper.Page;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
|
||||||
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
import fun.asgc.neutrino.proxy.server.base.page.PageQuery;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.UserLoginRecordListReq;
|
import fun.asgc.neutrino.proxy.server.controller.req.log.UserLoginRecordListReq;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.UserLoginRecordListRes;
|
import fun.asgc.neutrino.proxy.server.controller.res.log.UserLoginRecordListRes;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserLoginRecordMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserLoginRecordMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
|
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import fun.asgc.neutrino.proxy.server.base.rest.ServiceException;
|
|||||||
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
import fun.asgc.neutrino.proxy.server.base.rest.SystemContextHolder;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
|
||||||
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.req.*;
|
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.controller.res.*;
|
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserLoginRecordMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserLoginRecordMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
|
||||||
import fun.asgc.neutrino.proxy.server.dal.UserTokenMapper;
|
import fun.asgc.neutrino.proxy.server.dal.UserTokenMapper;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.service.bo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2023/3/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FlowBO {
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package fun.asgc.neutrino.proxy.server.service.bo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单日流量
|
||||||
|
* @author: aoshiguchen
|
||||||
|
* @date: 2023/3/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SingleDayFlowBO {
|
||||||
|
/**
|
||||||
|
* 日期
|
||||||
|
*/
|
||||||
|
private Date date;
|
||||||
|
/**
|
||||||
|
* 上行流量字节数
|
||||||
|
*/
|
||||||
|
private Long upFlowBytes;
|
||||||
|
/**
|
||||||
|
* 下行流量字节数
|
||||||
|
*/
|
||||||
|
private Long downFlowBytes;
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.PortGroupMapper">
|
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.PortGroupMapper">
|
||||||
|
|
||||||
<select id="selectPortGroupListResList" resultType="fun.asgc.neutrino.proxy.server.controller.res.PortGroupListRes">
|
<select id="selectPortGroupListResList" resultType="fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupListRes">
|
||||||
SELECT g.*,
|
SELECT g.*,
|
||||||
CASE
|
CASE
|
||||||
WHEN g.possessor_type = 1 THEN
|
WHEN g.possessor_type = 1 THEN
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.PortPoolMapper">
|
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.PortPoolMapper">
|
||||||
|
|
||||||
<select id="selectResList" resultType="fun.asgc.neutrino.proxy.server.controller.res.PortPoolListRes">
|
<select id="selectResList" resultType="fun.asgc.neutrino.proxy.server.controller.res.system.PortPoolListRes">
|
||||||
SELECT p.*,
|
SELECT p.*,
|
||||||
g.possessor_type,
|
g.possessor_type,
|
||||||
g.`name` group_name
|
g.`name` group_name
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
ORDER BY p.id
|
ORDER BY p.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getAvailablePortList" resultType="fun.asgc.neutrino.proxy.server.controller.res.PortPoolListRes">
|
<select id="getAvailablePortList" resultType="fun.asgc.neutrino.proxy.server.controller.res.system.PortPoolListRes">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.ReportMapper">
|
<mapper namespace="fun.asgc.neutrino.proxy.server.dal.ReportMapper">
|
||||||
|
|
||||||
<select id="userFlowReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes">
|
<select id="userFlowReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowReportRes">
|
||||||
SELECT
|
SELECT
|
||||||
u.id AS 'userId',
|
u.id AS 'userId',
|
||||||
u.name AS 'userName',
|
u.name AS 'userName',
|
||||||
SUM(frm.write_bytes + frd.write_bytes + frm2.write_bytes) AS 'upFlowBytes',
|
SUM(IFNULL(frm.write_bytes,0) + IFNULL(frd.write_bytes,0) + IFNULL(frm2.write_bytes,0)) AS 'upFlowBytes',
|
||||||
SUM(frm.read_bytes + frd.read_bytes + frm2.read_bytes) AS 'downFlowBytes',
|
SUM(IFNULL(frm.read_bytes,0) + IFNULL(frd.read_bytes,0) + IFNULL(frm2.read_bytes,0)) AS 'downFlowBytes',
|
||||||
SUM(frm.write_bytes) monthWriteBytes,
|
IFNULL(SUM(frm.write_bytes),0) monthWriteBytes,
|
||||||
SUM(frm.read_bytes) monthReadBytes,
|
IFNULL(SUM(frm.read_bytes),0) monthReadBytes,
|
||||||
SUM(frd.write_bytes) dayWriteBytes,
|
IFNULL(SUM(frd.write_bytes),0) dayWriteBytes,
|
||||||
SUM(frd.read_bytes) dayReadBytes,
|
IFNULL(SUM(frd.read_bytes),0) dayReadBytes,
|
||||||
SUM(frm2.write_bytes) minuteWriteBytes,
|
IFNULL(SUM(frm2.write_bytes),0) minuteWriteBytes,
|
||||||
SUM(frm2.read_bytes) minuteReadBytes
|
IFNULL(SUM(frm2.read_bytes),0) minuteReadBytes
|
||||||
FROM `user` u
|
FROM `user` u
|
||||||
LEFT JOIN (SELECT user_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_month GROUP BY user_id) frm ON u.id = frm.user_id
|
LEFT JOIN (SELECT user_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_month GROUP BY user_id) frm ON u.id = frm.user_id
|
||||||
LEFT JOIN (SELECT user_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_day
|
LEFT JOIN (SELECT user_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_day
|
||||||
@@ -30,20 +30,20 @@
|
|||||||
GROUP BY u.id
|
GROUP BY u.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="licenseFLowReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes">
|
<select id="licenseFLowReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.report.LicenseFlowReportRes">
|
||||||
SELECT
|
SELECT
|
||||||
l.id AS 'licenseId',
|
l.id AS 'licenseId',
|
||||||
l.name AS 'licenseName',
|
l.name AS 'licenseName',
|
||||||
u.id AS 'userId',
|
u.id AS 'userId',
|
||||||
u.name AS 'userName',
|
u.name AS 'userName',
|
||||||
SUM(frm.write_bytes + frd.write_bytes + frm2.write_bytes) AS 'upFlowBytes',
|
SUM(IFNULL(frm.write_bytes,0) + IFNULL(frd.write_bytes,0) + IFNULL(frm2.write_bytes,0)) AS 'upFlowBytes',
|
||||||
SUM(frm.read_bytes + frd.read_bytes + frm2.read_bytes) AS 'downFlowBytes',
|
SUM(IFNULL(frm.read_bytes,0) + IFNULL(frd.read_bytes,0) + IFNULL(frm2.read_bytes,0)) AS 'downFlowBytes',
|
||||||
SUM(frm.write_bytes) monthWriteBytes,
|
IFNULL(SUM(frm.write_bytes),0) monthWriteBytes,
|
||||||
SUM(frm.read_bytes) monthReadBytes,
|
IFNULL(SUM(frm.read_bytes),0) monthReadBytes,
|
||||||
SUM(frd.write_bytes) dayWriteBytes,
|
IFNULL(SUM(frd.write_bytes),0) dayWriteBytes,
|
||||||
SUM(frd.read_bytes) dayReadBytes,
|
IFNULL(SUM(frd.read_bytes),0) dayReadBytes,
|
||||||
SUM(frm2.write_bytes) minuteWriteBytes,
|
IFNULL(SUM(frm2.write_bytes),0) minuteWriteBytes,
|
||||||
SUM(frm2.read_bytes) minuteReadBytes
|
IFNULL(SUM(frm2.read_bytes),0) minuteReadBytes
|
||||||
FROM `license` l
|
FROM `license` l
|
||||||
LEFT JOIN `user` u ON l.user_id = u.id
|
LEFT JOIN `user` u ON l.user_id = u.id
|
||||||
LEFT JOIN (SELECT license_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_month GROUP BY license_id) frm ON l.id = frm.license_id
|
LEFT JOIN (SELECT license_id,sum(write_bytes) write_bytes,sum(read_bytes) read_bytes from flow_report_month GROUP BY license_id) frm ON l.id = frm.license_id
|
||||||
@@ -60,4 +60,191 @@
|
|||||||
</where>
|
</where>
|
||||||
GROUP BY l.id
|
GROUP BY l.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="userFlowMonthReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowMonthReportRes">
|
||||||
|
SELECT
|
||||||
|
T2.user_id,
|
||||||
|
u.name AS 'userName',
|
||||||
|
T2.date,
|
||||||
|
T2.upFlowBytes,
|
||||||
|
T2.downFlowBytes
|
||||||
|
FROM (
|
||||||
|
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frm.user_id,
|
||||||
|
frm.date,
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_month frm
|
||||||
|
GROUP BY frm.user_id,frm.date
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
T1.user_id,
|
||||||
|
#{curMonthBeginDate} AS 'date',
|
||||||
|
IFNULL(SUM(T1.upFlowBytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(T1.downFlowBytes),0) AS 'downFlowBytes'
|
||||||
|
FROM (
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frd.user_id,
|
||||||
|
frd.license_id,
|
||||||
|
frd.write_bytes AS 'upFlowBytes',
|
||||||
|
frd.read_bytes AS 'downFlowBytes',
|
||||||
|
frd.date
|
||||||
|
FROM flow_report_day frd
|
||||||
|
WHERE frd.date >= #{curMonthBeginDate} AND frd.date <= #{curDayBeginDate}
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frm.user_id,
|
||||||
|
frm.license_id,
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes',
|
||||||
|
#{curDayBeginDate} AS 'date'
|
||||||
|
FROM flow_report_minute frm
|
||||||
|
WHERE frm.date >= #{curDayBeginDate} AND frm.date <= #{curDate}
|
||||||
|
GROUP BY frm.user_id,frm.license_id
|
||||||
|
)
|
||||||
|
) T1
|
||||||
|
GROUP BY T1.user_id
|
||||||
|
)
|
||||||
|
) T2
|
||||||
|
LEFT JOIN `user` u ON u.id = T2.user_id
|
||||||
|
<where>
|
||||||
|
<if test="userId != null">
|
||||||
|
AND u.id = #{userId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY T2.user_id ASC,T2.date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="licenseFLowMonthReportList" resultType="fun.asgc.neutrino.proxy.server.controller.res.report.LicenseFlowMonthReportRes">
|
||||||
|
SELECT
|
||||||
|
T2.user_id,
|
||||||
|
u.name AS 'userName',
|
||||||
|
T2.license_id,
|
||||||
|
l.`name` AS 'licenseName',
|
||||||
|
T2.date,
|
||||||
|
T2.upFlowBytes,
|
||||||
|
T2.downFlowBytes
|
||||||
|
FROM (
|
||||||
|
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frm.user_id,
|
||||||
|
frm.license_id,
|
||||||
|
frm.date,
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_month frm
|
||||||
|
GROUP BY frm.user_id,frm.license_id,frm.date
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
T1.user_id,
|
||||||
|
T1.license_id,
|
||||||
|
#{curMonthBeginDate} AS 'date',
|
||||||
|
IFNULL(SUM(T1.upFlowBytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(T1.downFlowBytes),0) AS 'downFlowBytes'
|
||||||
|
FROM (
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frd.user_id,
|
||||||
|
frd.license_id,
|
||||||
|
frd.write_bytes AS 'upFlowBytes',
|
||||||
|
frd.read_bytes AS 'downFlowBytes',
|
||||||
|
frd.date
|
||||||
|
FROM flow_report_day frd
|
||||||
|
WHERE frd.date >= #{curMonthBeginDate} AND frd.date <= #{curDayBeginDate}
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frm.user_id,
|
||||||
|
frm.license_id,
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes',
|
||||||
|
#{curDayBeginDate} AS 'date'
|
||||||
|
FROM flow_report_minute frm
|
||||||
|
WHERE frm.date >= #{curDayBeginDate} AND frm.date <= #{curDate}
|
||||||
|
GROUP BY frm.user_id,frm.license_id
|
||||||
|
)
|
||||||
|
) T1
|
||||||
|
GROUP BY T1.user_id,T1.license_id
|
||||||
|
)
|
||||||
|
) T2
|
||||||
|
LEFT JOIN `user` u ON u.id = T2.user_id
|
||||||
|
LEFT JOIN `license` l ON l.id = T2.license_id
|
||||||
|
<where>
|
||||||
|
<if test="userId != null">
|
||||||
|
AND u.id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="licenseId != null">
|
||||||
|
AND l.id = #{licenseId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY T2.user_id ASC,T2.license_id,T2.date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="homeTodayFlow" resultType="fun.asgc.neutrino.proxy.server.service.bo.FlowBO">
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_minute frm
|
||||||
|
WHERE frm.date >= #{curDayBeginDate} AND frm.date <= #{curDate}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="homeTotalFlow" resultType="fun.asgc.neutrino.proxy.server.service.bo.FlowBO">
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(T.upFlowBytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(T.downFlowBytes),0) AS 'downFlowBytes'
|
||||||
|
FROM (
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_month frm
|
||||||
|
) UNION ALL (
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(frd.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frd.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_day frd
|
||||||
|
WHERE frd.date >= #{curMonthBeginDate} AND frd.date <= #{curDayBeginDate}
|
||||||
|
) UNION ALL (
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_minute frm
|
||||||
|
WHERE frm.date >= #{curDayBeginDate} AND frm.date <= #{curDate}
|
||||||
|
)
|
||||||
|
) T
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="homeLast7dFlowList" resultType="fun.asgc.neutrino.proxy.server.service.bo.SingleDayFlowBO">
|
||||||
|
SELECT
|
||||||
|
T.*
|
||||||
|
FROM (
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
frd.date,
|
||||||
|
IFNULL(SUM(frd.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frd.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_day frd
|
||||||
|
WHERE frd.date >= #{beginDate} AND frd.date <= #{curDayBeginDate}
|
||||||
|
GROUP BY frd.date
|
||||||
|
) UNION ALL (
|
||||||
|
SELECT
|
||||||
|
#{curDayBeginDate} AS 'date',
|
||||||
|
IFNULL(SUM(frm.write_bytes),0) AS 'upFlowBytes',
|
||||||
|
IFNULL(SUM(frm.read_bytes),0) AS 'downFlowBytes'
|
||||||
|
FROM flow_report_minute frm
|
||||||
|
WHERE frm.date >= #{curDayBeginDate} AND frm.date <= #{curDate}
|
||||||
|
)
|
||||||
|
) T
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,49 +1,29 @@
|
|||||||
# 功能点
|
# 1.x剩余规划
|
||||||
- [ ] 用户流量月度明细
|
- [ ] 参考鹊桥,增加对域名的支持
|
||||||
- [ ] License流量月度明细
|
- [ ] 官网上线
|
||||||
- [ ] 支持批量端口映射
|
|
||||||
- 首页图表📈
|
|
||||||
- 1、License在线数
|
|
||||||
- 2、端口映射在线数
|
|
||||||
- 3、今日流量(上行、下行)
|
|
||||||
- 4、历史流量(上行、下行)
|
|
||||||
- 点击1~4 切换列表
|
|
||||||
- 在线License列表
|
|
||||||
- 用户名
|
|
||||||
- License名称
|
|
||||||
- LicenseKey
|
|
||||||
- 在线端口映射列表
|
|
||||||
- 用户名
|
|
||||||
- License名称
|
|
||||||
- 服务端口
|
|
||||||
- 代理客户端
|
|
||||||
- 今日24小时流量列表(按小时到排序)
|
|
||||||
- 用户名
|
|
||||||
- License名称
|
|
||||||
- 时间
|
|
||||||
- 流量
|
|
||||||
- 历史流量列表(取最近12个月按月到排序)
|
|
||||||
- 用户名
|
|
||||||
- License名称
|
|
||||||
- 时间
|
|
||||||
- 流量
|
|
||||||
- 今日流量折线图(上行、下行、总流量,按分钟统计0~24小时)
|
|
||||||
# Bug
|
# Bug
|
||||||
- windows环境下直接运行发布版的jar包,日志输出乱码
|
- windows环境下直接运行发布版的jar包,日志输出乱码
|
||||||
- ~~部份用户windows环境下启动客户端,扫描类个数为0个~~
|
|
||||||
- 代理mysql时,使用未开启远程访问的账号走代理访问mysql,代理客户端出现断开现象
|
- 代理mysql时,使用未开启远程访问的账号走代理访问mysql,代理客户端出现断开现象
|
||||||
|
|
||||||
# 2.x规划
|
# 2.x规划
|
||||||
- [x] 全面重构:底层更换为Solon + Mybatis Plus
|
- 插件开发
|
||||||
- [ ] neutrino-proxy-solon-plugin
|
- [ ] neutrino-proxy-solon-plugin
|
||||||
- 规范协议:代理协议规范化,方便后续更好扩展、支持不同语言客户端接入
|
- [ ] neutrino-proxy-jetbrains-plugin
|
||||||
- 端口池优化:支持为license设置独占端口。方便后续开发jetbrains插件、solon插件
|
- [ ] neutrino-proxy-starter (SpringBoot)
|
||||||
- 精细化控制:支持针对用户限速、限流
|
- 基础优化
|
||||||
- 参考鹊桥,增加对域名的支持
|
- [ ] 支持批量端口映射
|
||||||
- MGT增加服务端维护
|
- [ ] 代理协议规范化,方便后续更好扩展、支持不同语言客户端接入
|
||||||
- 支持调整服务端端口
|
- 监控运维
|
||||||
- 支持重启
|
- [ ] 监控服务端状态
|
||||||
- 支持查看服务端日志
|
- [ ] 支持调整服务端端口、证书
|
||||||
- 支持证书上传下载
|
- [ ] 服务端版本、协议版本、客户端版本管理
|
||||||
- 支持客户端版本管理
|
- [ ] 服务端日志
|
||||||
- 支持原生编译
|
- client+计划启动
|
||||||
|
- [ ] 安卓客户端
|
||||||
|
- [ ] 基于electron-egg的多平台客户端
|
||||||
|
|
||||||
|
# 3.x规划
|
||||||
|
- [ ] 支持针对用户限速、限流
|
||||||
|
- [ ] 支持P2P穿透
|
||||||
|
- [ ] 支持原生编译
|
||||||