Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 895053e3
authored
Jun 07, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss
1 parent
ac283de3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
45 deletions
src/main/java/com/subsidy/jobs/RenSheJuJob.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/jobs/RenSheJuJob.java
View file @
895053e
...
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
...
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
/**
* 企业职工线上培训
* 企业职工线上培训
*/
*/
//
@Component
@Component
public
class
RenSheJuJob
{
public
class
RenSheJuJob
{
...
@@ -118,7 +118,7 @@ public class RenSheJuJob {
...
@@ -118,7 +118,7 @@ public class RenSheJuJob {
// renSheJuService.getErrorClass();
// renSheJuService.getErrorClass();
// }
// }
@Scheduled
(
cron
=
"0
5
0 23 * * ?"
)
@Scheduled
(
cron
=
"0
3
0 23 * * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
logout
(){
public
void
logout
(){
//让当前用户下线
//让当前用户下线
...
@@ -140,7 +140,7 @@ public class RenSheJuJob {
...
@@ -140,7 +140,7 @@ public class RenSheJuJob {
}
}
@Scheduled
(
cron
=
"0 5
5
23 * * ?"
)
@Scheduled
(
cron
=
"0 5
0
23 * * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancelLogin
()
{
public
void
cancelLogin
()
{
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
895053e
...
@@ -102,26 +102,26 @@ public class RenSheJuServiceImpl implements RenSheJuService {
...
@@ -102,26 +102,26 @@ public class RenSheJuServiceImpl implements RenSheJuService {
System
.
out
.
println
(
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
System
.
out
.
println
(
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
//
RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classBaseInfoDTO).toString());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
//
Request request = new Request.Builder()
Request
request
=
new
Request
.
Builder
()
//
.url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClass")
.
url
(
renSheConfig
.
getUrl
()
+
"/import/downstream/enterprise/uploadClass"
)
//
.method("POST", body)
.
method
(
"POST"
,
body
)
//
.addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)")
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
//
.addHeader("Content-Type", "application/json")
.
addHeader
(
"Content-Type"
,
"application/json"
)
//
.build();
.
build
();
//
Response response = client.newCall(request).execute();
Response
response
=
client
.
newCall
(
request
).
execute
();
//
//
RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class);
RensheResponseVO
rensheResponseVO
=
JSON
.
parseObject
(
response
.
body
().
string
(),
RensheResponseVO
.
class
);
//
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
//
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_2);
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_2
);
//
renshejuHistoryDO.setInputParam(JSONObject.fromObject(classBaseInfoDTO).toString());
renshejuHistoryDO
.
setInputParam
(
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
//
if (200 == response.code()) {
if
(
200
==
response
.
code
())
{
//
renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString());
renshejuHistoryDO
.
setOutputParam
(
rensheResponseVO
.
getCtt
().
toString
());
//
} else {
}
else
{
//
renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR);
renshejuHistoryDO
.
setOutputParam
(
RenSheJuConstant
.
API_ERROR
);
//
}
}
//
renshejuHistoryMapper.insert(renshejuHistoryDO);
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO
);
//
return rensheResponseVO;
return
rensheResponseVO
;
// return null;
// return null;
}
else
{
}
else
{
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
...
@@ -217,27 +217,27 @@ public class RenSheJuServiceImpl implements RenSheJuService {
...
@@ -217,27 +217,27 @@ public class RenSheJuServiceImpl implements RenSheJuService {
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
classHourBehaviorDTO
));
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
classHourBehaviorDTO
));
if
(
classHourBasics
.
size
()>
0
){
if
(
classHourBasics
.
size
()>
0
){
//
RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
//
//
Request request = new Request.Builder()
Request
request
=
new
Request
.
Builder
()
//
.url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior")
.
url
(
renSheConfig
.
getUrl
()
+
"/import/downstream/enterprise/uploadClassHourBehavior"
)
//
.method("POST", body)
.
method
(
"POST"
,
body
)
//
.addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)")
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
//
.addHeader("Content-Type", "application/json")
.
addHeader
(
"Content-Type"
,
"application/json"
)
//
.build();
.
build
();
//
Response response = client.newCall(request).execute();
Response
response
=
client
.
newCall
(
request
).
execute
();
//
//
RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class);
RensheResponseVO
rensheResponseVO
=
JSON
.
parseObject
(
response
.
body
().
string
(),
RensheResponseVO
.
class
);
//
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
//
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_3
);
//
renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString());
renshejuHistoryDO
.
setInputParam
(
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
//
if (200 == response.code()) {
if
(
200
==
response
.
code
())
{
//
renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString());
renshejuHistoryDO
.
setOutputParam
(
rensheResponseVO
.
getCtt
().
toString
());
//
} else {
}
else
{
//
renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR);
renshejuHistoryDO
.
setOutputParam
(
RenSheJuConstant
.
API_ERROR
);
//
}
}
//
renshejuHistoryMapper.insert(renshejuHistoryDO);
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO
);
//
return rensheResponseVO;
return
rensheResponseVO
;
}
else
{
}
else
{
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_3
);
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_3
);
...
@@ -549,7 +549,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
...
@@ -549,7 +549,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
uploadImage
.
setImageDetailList
(
imageDetailLists
);
uploadImage
.
setImageDetailList
(
imageDetailLists
);
if
(
imageDetailLists
.
size
()
>
0
)
{
if
(
imageDetailLists
.
size
()
>
0
)
{
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
uploadImage
));
//
System.out.println(com.alibaba.fastjson.JSONObject.toJSONString(uploadImage));
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadImage
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadImage
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
renSheConfig
.
getUrl
()
+
"/import/downstream/enterprise/uploadImage"
)
.
url
(
renSheConfig
.
getUrl
()
+
"/import/downstream/enterprise/uploadImage"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment