From 9d36a4a32a5df29268434e9d867b5531cbeb7835 Mon Sep 17 00:00:00 2001
From: aoshiguchen <1052045476@qq.com>
Date: Sun, 26 Mar 2023 16:11:29 +0800
Subject: [PATCH] =?UTF-8?q?license=E6=B5=81=E9=87=8F=E6=9C=88=E5=BA=A6?=
=?UTF-8?q?=E6=98=8E=E7=BB=86=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AElicense?=
=?UTF-8?q?=E8=BF=87=E6=BB=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/report/licenseFlowMonthReport.vue | 15 ++++++++++++++-
.../neutrino/proxy/server/dal/ReportMapper.java | 2 +-
.../proxy/server/service/LicenseService.java | 2 +-
.../proxy/server/service/ReportService.java | 2 +-
.../src/main/resources/mapper/ReportMapper.xml | 3 +++
5 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/neutrino-proxy-admin/src/views/report/licenseFlowMonthReport.vue b/neutrino-proxy-admin/src/views/report/licenseFlowMonthReport.vue
index 32e5567e..f2f7e407 100644
--- a/neutrino-proxy-admin/src/views/report/licenseFlowMonthReport.vue
+++ b/neutrino-proxy-admin/src/views/report/licenseFlowMonthReport.vue
@@ -4,6 +4,9 @@
+
+
+
{{$t('table.search')}}
@@ -52,6 +55,7 @@
import { fetchLicenseFlowMonthReportList } from '@/api/report'
import { userList } from '@/api/user'
import waves from '@/directive/waves'
+import { licenseList } from '@/api/license'
export default {
name: 'jobLog',
@@ -67,9 +71,11 @@ export default {
listQuery: {
current: 1,
size: 10,
- jobId: undefined
+ userId: undefined,
+ licenseId: undefined
},
userList: [],
+ licenseList: [],
dialogVisible: false,
selectRow: {}
}
@@ -79,9 +85,11 @@ export default {
created() {
this.getList()
this.getUserList()
+ this.getLicenseList()
},
activated() {
this.getUserList()
+ this.getLicenseList()
if (this.$route.query.jobId) {
this.listQuery.jobId = this.$route.query.jobId
this.getList()
@@ -101,6 +109,11 @@ export default {
this.userList = response.data.data
})
},
+ getLicenseList() {
+ licenseList().then(response => {
+ this.licenseList = response.data.data
+ })
+ },
handleFilter() {
this.listQuery.current = 1
this.getList()
diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/ReportMapper.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/ReportMapper.java
index e9b9f421..5b0cc732 100644
--- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/ReportMapper.java
+++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/ReportMapper.java
@@ -40,5 +40,5 @@ public interface ReportMapper {
* @param userId
* @return
*/
- List licenseFLowMonthReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
+ List licenseFLowMonthReportList(@Param("userId") Integer userId, @Param("licenseId") Integer licenseId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
}
diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/LicenseService.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/LicenseService.java
index 68c08922..f6316680 100644
--- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/LicenseService.java
+++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/LicenseService.java
@@ -78,7 +78,7 @@ public class LicenseService implements Lifecycle {
public List list(LicenseListReq req) {
List list = licenseMapper.selectList(new LambdaQueryWrapper()
- .eq(LicenseDO::getEnable, EnableStatusEnum.ENABLE.getStatus())
+ .eq(null != req.getEnable(), LicenseDO::getEnable, req.getEnable())
);
List licenseList = assembleConvertLicenses(list);
return licenseList;
diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java
index d2f71aca..18b41261 100644
--- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java
+++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java
@@ -91,7 +91,7 @@ public class ReportService {
public PageInfo licenseFlowMonthReportPage(PageQuery pageQuery, LicenseFlowMonthReportReq req) {
Page result = PageHelper.startPage(pageQuery.getCurrent(), pageQuery.getSize());
Date now = new Date();
- List list = reportMapper.licenseFLowMonthReportList(req.getUserId(), DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
+ List 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());
}
diff --git a/neutrino-proxy-server/src/main/resources/mapper/ReportMapper.xml b/neutrino-proxy-server/src/main/resources/mapper/ReportMapper.xml
index 213badaf..271fb426 100644
--- a/neutrino-proxy-server/src/main/resources/mapper/ReportMapper.xml
+++ b/neutrino-proxy-server/src/main/resources/mapper/ReportMapper.xml
@@ -184,6 +184,9 @@
AND u.id = #{userId}
+
+ AND l.id = #{licenseId}
+
ORDER BY T2.user_id ASC,T2.license_id,T2.date DESC