新增用户流量月度明细、license流量月度明细

This commit is contained in:
aoshiguchen
2023-03-26 15:54:00 +08:00
parent 144adfe73f
commit c4726941ea
122 changed files with 955 additions and 386 deletions
+16
View File
@@ -14,3 +14,19 @@ export function fetchLicenseFlowReportList(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
})
}
+3 -1
View File
@@ -59,7 +59,9 @@ export default {
clientConnectLog: '客户端连接日志',
report: '报表管理',
userFlowReport: '用户流量报表',
licenseFlowReport: 'License流量报表'
licenseFlowReport: 'License流量报表',
userFlowMonthReport: '用户流量月度明细',
licenseFlowMonthReport: 'License流量月度明细'
},
navbar: {
logOut: '退出登录',
+3 -1
View File
@@ -91,7 +91,9 @@ export const asyncRouterMap = [
},
children: [
{ 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,133 @@
<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.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'
export default {
name: 'jobLog',
directives: {
waves
},
data() {
return {
tableKey: 0,
list: null,
total: null,
listLoading: false,
listQuery: {
current: 1,
size: 10,
jobId: undefined
},
userList: [],
dialogVisible: false,
selectRow: {}
}
},
filters: {
},
created() {
this.getList()
this.getUserList()
},
activated() {
this.getUserList()
if (this.$route.query.jobId) {
this.listQuery.jobId = this.$route.query.jobId
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
})
},
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>
@@ -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: 'jobLog',
directives: {
waves
},
data() {
return {
tableKey: 0,
list: null,
total: null,
listLoading: false,
listQuery: {
current: 1,
size: 10,
jobId: undefined
},
userList: [],
dialogVisible: false,
selectRow: {}
}
},
filters: {
},
created() {
this.getList()
this.getUserList()
},
activated() {
this.getUserList()
if (this.$route.query.jobId) {
this.listQuery.jobId = this.$route.query.jobId
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>
@@ -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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.ClientConnectRecordListReq;
import fun.asgc.neutrino.proxy.server.controller.res.ClientConnectRecordListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.ClientConnectRecordListReq;
import fun.asgc.neutrino.proxy.server.controller.res.log.ClientConnectRecordListRes;
import fun.asgc.neutrino.proxy.server.service.ClientConnectRecordService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
import lombok.extern.slf4j.Slf4j;
@@ -22,8 +22,8 @@
package fun.asgc.neutrino.proxy.server.controller;
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.res.LoginRes;
import fun.asgc.neutrino.proxy.server.controller.req.system.LoginReq;
import fun.asgc.neutrino.proxy.server.controller.res.system.LoginRes;
import fun.asgc.neutrino.proxy.server.service.UserService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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.PageQuery;
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.JobInfoListReq;
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoExecuteRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoListRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateEnableStatusRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateRes;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoExecuteReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoListReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoExecuteRes;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoListRes;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateEnableStatusRes;
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.service.JobInfoService;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.JobLogListReq;
import fun.asgc.neutrino.proxy.server.controller.res.JobLogListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.JobLogListReq;
import fun.asgc.neutrino.proxy.server.controller.res.log.JobLogListRes;
import fun.asgc.neutrino.proxy.server.service.JobLogService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.*;
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
import fun.asgc.neutrino.proxy.server.service.LicenseService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupCreateReq;
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.PortPoolService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
import org.apache.commons.lang3.StringUtils;
import org.noear.solon.annotation.*;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.*;
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
import fun.asgc.neutrino.proxy.server.service.PortMappingService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.base.rest.Authorization;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
import fun.asgc.neutrino.proxy.server.service.PortPoolService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.ReportDataViewRes;
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowMonthReportReq;
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowReportReq;
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.service.ReportService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
import org.noear.solon.annotation.Controller;
@@ -77,4 +77,32 @@ public class ReportController {
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.SystemContextHolder;
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
import fun.asgc.neutrino.proxy.server.dal.entity.UserDO;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.UserLoginRecordListReq;
import fun.asgc.neutrino.proxy.server.controller.res.UserLoginRecordListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.UserLoginRecordListReq;
import fun.asgc.neutrino.proxy.server.controller.res.log.UserLoginRecordListRes;
import fun.asgc.neutrino.proxy.server.service.UserLoginRecordService;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
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
* SOFTWARE.
*/
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
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;
@@ -1,4 +1,4 @@
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.proxy;
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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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;
@@ -1,4 +1,4 @@
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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;
@@ -1,4 +1,4 @@
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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;
@@ -1,4 +1,4 @@
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
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
* SOFTWARE.
*/
package fun.asgc.neutrino.proxy.server.controller.req;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.req.system;
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,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
* SOFTWARE.
*/
package fun.asgc.neutrino.proxy.server.controller.res;
package fun.asgc.neutrino.proxy.server.controller.res.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.log;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
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 lombok.Data;
@@ -19,7 +19,7 @@
* 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;
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
* 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
* SOFTWARE.
*/
package fun.asgc.neutrino.proxy.server.controller.res;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
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 lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.proxy;
import lombok.Data;
@@ -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;
}
@@ -1,4 +1,4 @@
package fun.asgc.neutrino.proxy.server.controller.res;
package fun.asgc.neutrino.proxy.server.controller.res.report;
import lombok.Data;
import lombok.experimental.Accessors;
@@ -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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
import java.util.Date;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
import lombok.experimental.Accessors;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
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.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;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
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;
@@ -19,7 +19,7 @@
* 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;
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.experimental.Accessors;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
package fun.asgc.neutrino.proxy.server.controller.res.system;
import lombok.Data;
@@ -19,7 +19,7 @@
* 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;
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
* SOFTWARE.
*/
package fun.asgc.neutrino.proxy.server.controller.res;
package fun.asgc.neutrino.proxy.server.controller.res.system;
/**
*
@@ -2,8 +2,8 @@ package fun.asgc.neutrino.proxy.server.dal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupListReq;
import fun.asgc.neutrino.proxy.server.controller.res.PortGroupListRes;
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupListReq;
import fun.asgc.neutrino.proxy.server.controller.res.system.PortGroupListRes;
import fun.asgc.neutrino.proxy.server.dal.entity.PortGroupDO;
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.mapper.BaseMapper;
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
import fun.asgc.neutrino.proxy.server.controller.req.PortMappingListReq;
import fun.asgc.neutrino.proxy.server.controller.res.PortMappingListRes;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingListReq;
import fun.asgc.neutrino.proxy.server.dal.entity.PortMappingDO;
import org.apache.ibatis.annotations.Mapper;
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.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import fun.asgc.neutrino.proxy.server.controller.req.PortPoolListReq;
import fun.asgc.neutrino.proxy.server.controller.res.AvailablePortListRes;
import fun.asgc.neutrino.proxy.server.controller.res.PortPoolListRes;
import fun.asgc.neutrino.proxy.server.controller.req.system.PortPoolListReq;
import fun.asgc.neutrino.proxy.server.controller.res.system.PortPoolListRes;
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -1,9 +1,9 @@
package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.LicenseFlowMonthReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.LicenseFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowMonthReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowReportRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -23,9 +23,22 @@ public interface ReportMapper {
*/
List<UserFlowReportRes> userFlowReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
/**
* 基于用户维度的流量报表
* 基于License维度的流量报表
* @param userId
* @return
*/
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("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
}
@@ -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.PageQuery;
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.res.ClientConnectRecordListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.ClientConnectRecordListReq;
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.LicenseMapper;
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.constant.EnableStatusEnum;
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.JobInfoListReq;
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.JobInfoUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoExecuteRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoListRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateEnableStatusRes;
import fun.asgc.neutrino.proxy.server.controller.res.JobInfoUpdateRes;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoExecuteReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoListReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.system.JobInfoUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoExecuteRes;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoListRes;
import fun.asgc.neutrino.proxy.server.controller.res.system.JobInfoUpdateEnableStatusRes;
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.entity.JobInfoDO;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
@@ -26,8 +26,8 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
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.res.JobLogListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.JobLogListReq;
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.entity.JobLogDO;
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.ExceptionConstant;
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.LicenseListReq;
import fun.asgc.neutrino.proxy.server.controller.req.LicenseUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.LicenseUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseCreateReq;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseListReq;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.LicenseUpdateReq;
import fun.asgc.neutrino.proxy.server.controller.res.proxy.*;
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
import fun.asgc.neutrino.proxy.server.dal.entity.LicenseDO;
@@ -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.EnableStatusEnum;
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.PortGroupListReq;
import fun.asgc.neutrino.proxy.server.controller.req.PortGroupUpdateEnableStatusReq;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.PortGroupCreateReq;
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.dal.PortGroupMapper;
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.PortMappingDO;
import fun.asgc.neutrino.proxy.server.dal.entity.PortPoolDO;
import fun.asgc.neutrino.proxy.server.util.ParamCheckUtil;
import ma.glasnost.orika.MapperFacade;
@@ -1,7 +1,6 @@
package fun.asgc.neutrino.proxy.server.service;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.github.pagehelper.Page;
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.ExceptionConstant;
import fun.asgc.neutrino.proxy.server.constant.OnlineStatusEnum;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.proxy.PortMappingCreateReq;
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.PortMappingMapper;
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.constant.EnableStatusEnum;
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
import fun.asgc.neutrino.proxy.server.dal.LicenseMapper;
import fun.asgc.neutrino.proxy.server.dal.PortGroupMapper;
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.Inject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -3,16 +3,18 @@ package fun.asgc.neutrino.proxy.server.service;
import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.google.common.collect.Lists;
import fun.asgc.neutrino.proxy.core.util.DateUtil;
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.PageQuery;
import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq;
import fun.asgc.neutrino.proxy.server.controller.res.JobLogListRes;
import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowMonthReportReq;
import fun.asgc.neutrino.proxy.server.controller.req.report.LicenseFlowReportReq;
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.LicenseFlowMonthReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.LicenseFlowReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowMonthReportRes;
import fun.asgc.neutrino.proxy.server.controller.res.report.UserFlowReportRes;
import fun.asgc.neutrino.proxy.server.dal.ReportMapper;
import fun.asgc.neutrino.proxy.server.util.FormatUtil;
import lombok.extern.slf4j.Slf4j;
@@ -66,6 +68,34 @@ public class ReportService {
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(), 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) {
if (CollectionUtil.isEmpty(list)) {
return;
@@ -99,4 +129,38 @@ public class ReportService {
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));
}
}
}
@@ -7,8 +7,8 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import fun.asgc.neutrino.proxy.server.base.page.PageInfo;
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.res.UserLoginRecordListRes;
import fun.asgc.neutrino.proxy.server.controller.req.log.UserLoginRecordListReq;
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.UserMapper;
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.constant.EnableStatusEnum;
import fun.asgc.neutrino.proxy.server.constant.ExceptionConstant;
import fun.asgc.neutrino.proxy.server.controller.req.*;
import fun.asgc.neutrino.proxy.server.controller.res.*;
import fun.asgc.neutrino.proxy.server.controller.req.system.*;
import fun.asgc.neutrino.proxy.server.controller.res.system.*;
import fun.asgc.neutrino.proxy.server.dal.UserLoginRecordMapper;
import fun.asgc.neutrino.proxy.server.dal.UserMapper;
import fun.asgc.neutrino.proxy.server.dal.UserTokenMapper;
@@ -2,7 +2,7 @@
<!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">
<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.*,
CASE
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">
<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.*,
g.possessor_type,
g.`name` group_name
@@ -16,7 +16,7 @@
ORDER BY p.id
</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
*
FROM
@@ -2,7 +2,7 @@
<!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">
<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
u.id AS 'userId',
u.name AS 'userName',
@@ -30,7 +30,7 @@
GROUP BY u.id
</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
l.id AS 'licenseId',
l.name AS 'licenseName',
@@ -60,4 +60,131 @@
</where>
GROUP BY l.id
</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 &lt;= #{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 &lt;= #{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 &lt;= #{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 &lt;= #{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>
</where>
ORDER BY T2.user_id ASC,T2.license_id,T2.date DESC
</select>
</mapper>