Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ab43b7e8
authored
Mar 16, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改上传日志的文件命名规范(与后台协商所得文件名)
parent
ca3d9e01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/src/main/java/com/bgycc/smartcanteen/command/LogCommandHandler.java
+5
-5
No files found.
app/src/main/java/com/bgycc/smartcanteen/command/LogCommandHandler.java
View file @
ab43b7e8
...
...
@@ -41,7 +41,7 @@ public class LogCommandHandler extends CommandHandler {
private
static
final
long
DEFAULT_DELAY
=
1000
;
private
volatile
boolean
start
=
false
;
private
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
,
Locale
.
getDefault
());
private
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
,
Locale
.
getDefault
());
private
String
deviceSN
;
private
CommandLog
commandLog
;
...
...
@@ -182,10 +182,10 @@ public class LogCommandHandler extends CommandHandler {
OkHttpClient
client
=
SCRetrofit
.
createOkHttpClient
().
build
();
SCApi
api
=
SCRetrofit
.
createApi
(
client
);
CommandLog
.
CommandLogData
data
=
commandLog
.
getData
();
String
fileNameForServer
=
data
.
getLogType
()
+
"_"
+
format
.
format
(
startTime
)
+
"_"
+
format
.
format
(
endTime
)
+
"_"
+
deviceSN
+
".zip"
;
String
fileNameForServer
=
data
.
getLogType
()
+
format
.
format
(
startTime
)
+
format
.
format
(
endTime
)
+
deviceSN
+
".zip"
;
fileNameForServer
=
fileNameForServer
.
replace
(
" "
,
"_"
);
LogUtils
.
d
(
TAG
,
"开始上传日志: "
+
fileNameForServer
);
RequestBody
requestBody
=
RequestBody
.
create
(
zip
,
MediaType
.
parse
(
"application/x-zip-compressed"
));
...
...
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