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
17383879
Commit
17383879
authored
5 years ago
by
jinfeng.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
55749fe9
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
ECStorageTag.java
src/main/java/com/mobvista/apptag/utils/ECStorageTag.java
+6
-6
StorageTag.java
src/main/java/com/mobvista/apptag/utils/StorageTag.java
+15
-2
No files found.
src/main/java/com/mobvista/apptag/utils/ECStorageTag.java
View file @
17383879
...
...
@@ -20,13 +20,13 @@ import java.util.*;
* @phone: 152-1062-7698
*/
public
class
ECStorageTag
{
private
static
final
String
CONNECTION_URL
=
"jdbc:mysql://localhost:3306/app_tag?useUnicode=true&characterEncoding=utf8&useSSL=false"
;
//
private static final String CONNECTION_URL = "jdbc:mysql://dataplatform-app-tag.c5yzcdreb1xr.us-east-1.rds.amazonaws.com:3306/app_tag?useUnicode=true&characterEncoding=utf8&useSSL=false";
//
private static final String CONNECTION_URL = "jdbc:mysql://localhost:3306/app_tag?useUnicode=true&characterEncoding=utf8&useSSL=false";
private
static
final
String
CONNECTION_URL
=
"jdbc:mysql://dataplatform-app-tag.c5yzcdreb1xr.us-east-1.rds.amazonaws.com:3306/app_tag?useUnicode=true&characterEncoding=utf8&useSSL=false"
;
private
static
final
String
DRIVER
=
"com.mysql.jdbc.Driver"
;
private
static
final
String
USER
=
"root"
;
//
private static final String USER = "apptag_rw";
private
static
final
String
PASSWORD
=
"19920627"
;
//
private static final String PASSWORD = "7gyLEVtkER3u8c9";
//
private static final String USER = "root";
private
static
final
String
USER
=
"apptag_rw"
;
//
private static final String PASSWORD = "19920627";
private
static
final
String
PASSWORD
=
"7gyLEVtkER3u8c9"
;
private
static
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
private
static
ObjectMapper
mapper
=
new
ObjectMapper
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/mobvista/apptag/utils/StorageTag.java
View file @
17383879
...
...
@@ -21,7 +21,7 @@ import java.util.*;
*/
public
class
StorageTag
{
// private static final String CONNECTION_URL = "jdbc:mysql://localhost:3306/app_tag?useUnicode=true&characterEncoding=utf8&useSSL=false";
private
static
final
String
CONNECTION_URL
=
"jdbc:mysql://dataplatform-app-tag.c5yzcdreb1xr.us-east-1.rds.amazonaws.com:3306/app_tag?use
Unicode=true&characterEncoding=utf8&use
SSL=false"
;
private
static
final
String
CONNECTION_URL
=
"jdbc:mysql://dataplatform-app-tag.c5yzcdreb1xr.us-east-1.rds.amazonaws.com:3306/app_tag?useSSL=false"
;
private
static
final
String
DRIVER
=
"com.mysql.jdbc.Driver"
;
// private static final String USER = "root";
private
static
final
String
USER
=
"apptag_rw"
;
...
...
@@ -62,10 +62,14 @@ public class StorageTag {
}
else
{
map
.
put
(
key
,
1
);
}
if
(
map
.
size
()
==
1000
)
{
insert
(
map
);
map
=
new
HashMap
<>();
}
}
}
insert
(
map
);
resultSet
.
close
();
preparedStatement
.
close
();
insertAdmin
(
resultSetAdmin
);
...
...
@@ -194,6 +198,11 @@ public class StorageTag {
String
[]
strs
=
key
.
split
(
"#@#"
);
String
packageName
=
strs
[
0
];
String
appName
=
strs
[
1
];
if
(
StringUtils
.
isNotBlank
(
appName
))
{
appName
=
appName
.
replace
(
"'"
,
"\\'"
);
}
else
{
appName
=
""
;
}
String
platform
=
strs
[
2
];
String
tagId
=
strs
[
3
];
Integer
userCount
=
Integer
.
parseInt
(
strs
[
4
]);
...
...
@@ -235,11 +244,15 @@ public class StorageTag {
Statement
stmt1
=
con
.
createStatement
();
String
insert_sql1
=
"REPLACE INTO storage_result(package_name, app_name, platform, feat_id, update_time, user_count, tag_count, tag_rate) "
+
"VALUES"
;
String
insert_sql2
=
"REPLACE INTO storage(package_name, app_name, platform, tag, update_time) "
+
"VALUES"
;
// System.out.println(insert_sql1 + insertSql_1.substring(0, insertSql_1.length() - 1));
// System.out.println(insert_sql2 + insertSql_2.substring(0, insertSql_2.length() - 1));
if
(
insertSql_1
.
length
()
>
0
)
{
System
.
out
.
println
(
"insertSql ==>> "
+
insertSql_1
);
System
.
out
.
println
(
"insertSql ====>>> "
+
insert_sql1
+
insertSql_1
.
substring
(
0
,
insertSql_1
.
length
()
-
1
));
stmt
.
executeQuery
(
insert_sql1
+
insertSql_1
.
substring
(
0
,
insertSql_1
.
length
()
-
1
));
}
if
(
insertSql_2
.
length
()
>
0
)
{
...
...
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