Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
Project
Overview
Details
Activity
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
reyun
saasio
Commits
db15d67e
Commit
db15d67e
authored
Mar 26, 2018
by
carrieyzzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event 4 tracking
parent
d07ba824
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
10 deletions
+131
-10
EventController.java
src/main/java/com/reyun/controller/EventController.java
+1
-1
Event4Tracking.java
src/main/java/com/reyun/model/Event4Tracking.java
+75
-0
Event4Web.java
src/main/java/com/reyun/model/Event4Web.java
+0
-9
EventService.java
src/main/java/com/reyun/service/EventService.java
+2
-0
EventServiceImpl.java
src/main/java/com/reyun/service/impl/EventServiceImpl.java
+53
-0
No files found.
src/main/java/com/reyun/controller/EventController.java
View file @
db15d67e
...
...
@@ -100,7 +100,7 @@ public class EventController {
@RequestMapping
(
value
=
"find4tracking"
,
method
=
RequestMethod
.
GET
)
public
ResultModel
findAllEvent4Tracking
(
@PathVariable
Long
app
,
@RequestParam
String
appkey
)
{
App
appObject
=
appRepository
.
findByAppkey
(
appkey
);
return
ResultModel
.
OK
(
eventService
.
list
AllEvent
(
appObject
.
getId
()));
return
ResultModel
.
OK
(
eventService
.
list
Event4Tracking
(
appObject
.
getId
()));
}
@ResponseBody
...
...
src/main/java/com/reyun/model/Event4Tracking.java
0 → 100644
View file @
db15d67e
package
com
.
reyun
.
model
;
import
java.util.List
;
/**
* Created by sunhao on 17/4/19.
* description:事件页面展示model
*/
public
class
Event4Tracking
{
private
String
eventName
;
private
String
eventNameAlias
;
private
Boolean
isCommon
;
private
Boolean
status
;
private
Boolean
isVirtual
;
public
Event4Tracking
(
Event4Web
event4Web
)
{
this
.
eventName
=
event4Web
.
getEventName
();
this
.
eventNameAlias
=
event4Web
.
getEventNameAlias
();
this
.
status
=
event4Web
.
getStatus
();
this
.
isCommon
=
event4Web
.
getCommon
();
this
.
isVirtual
=
event4Web
.
getVirtual
();
}
public
Boolean
getVirtual
()
{
return
isVirtual
;
}
public
void
setVirtual
(
Boolean
virtual
)
{
isVirtual
=
virtual
;
}
public
String
getEventName
()
{
return
eventName
;
}
public
void
setEventName
(
String
eventName
)
{
this
.
eventName
=
eventName
;
}
public
String
getEventNameAlias
()
{
return
eventNameAlias
;
}
public
void
setEventNameAlias
(
String
eventNameAlias
)
{
this
.
eventNameAlias
=
eventNameAlias
;
}
public
Boolean
getCommon
()
{
return
isCommon
;
}
public
void
setCommon
(
Boolean
common
)
{
isCommon
=
common
;
}
public
Boolean
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Boolean
status
)
{
this
.
status
=
status
;
}
@Override
public
String
toString
()
{
return
"{"
+
"eventName='"
+
eventName
+
'\''
+
", eventNameAlias='"
+
eventNameAlias
+
'\''
+
", isCommon="
+
isCommon
+
", status="
+
status
+
'}'
;
}
}
src/main/java/com/reyun/model/Event4Web.java
View file @
db15d67e
...
...
@@ -15,7 +15,6 @@ public class Event4Web {
private
List
<
EventAttr4Web
>
firstLevelAttr
;
private
List
<
EventAttr4Web
>
secondLevelAttr
;
private
List
<
EventAttr4Web
>
profiles
;
private
Map
<
String
,
EventAttr4Web
>
eventAttr4WebMap
;
private
Boolean
isCommon
;
private
Boolean
status
;
private
Boolean
isVirtual
;
...
...
@@ -76,13 +75,6 @@ public class Event4Web {
this
.
profiles
=
profiles
;
}
public
Map
<
String
,
EventAttr4Web
>
getEventAttr4WebMap
()
{
return
eventAttr4WebMap
;
}
public
void
setEventAttr4WebMap
(
Map
<
String
,
EventAttr4Web
>
eventAttr4WebMap
)
{
this
.
eventAttr4WebMap
=
eventAttr4WebMap
;
}
public
Boolean
getCommon
()
{
return
isCommon
;
...
...
@@ -108,7 +100,6 @@ public class Event4Web {
", firstLevelAttr="
+
firstLevelAttr
+
", secondLevelAttr="
+
secondLevelAttr
+
", profiles="
+
profiles
+
", eventAttr4WebMap="
+
eventAttr4WebMap
+
", isCommon="
+
isCommon
+
", status="
+
status
+
'}'
;
...
...
src/main/java/com/reyun/service/EventService.java
View file @
db15d67e
...
...
@@ -70,4 +70,6 @@ public interface EventService {
List
<
Dimension4Web
>
listAllAttr
(
Long
app
);
List
<
Event4Tracking
>
listEvent4Tracking
(
Long
app
);
}
src/main/java/com/reyun/service/impl/EventServiceImpl.java
View file @
db15d67e
...
...
@@ -344,6 +344,59 @@ public class EventServiceImpl implements EventService {
@Override
public
List
<
Event4Tracking
>
listEvent4Tracking
(
Long
app
)
{
String
appkey
=
appRepository
.
findAppkeyById
(
app
);
List
<
Event
>
eventList
=
eventRepository
.
findByAppkey
(
appkey
);
List
<
EventMeta
>
metas
=
eventMetaRepository
.
findByAppkey
(
appkey
);
List
<
CommonEvent
>
commonEventList
=
commonEventRepository
.
findAll
();
Map
<
String
,
EventMeta
>
metaMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
metas
))
{
for
(
EventMeta
e
:
metas
)
{
metaMap
.
put
(
e
.
getEventId
(),
e
);
}
}
Map
<
String
,
CommonEvent
>
commonMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
commonEventList
))
{
for
(
CommonEvent
e
:
commonEventList
)
{
commonMap
.
put
(
e
.
getEvent
(),
e
);
}
}
LinkedList
<
Event4Tracking
>
result
=
new
LinkedList
<>();
LinkedList
<
Event4Tracking
>
temp
=
new
LinkedList
<>();
List
<
String
>
nameList
=
new
ArrayList
<>();
if
(
ValidateUtil
.
isValid
(
eventList
))
{
for
(
Event
e
:
eventList
)
{
if
(!
nameList
.
contains
(
e
.
getEventName
()))
{
if
(
commonMap
.
containsKey
(
e
.
getEventName
()))
{
nameList
.
add
(
e
.
getEventName
());
CommonEvent
commonEvent
=
commonMap
.
get
(
e
.
getEventName
());
Event4Web
event4Web
=
commonEventTo4Web
(
commonEvent
);
result
.
add
(
new
Event4Tracking
(
event4Web
));
}
else
{
nameList
.
add
(
e
.
getEventName
());
if
(
metaMap
.
containsKey
(
e
.
getEventName
()))
{
EventMeta
eventMeta
=
metaMap
.
get
(
e
.
getEventName
());
Event4Web
event4Web
=
eventMetaTo4Web
(
eventMeta
);
temp
.
add
(
new
Event4Tracking
(
event4Web
));
}
else
{
Event4Web
event4Web
=
eventTo4Web
(
e
);
temp
.
add
(
new
Event4Tracking
(
event4Web
));
}
}
}
}
result
.
addAll
(
temp
);
}
return
result
;
}
@Override
public
List
<
EventAttr4Web
>
listOneEvent
(
Long
app
,
String
name
)
{
String
appkey
=
appRepository
.
findAppkeyById
(
app
);
...
...
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