Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppTag
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
dataplatform
AppTag
Commits
e2648225
Commit
e2648225
authored
3 years ago
by
WangJinfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix logback-spring.xml
parent
18adaa78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
37 deletions
+52
-37
TreeTagServiceImpl.java
.../com/mobvista/apptag/service/impl/TreeTagServiceImpl.java
+52
-37
No files found.
src/main/java/com/mobvista/apptag/service/impl/TreeTagServiceImpl.java
View file @
e2648225
...
...
@@ -5,6 +5,7 @@ import com.mobvista.apptag.entity.TreeTag;
import
com.mobvista.apptag.mapper.TreeTagDao
;
import
com.mobvista.apptag.service.TreeTagService
;
import
com.mobvista.apptag.utils.Query
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -54,43 +55,57 @@ public class TreeTagServiceImpl implements TreeTagService {
TreeTag
treeTag
=
new
TreeTag
();
String
[]
strings
=
lineTxt
.
replaceAll
(
"\uFEFF"
,
""
).
split
(
","
,
-
1
);
String
packageName
=
strings
[
0
].
trim
();
String
firstTag
=
strings
[
1
];
String
secondTag
=
strings
[
2
];
String
thirdTag
=
strings
[
3
];
String
platform
=
""
;
if
(
idIosPkgPtn
.
matcher
(
packageName
).
matches
())
{
packageName
=
packageName
.
replace
(
"id"
,
""
);
}
if
(
iosPkgPtn
.
matcher
(
packageName
).
matches
())
{
platform
=
"ios"
;
}
else
if
(
adrPkgPtn
.
matcher
(
packageName
).
matches
())
{
platform
=
"android"
;
}
treeTag
.
setPackageName
(
packageName
);
treeTag
.
setPlatform
(
platform
);
if
(
strPtn
.
matcher
(
firstTag
).
matches
())
{
treeTag
.
setFirstTag
(
firstTag
);
}
if
(
strPtn
.
matcher
(
secondTag
).
matches
())
{
treeTag
.
setSecondTag
(
secondTag
);
}
else
{
treeTag
.
setSecondTag
(
""
);
}
if
(
strPtn
.
matcher
(
thirdTag
).
matches
())
{
treeTag
.
setThirdTag
(
thirdTag
);
}
else
{
treeTag
.
setThirdTag
(
""
);
}
treeTag
.
setUpdateTime
(
new
Date
());
set
.
add
(
treeTag
);
if
(
idIosPkgPtn
.
matcher
(
packageName
).
matches
())
{
TreeTag
newTreeTag
=
update
(
treeTag
,
packageName
.
replace
(
"id"
,
""
));
set
.
add
(
newTreeTag
);
}
if
(
iosPkgPtn
.
matcher
(
packageName
).
matches
())
{
TreeTag
newTreeTag
=
update
(
treeTag
,
"id"
+
packageName
);
set
.
add
(
newTreeTag
);
if
(
strings
.
length
>
1
)
{
String
packageName
=
strings
[
0
].
trim
();
String
firstTag
=
""
;
if
(
StringUtils
.
isNotBlank
(
strings
[
1
]))
{
firstTag
=
strings
[
1
];
}
else
{
continue
;
}
String
secondTag
=
""
;
if
(
strings
.
length
>
2
&&
StringUtils
.
isNotBlank
(
strings
[
2
]))
{
secondTag
=
strings
[
2
];
}
String
thirdTag
=
""
;
if
(
strings
.
length
>
3
&&
StringUtils
.
isNotBlank
(
strings
[
3
]))
{
thirdTag
=
strings
[
1
];
}
String
platform
=
""
;
if
(
idIosPkgPtn
.
matcher
(
packageName
).
matches
())
{
packageName
=
packageName
.
replace
(
"id"
,
""
);
}
if
(
iosPkgPtn
.
matcher
(
packageName
).
matches
())
{
platform
=
"ios"
;
}
else
if
(
adrPkgPtn
.
matcher
(
packageName
).
matches
())
{
platform
=
"android"
;
}
treeTag
.
setPackageName
(
packageName
);
treeTag
.
setPlatform
(
platform
);
if
(
strPtn
.
matcher
(
firstTag
).
matches
())
{
treeTag
.
setFirstTag
(
firstTag
);
}
if
(
strPtn
.
matcher
(
secondTag
).
matches
())
{
treeTag
.
setSecondTag
(
secondTag
);
}
else
{
treeTag
.
setSecondTag
(
""
);
}
if
(
strPtn
.
matcher
(
thirdTag
).
matches
())
{
treeTag
.
setThirdTag
(
thirdTag
);
}
else
{
treeTag
.
setThirdTag
(
""
);
}
treeTag
.
setUpdateTime
(
new
Date
());
set
.
add
(
treeTag
);
if
(
idIosPkgPtn
.
matcher
(
packageName
).
matches
())
{
TreeTag
newTreeTag
=
update
(
treeTag
,
packageName
.
replace
(
"id"
,
""
));
set
.
add
(
newTreeTag
);
}
if
(
iosPkgPtn
.
matcher
(
packageName
).
matches
())
{
TreeTag
newTreeTag
=
update
(
treeTag
,
"id"
+
packageName
);
set
.
add
(
newTreeTag
);
}
}
}
bufferedReader
.
close
();
...
...
This diff is collapsed.
Click to expand it.
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