Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
8854008a
Commit
8854008a
authored
Aug 05, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实名认证异步设置积分
parent
0bb68725
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
CertificationController.java
...latform/universal/controller/CertificationController.java
+18
-9
TrafficViolationsService.java
.../platform/universal/service/TrafficViolationsService.java
+13
-0
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
8854008a
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.biz.MQServiceBiZ;
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.biz.MQServiceBiZ;
import
com.xxfc.platform.universal.entity.IdInformation
;
import
com.xxfc.platform.universal.entity.IdInformation
;
import
com.xxfc.platform.universal.service.CertificationService
;
import
com.xxfc.platform.universal.service.CertificationService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.aop.framework.AopContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.core.task.TaskExecutor
;
...
@@ -21,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -21,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
/**
...
@@ -46,9 +50,11 @@ public class CertificationController {
...
@@ -46,9 +50,11 @@ public class CertificationController {
private
TaskExecutor
executor
;
private
TaskExecutor
executor
;
@Autowired
@Autowired
MQServiceBiZ
mqServiceBiZ
;
private
MQServiceBiZ
mqServiceBiZ
;
private
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
/**
/**
* 实名认证
* 实名认证
* @param idInformation
* @param idInformation
...
@@ -90,15 +96,18 @@ public class CertificationController {
...
@@ -90,15 +96,18 @@ public class CertificationController {
if
(
type
!=
null
&&
type
==
0
){
if
(
type
!=
null
&&
type
==
0
){
ObjectRestResponse
<
Integer
>
result
=
certificationService
.
certificate
(
idInformation
);
ObjectRestResponse
<
Integer
>
result
=
certificationService
.
certificate
(
idInformation
);
if
(
result
.
getRel
())
{
if
(
result
.
getRel
())
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
CompletableFuture
.
supplyAsync
(()->{
@Override
setIntegral
(
appUserDTO
.
getUserid
(),
result
.
getData
());
public
void
run
()
{
return
null
;
setIntegral
(
appUserDTO
.
getUserid
(),
result
.
getData
());
},
executorService
);
}
// Thread thread = new Thread(new Runnable() {
});
// @Override
thread
.
start
();
// public void run() {
// setIntegral(appUserDTO.getUserid(),result.getData());
// }
// });
// thread.start();
}
}
return
result
;
return
result
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/TrafficViolationsService.java
View file @
8854008a
...
@@ -23,6 +23,10 @@ import org.springframework.stereotype.Service;
...
@@ -23,6 +23,10 @@ import org.springframework.stereotype.Service;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -41,6 +45,8 @@ public class TrafficViolationsService {
...
@@ -41,6 +45,8 @@ public class TrafficViolationsService {
private
String
CODE
;
private
String
CODE
;
@Value
(
"${RETURN.TYPE}"
)
@Value
(
"${RETURN.TYPE}"
)
private
String
TYPE
;
private
String
TYPE
;
private
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
/**
/**
* 下列参数,根据使用不同的公司的接口进行修改
* 下列参数,根据使用不同的公司的接口进行修改
*/
*/
...
@@ -190,6 +196,13 @@ public class TrafficViolationsService {
...
@@ -190,6 +196,13 @@ public class TrafficViolationsService {
List
<
LicensePlateType
>
finalLicensePlateTypes
=
licensePlateTypes
;
List
<
LicensePlateType
>
finalLicensePlateTypes
=
licensePlateTypes
;
CompletableFuture
.
supplyAsync
(()->{
insertLicensePlateType
(
finalLicensePlateTypes
);
return
null
;
},
executorService
);
Thread
thread
=
new
Thread
(
new
Runnable
()
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
...
...
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