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
26f08b33
Commit
26f08b33
authored
Nov 17, 2023
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还款融担定时
parent
f0e4e359
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
26 deletions
+15
-26
BackedBurdenJob.java
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
+15
-5
BaseController.java
src/main/java/com/jqtx/windows/web/BaseController.java
+0
-21
No files found.
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
View file @
26f08b33
package
com
.
jqtx
.
windows
.
job
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.extra.ssh.Sftp
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.io.File
;
import
java.util.Date
;
@Component
@Slf4j
public
class
BackedBurdenJob
{
...
...
@@ -14,11 +21,14 @@ public class BackedBurdenJob {
@XxlJob
(
"backedBurdenJob"
)
public
void
run
()
{
Sftp
sftp
=
new
Sftp
(
"115.238.89.106"
,
9901
,
"xiaohua_fr"
,
"R7MADMx1lwMN5k4v"
,
CharsetUtil
.
CHARSET_UTF_8
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
);
sftp
.
cd
(
"/download/compensatory/"
+
date
);
sftp
.
get
(
"compensatory_"
+
date
+
".txt"
,
"/sftp.txt"
);
ossUtils
.
ossUpload
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
,
FileUtil
.
file
(
"/sftp.txt"
));
FileUtil
.
del
(
"/sftp.txt"
);
String
stringObject
=
ossUtils
.
getStringObject
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
);
System
.
out
.
println
(
stringObject
);
}
public
static
void
main
(
String
[]
args
)
{
}
}
src/main/java/com/jqtx/windows/web/BaseController.java
View file @
26f08b33
package
com
.
jqtx
.
windows
.
web
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.extra.ssh.Sftp
;
import
com.jqtx.infrastructure.oss.starter.config.OssUtils
;
import
com.jqtx.infrastructure.util.AKAESUtil
;
import
com.jqtx.windows.common.factory.CommandProxy
;
import
com.jqtx.windows.web.response.JsonResult
;
...
...
@@ -14,9 +10,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.io.File
;
import
java.io.FileOutputStream
;
@RestController
@RequestMapping
(
"/zhenong/v1"
)
@Api
(
tags
=
"网关接口"
)
...
...
@@ -26,9 +19,6 @@ public class BaseController {
@Autowired
private
CommandProxy
commandProxy
;
@Autowired
private
OssUtils
ossUtils
;
@ApiOperation
(
value
=
"网关接口"
)
@PostMapping
(
"/{url}"
)
public
JsonResult
creditSubmit
(
@RequestBody
String
requestBody
,
@PathVariable
String
url
)
{
...
...
@@ -44,17 +34,6 @@ public class BaseController {
}
@ApiOperation
(
value
=
"测试网关接口"
)
@GetMapping
(
"/ccc"
)
public
JsonResult
ccc
()
{
Sftp
sftp
=
new
Sftp
(
"115.238.89.106"
,
9901
,
"xiaohua_fr"
,
"R7MADMx1lwMN5k4v"
,
CharsetUtil
.
CHARSET_UTF_8
);
sftp
.
cd
(
"/download/compensatory/"
+
"20231113"
);
sftp
.
get
(
"compensatory_20231113.txt"
,
"/bbb.txt"
);
ossUtils
.
ossUpload
(
"ZN/compensatory/bbb.txt"
,
FileUtil
.
file
(
"/bbb.txt"
));
FileUtil
.
del
(
"/bbb.txt"
);
return
null
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
AKAESUtil
.
decrypt
(
"+Nk2q1/FnJtWdXPFOZ816A=="
));
...
...
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