Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
windows
Commits
23f1c6cf
Commit
23f1c6cf
authored
Dec 04, 2023
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浙农sftp配置
parent
73e78749
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
SftpConfig.java
src/main/java/com/jqtx/windows/common/config/SftpConfig.java
+20
-0
BackedBurdenJob.java
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
+6
-1
RedeemJob.java
src/main/java/com/jqtx/windows/job/RedeemJob.java
+5
-1
No files found.
src/main/java/com/jqtx/windows/common/config/SftpConfig.java
0 → 100644
View file @
23f1c6cf
package
com
.
jqtx
.
windows
.
common
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
@Data
@Configuration
@ConfigurationProperties
(
prefix
=
"sftpconfig"
)
public
class
SftpConfig
{
private
String
sshHost
;
private
int
sshPort
;
private
String
sshUser
;
private
String
sshPass
;
}
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
View file @
23f1c6cf
...
@@ -5,6 +5,8 @@ import cn.hutool.core.io.FileUtil;
...
@@ -5,6 +5,8 @@ import cn.hutool.core.io.FileUtil;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.extra.ssh.Sftp
;
import
cn.hutool.extra.ssh.Sftp
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.jqtx.windows.common.config.BaseConfig
;
import
com.jqtx.windows.common.config.SftpConfig
;
import
com.jqtx.windows.common.config.snow.SnowSequenceHelper
;
import
com.jqtx.windows.common.config.snow.SnowSequenceHelper
;
import
com.jqtx.windows.component.BackedDetailComponent
;
import
com.jqtx.windows.component.BackedDetailComponent
;
import
com.jqtx.windows.component.LoanComponent
;
import
com.jqtx.windows.component.LoanComponent
;
...
@@ -53,11 +55,14 @@ public class BackedBurdenJob {
...
@@ -53,11 +55,14 @@ public class BackedBurdenJob {
@Autowired
@Autowired
private
BackedDetailComponent
backedDetailComponent
;
private
BackedDetailComponent
backedDetailComponent
;
@Autowired
private
SftpConfig
sftpConfig
;
@XxlJob
(
"backedBurdenJob"
)
@XxlJob
(
"backedBurdenJob"
)
public
void
run
()
{
public
void
run
()
{
String
param
=
XxlJobHelper
.
getJobParam
();
String
param
=
XxlJobHelper
.
getJobParam
();
Sftp
sftp
=
new
Sftp
(
"115.238.89.106"
,
9901
,
"xiaohua_fr"
,
"R7MADMx1lwMN5k4v"
,
CharsetUtil
.
CHARSET_UTF_8
);
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
()
,
CharsetUtil
.
CHARSET_UTF_8
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
);
if
(
StringUtils
.
isNotEmpty
(
param
))
{
if
(
StringUtils
.
isNotEmpty
(
param
))
{
date
=
param
;
date
=
param
;
...
...
src/main/java/com/jqtx/windows/job/RedeemJob.java
View file @
23f1c6cf
...
@@ -5,6 +5,7 @@ import cn.hutool.core.io.FileUtil;
...
@@ -5,6 +5,7 @@ import cn.hutool.core.io.FileUtil;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.extra.ssh.Sftp
;
import
cn.hutool.extra.ssh.Sftp
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.jqtx.windows.common.config.SftpConfig
;
import
com.jqtx.windows.component.LoanPlanComponent
;
import
com.jqtx.windows.component.LoanPlanComponent
;
import
com.jqtx.windows.component.RedeemComponent
;
import
com.jqtx.windows.component.RedeemComponent
;
import
com.jqtx.windows.component.model.LoanPlanModel
;
import
com.jqtx.windows.component.model.LoanPlanModel
;
...
@@ -34,10 +35,13 @@ public class RedeemJob {
...
@@ -34,10 +35,13 @@ public class RedeemJob {
@Autowired
@Autowired
private
RedeemComponent
redeemComponent
;
private
RedeemComponent
redeemComponent
;
@Autowired
private
SftpConfig
sftpConfig
;
@XxlJob
(
"redeemJob"
)
@XxlJob
(
"redeemJob"
)
public
void
run
()
{
public
void
run
()
{
String
param
=
XxlJobHelper
.
getJobParam
();
String
param
=
XxlJobHelper
.
getJobParam
();
Sftp
sftp
=
new
Sftp
(
"115.238.89.106"
,
9901
,
"xiaohua_fr"
,
"R7MADMx1lwMN5k4v"
,
CharsetUtil
.
CHARSET_UTF_8
);
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
()
,
CharsetUtil
.
CHARSET_UTF_8
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
);
if
(
StringUtils
.
isNotEmpty
(
param
))
{
if
(
StringUtils
.
isNotEmpty
(
param
))
{
date
=
param
;
date
=
param
;
...
...
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