Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
task-kolon
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
piplus-v3
task-kolon
Commits
2a677b7d
Commit
2a677b7d
authored
Jun 15, 2016
by
刘文胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新member status
parent
0fc65ba4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
KolonMemberServiceImpl.java
...java/com/hdp/pi/service/kolon/KolonMemberServiceImpl.java
+16
-0
FtpMemberUtil.java
src/main/java/com/hdp/pi/utils/kolon/FtpMemberUtil.java
+17
-2
FtpProductUtil.java
src/main/java/com/hdp/pi/utils/kolon/FtpProductUtil.java
+7
-1
FtpSaleUtil.java
src/main/java/com/hdp/pi/utils/kolon/FtpSaleUtil.java
+7
-1
No files found.
src/main/java/com/hdp/pi/service/kolon/KolonMemberServiceImpl.java
View file @
2a677b7d
...
@@ -138,6 +138,22 @@ public class KolonMemberServiceImpl implements KolonMemberService {
...
@@ -138,6 +138,22 @@ public class KolonMemberServiceImpl implements KolonMemberService {
kolonMember
.
lastName
=
kolonMemberDTO
.
lastName
;
kolonMember
.
lastName
=
kolonMemberDTO
.
lastName
;
flag
=
true
;
flag
=
true
;
}
}
if
(!
Util
.
isNotNull
(
kolonMemberDTO
.
status
))
{
kolonMember
.
status
=
kolonMemberDTO
.
status
;
flag
=
true
;
}
if
(!
Util
.
isNotNull
(
kolonMemberDTO
.
bonus
))
{
kolonMember
.
bonus
=
kolonMemberDTO
.
bonus
;
flag
=
true
;
}
if
(!
Util
.
isNotNull
(
kolonMemberDTO
.
lifecycle
))
{
kolonMember
.
lifecycle
=
kolonMemberDTO
.
lifecycle
;
flag
=
true
;
}
if
(!
Util
.
isNotNull
(
kolonMemberDTO
.
customerType
))
{
kolonMember
.
customerType
=
kolonMemberDTO
.
customerType
;
flag
=
true
;
}
if
(
flag
)
{
if
(
flag
)
{
kolonMember
.
updateTime
=
new
Date
();
kolonMember
.
updateTime
=
new
Date
();
this
.
save
(
kolonMember
);
this
.
save
(
kolonMember
);
...
...
src/main/java/com/hdp/pi/utils/kolon/FtpMemberUtil.java
View file @
2a677b7d
...
@@ -110,6 +110,12 @@ public class FtpMemberUtil {
...
@@ -110,6 +110,12 @@ public class FtpMemberUtil {
throw
new
RuntimeException
(
"FTP server refused connection."
);
throw
new
RuntimeException
(
"FTP server refused connection."
);
}
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
if
(
ftpClient
!=
null
){
try
{
ftpClient
.
disconnect
();
}
catch
(
IOException
e2
)
{
}
}
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
return
ftpClient
;
return
ftpClient
;
...
@@ -161,7 +167,7 @@ public class FtpMemberUtil {
...
@@ -161,7 +167,7 @@ public class FtpMemberUtil {
String
name
=
fileName
String
name
=
fileName
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
ftpClient
.
mkd
(
getFileHistoryDir
);
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
+
newFileName
);
+
newFileName
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
...
@@ -205,9 +211,10 @@ public class FtpMemberUtil {
...
@@ -205,9 +211,10 @@ public class FtpMemberUtil {
* 上传文件到FTP服务器
* 上传文件到FTP服务器
*/
*/
public
void
uploadFile
()
{
public
void
uploadFile
()
{
FTPClient
ftpClient
=
null
;
try
{
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"YYYY-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"YYYY-MM-dd"
);
FTPClient
ftpClient
=
this
.
getFTPClient
();
ftpClient
=
this
.
getFTPClient
();
ftpClient
.
mkd
(
putFileDir
);
ftpClient
.
mkd
(
putFileDir
);
ftpClient
.
changeWorkingDirectory
(
putFileDir
);
ftpClient
.
changeWorkingDirectory
(
putFileDir
);
InputStream
addInputStream
=
new
FileInputStream
(
new
File
(
InputStream
addInputStream
=
new
FileInputStream
(
new
File
(
...
@@ -219,6 +226,14 @@ public class FtpMemberUtil {
...
@@ -219,6 +226,14 @@ public class FtpMemberUtil {
ftpClient
.
storeFile
(
putUpdateFileName
.
replace
(
"YYYY-MM-dd"
,
sdf
.
format
(
new
Date
())),
updateInputStream
);
ftpClient
.
storeFile
(
putUpdateFileName
.
replace
(
"YYYY-MM-dd"
,
sdf
.
format
(
new
Date
())),
updateInputStream
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
finally
{
if
(
ftpClient
!=
null
){
try
{
ftpClient
.
disconnect
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
...
...
src/main/java/com/hdp/pi/utils/kolon/FtpProductUtil.java
View file @
2a677b7d
...
@@ -70,6 +70,12 @@ public class FtpProductUtil {
...
@@ -70,6 +70,12 @@ public class FtpProductUtil {
throw
new
RuntimeException
(
"FTP server refused connection."
);
throw
new
RuntimeException
(
"FTP server refused connection."
);
}
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
if
(
ftpClient
!=
null
){
try
{
ftpClient
.
disconnect
();
}
catch
(
IOException
e2
)
{
}
}
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
return
ftpClient
;
return
ftpClient
;
...
@@ -122,7 +128,7 @@ public class FtpProductUtil {
...
@@ -122,7 +128,7 @@ public class FtpProductUtil {
String
name
=
fileName
String
name
=
fileName
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
ftpClient
.
mkd
(
getFileHistoryDir
);
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
+
newFileName
);
+
newFileName
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
...
...
src/main/java/com/hdp/pi/utils/kolon/FtpSaleUtil.java
View file @
2a677b7d
...
@@ -70,6 +70,12 @@ public class FtpSaleUtil {
...
@@ -70,6 +70,12 @@ public class FtpSaleUtil {
throw
new
RuntimeException
(
"FTP server refused connection."
);
throw
new
RuntimeException
(
"FTP server refused connection."
);
}
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
if
(
ftpClient
!=
null
){
try
{
ftpClient
.
disconnect
();
}
catch
(
IOException
e2
)
{
}
}
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
return
ftpClient
;
return
ftpClient
;
...
@@ -122,7 +128,7 @@ public class FtpSaleUtil {
...
@@ -122,7 +128,7 @@ public class FtpSaleUtil {
String
name
=
fileName
String
name
=
fileName
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
String
newFileName
=
name
+
"_"
+
getTime
()
+
suffix
;
ftpClient
.
mkd
(
getFileHistoryDir
);
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
ftpClient
.
rename
(
getFileDir
+
fileName
,
getFileHistoryDir
+
newFileName
);
+
newFileName
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
...
...
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