Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-ds
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李良停
sh-ds
Commits
7d262b38
Commit
7d262b38
authored
Jan 27, 2021
by
喻春霖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add resove stat
parent
734ec4a7
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
174 additions
and
56 deletions
+174
-56
OauthClient.java
.../chineseall/eden/authcenter/agent/client/OauthClient.java
+14
-0
LogStatisticsController.java
.../authcenter/agent/controller/LogStatisticsController.java
+119
-53
StatItem.java
...ava/com/chineseall/eden/authcenter/agent/vo/StatItem.java
+1
-1
statistics.html
...center-agent/src/main/resources/templates/statistics.html
+1
-1
alpha-framework-dao-mongo-2.0.8.0006.jar
...thcenter-log/lib/alpha-framework-dao-mongo-2.0.8.0006.jar
+0
-0
pom.xml
eden-authcenter-log/pom.xml
+1
-1
AuthLogDao.java
...va/com/chineseall/eden/authcenter/log/dao/AuthLogDao.java
+22
-0
AuthLogService.java
...hineseall/eden/authcenter/log/service/AuthLogService.java
+5
-0
AuthLogServiceImpl.java
.../eden/authcenter/log/service/impl/AuthLogServiceImpl.java
+11
-0
No files found.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/client/OauthClient.java
View file @
7d262b38
package
com
.
chineseall
.
eden
.
authcenter
.
agent
.
client
;
import
cn.sh.chineseall.framework.core.util.CollectionUtils
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.Objects
;
/**
* Created by yuchunlin on 2019/5/28.
...
...
@@ -18,4 +20,16 @@ public class OauthClient {
private
List
<
ClientItem
>
clients
;
public
ClientItem
getClientItem
(
String
clientId
){
if
(
CollectionUtils
.
isNotEmpty
(
clients
)){
for
(
ClientItem
item
:
clients
)
{
if
(
Objects
.
equals
(
item
.
getClientId
(),
clientId
)){
return
item
;
}
}
}
return
null
;
}
}
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/controller/LogStatisticsController.java
View file @
7d262b38
This diff is collapsed.
Click to expand it.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/vo/StatItem.java
View file @
7d262b38
...
...
@@ -6,5 +6,5 @@ import lombok.Data;
public
class
StatItem
{
private
String
code
;
private
String
name
;
private
Integer
count
;
private
long
count
;
}
eden-authcenter-agent/src/main/resources/templates/statistics.html
View file @
7d262b38
...
...
@@ -122,7 +122,7 @@
</div>
<script
type=
"text/javascript"
>
var
baseUrl
=
"
https://ds-test.etextbook.cn
/"
;
var
baseUrl
=
"/"
;
new
Vue
({
el
:
'#app'
,
data
:
{
...
...
eden-authcenter-log/lib/alpha-framework-dao-mongo-2.0.
6.0014
.jar
→
eden-authcenter-log/lib/alpha-framework-dao-mongo-2.0.
8.0006
.jar
View file @
7d262b38
No preview for this file type
eden-authcenter-log/pom.xml
View file @
7d262b38
...
...
@@ -33,7 +33,7 @@
<artifactId>
alpha-framework-dao-mongo
</artifactId>
<version>
2.0.6.0014
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/lib/alpha-framework-dao-mongo-2.0.
6.0014
.jar
</systemPath>
<systemPath>
${project.basedir}/lib/alpha-framework-dao-mongo-2.0.
8.0006
.jar
</systemPath>
</dependency>
<dependency>
...
...
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/dao/AuthLogDao.java
View file @
7d262b38
...
...
@@ -7,6 +7,7 @@ import com.chineseall.eden.authcenter.log.model.AuthLog;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
@Component
...
...
@@ -46,4 +47,25 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St
Query
query
=
Query
.
query
(
criteria
);
return
count
(
query
);
}
public
List
<
String
>
distinct
(
String
key
,
Map
<
String
,
Object
>
params
){
Criteria
criteria
=
new
Criteria
();
if
(
null
!=
params
&&
params
.
size
()
>
0
){
params
.
forEach
((
k
,
v
)->{
criteria
.
and
(
k
).
is
(
v
);
});
}
return
super
.
distinct
(
key
,
new
Query
(
criteria
),
String
.
class
);
}
public
long
count
(
Map
<
String
,
Object
>
params
){
Criteria
criteria
=
new
Criteria
();
if
(
null
!=
params
&&
params
.
size
()
>
0
){
params
.
forEach
((
k
,
v
)->{
criteria
.
and
(
k
).
is
(
v
);
});
}
Query
query
=
Query
.
query
(
criteria
);
return
count
(
query
);
}
}
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/service/AuthLogService.java
View file @
7d262b38
...
...
@@ -2,6 +2,7 @@ package com.chineseall.eden.authcenter.log.service;
import
com.chineseall.eden.authcenter.log.model.AuthLog
;
import
java.util.List
;
import
java.util.Map
;
public
interface
AuthLogService
{
...
...
@@ -13,4 +14,8 @@ public interface AuthLogService {
Long
countLoginByParams
(
Map
<
String
,
Object
>
params
);
Long
countLogoutByParams
(
Map
<
String
,
Object
>
params
);
List
<
String
>
distinct
(
String
key
,
Map
<
String
,
Object
>
prams
);
long
count
(
Map
<
String
,
Object
>
prams
);
}
eden-authcenter-log/src/main/java/com/chineseall/eden/authcenter/log/service/impl/AuthLogServiceImpl.java
View file @
7d262b38
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
...
...
@@ -42,4 +43,14 @@ public class AuthLogServiceImpl implements AuthLogService {
public
Long
countLogoutByParams
(
Map
<
String
,
Object
>
params
)
{
return
authLogDao
.
countLogoutByParams
(
params
);
}
@Override
public
List
<
String
>
distinct
(
String
key
,
Map
<
String
,
Object
>
prams
)
{
return
authLogDao
.
distinct
(
key
,
prams
);
}
@Override
public
long
count
(
Map
<
String
,
Object
>
prams
)
{
return
authLogDao
.
count
(
prams
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment