记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
866e774b
Commit
866e774b
authored
Jul 05, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
ba9317e8
fe485238
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
189 additions
and
41 deletions
+189
-41
WebMvcConfig.java
...in/java/com/liquidnet/common/web/config/WebMvcConfig.java
+10
-7
GlobalAuthorityInterceptor.java
...quidnet/common/web/filter/GlobalAuthorityInterceptor.java
+1
-12
GlobalLogTrackInterceptor.java
...iquidnet/common/web/filter/GlobalLogTrackInterceptor.java
+31
-0
liquidnet-service-adam.yml
...et-bus-config/liquidnet-config/liquidnet-service-adam.yml
+2
-2
liquidnet-service-consumer-adam.yml
...nfig/liquidnet-config/liquidnet-service-consumer-adam.yml
+2
-2
liquidnet-service-consumer.yml
...us-config/liquidnet-config/liquidnet-service-consumer.yml
+2
-2
liquidnet-service-kylin.yml
...t-bus-config/liquidnet-config/liquidnet-service-kylin.yml
+2
-2
liquidnet-service-order.yml
...t-bus-config/liquidnet-config/liquidnet-service-order.yml
+2
-2
liquidnet-service-platform.yml
...us-config/liquidnet-config/liquidnet-service-platform.yml
+2
-2
ConsumerAdamUCenterProcessor.java
...sumer/service/processor/ConsumerAdamUCenterProcessor.java
+125
-0
ConsumerAdamUCenterProcessorTest.java
...r/service/processor/ConsumerAdamUCenterProcessorTest.java
+2
-2
mongo_db_ddl-prod.sql
...n/liquidnet-service-kylin-impl/docu/mongo_db_ddl-prod.sql
+4
-4
mongo_db_ddl.sql
...-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
+4
-4
No files found.
liquidnet-bus-common/liquidnet-common-web/src/main/java/com/liquidnet/common/web/config/WebMvcConfig.java
View file @
866e774b
package
com
.
liquidnet
.
common
.
web
.
config
;
package
com
.
liquidnet
.
common
.
web
.
config
;
import
com.liquidnet.common.web.filter.GlobalLogTrackInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
;
@Configuration
@Configuration
public
class
WebMvcConfig
extends
WebMvcConfigurationSupport
{
public
class
WebMvcConfig
extends
WebMvcConfigurationSupport
{
//
@Autowired
@Autowired
// GlobalAuthorityInterceptor globalAuthority
Interceptor;
GlobalLogTrackInterceptor
globalLogTrack
Interceptor
;
@Override
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
...
@@ -26,11 +29,11 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
...
@@ -26,11 +29,11 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
super
.
addResourceHandlers
(
registry
);
super
.
addResourceHandlers
(
registry
);
}
}
//
@Override
@Override
//
protected void addInterceptors(InterceptorRegistry registry) {
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
// registry.addInterceptor(globalAuthority
Interceptor).addPathPatterns("/**");
registry
.
addInterceptor
(
globalLogTrack
Interceptor
).
addPathPatterns
(
"/**"
);
//
super.addInterceptors(registry);
super
.
addInterceptors
(
registry
);
//
}
}
// @Bean
// @Bean
// public FilterRegistrationBean domainCrossFilterBean(){
// public FilterRegistrationBean domainCrossFilterBean(){
...
...
liquidnet-bus-common/liquidnet-common-web/src/main/java/com/liquidnet/common/web/filter/GlobalAuthorityInterceptor.java
View file @
866e774b
...
@@ -11,6 +11,7 @@ import io.jsonwebtoken.ExpiredJwtException;
...
@@ -11,6 +11,7 @@ import io.jsonwebtoken.ExpiredJwtException;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.MDC
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
...
@@ -38,7 +39,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
...
@@ -38,7 +39,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
private
static
final
String
TOKEN_KICK
=
"40002"
;
private
static
final
String
TOKEN_KICK
=
"40002"
;
private
static
final
String
TOKEN_INVALID
=
"40003"
;
private
static
final
String
TOKEN_INVALID
=
"40003"
;
private
static
final
String
START_TIME
=
"_startTime"
;
private
static
final
String
ENV_PROD
=
"prod"
;
private
static
final
String
ENV_PROD
=
"prod"
;
private
static
final
String
ENV_ACTIVE
=
"spring.profiles.active"
;
private
static
final
String
ENV_ACTIVE
=
"spring.profiles.active"
;
...
@@ -55,8 +55,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
...
@@ -55,8 +55,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
@Override
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
request
.
setAttribute
(
START_TIME
,
System
.
currentTimeMillis
());
String
authorization
=
request
.
getHeader
(
CurrentUtil
.
uToken
),
uri
=
request
.
getRequestURI
(),
String
authorization
=
request
.
getHeader
(
CurrentUtil
.
uToken
),
uri
=
request
.
getRequestURI
(),
responseCode
=
null
,
token
=
null
,
currentUid
=
null
;
responseCode
=
null
,
token
=
null
,
currentUid
=
null
;
...
@@ -103,15 +101,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
...
@@ -103,15 +101,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
return
false
;
return
false
;
}
}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
// if (!StringUtils.equalsIgnoreCase(env.getProperty(ENV_ACTIVE), ENV_PROD)) {
Long
endTime
=
System
.
currentTimeMillis
();
Long
startTime
=
(
Long
)
request
.
getAttribute
(
START_TIME
);
log
.
info
(
"[{}]耗时:{}s"
,
request
.
getRequestURI
(),
((
endTime
-
startTime
)
*
1.000
)
/
1000
);
// }
}
private
void
responseHandler
(
HttpServletResponse
response
,
String
responseCode
)
throws
IOException
{
private
void
responseHandler
(
HttpServletResponse
response
,
String
responseCode
)
throws
IOException
{
ResponseDto
<
Object
>
responseDto
=
ResponseDto
.
failure
(
ErrorMapping
.
get
(
responseCode
));
ResponseDto
<
Object
>
responseDto
=
ResponseDto
.
failure
(
ErrorMapping
.
get
(
responseCode
));
response
.
setCharacterEncoding
(
StandardCharsets
.
UTF_8
.
name
());
response
.
setCharacterEncoding
(
StandardCharsets
.
UTF_8
.
name
());
...
...
liquidnet-bus-common/liquidnet-common-web/src/main/java/com/liquidnet/common/web/filter/GlobalLogTrackInterceptor.java
0 → 100644
View file @
866e774b
package
com
.
liquidnet
.
common
.
web
.
filter
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.slf4j.MDC
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
@Slf4j
@Data
@Component
public
class
GlobalLogTrackInterceptor
extends
HandlerInterceptorAdapter
{
private
static
final
String
LNS_TRANCE_ID
=
"lnsTranceId"
;
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
String
t
=
MDC
.
get
(
LNS_TRANCE_ID
);
MDC
.
put
(
LNS_TRANCE_ID
,
null
==
t
?
String
.
valueOf
(
System
.
nanoTime
())
:
t
);
return
true
;
}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
long
e
=
Long
.
parseLong
(
MDC
.
get
(
LNS_TRANCE_ID
));
log
.
info
(
"[{}]耗时:{}ms"
,
request
.
getRequestURI
(),
(
System
.
nanoTime
()
-
e
)
/
1000000
);
MDC
.
clear
();
}
}
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam.yml
View file @
866e774b
...
@@ -24,8 +24,8 @@ logging:
...
@@ -24,8 +24,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
${liquidnet.logfile.file-max-size}
max-size
:
${liquidnet.logfile.file-max-size}
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-consumer-adam.yml
View file @
866e774b
...
@@ -18,8 +18,8 @@ logging:
...
@@ -18,8 +18,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
200MB
max-size
:
200MB
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
9
6}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
2
6}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
9
6}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
2
6}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-consumer.yml
View file @
866e774b
...
@@ -18,8 +18,8 @@ logging:
...
@@ -18,8 +18,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
200MB
max-size
:
200MB
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
9
6}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
2
6}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
9
6}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{
2
6}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-kylin.yml
View file @
866e774b
...
@@ -24,8 +24,8 @@ logging:
...
@@ -24,8 +24,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
${liquidnet.logfile.file-max-size}
max-size
:
${liquidnet.logfile.file-max-size}
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-order.yml
View file @
866e774b
...
@@ -24,8 +24,8 @@ logging:
...
@@ -24,8 +24,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
${liquidnet.logfile.file-max-size}
max-size
:
${liquidnet.logfile.file-max-size}
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-platform.yml
View file @
866e774b
...
@@ -24,8 +24,8 @@ logging:
...
@@ -24,8 +24,8 @@ logging:
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size
:
${liquidnet.logfile.file-max-size}
max-size
:
${liquidnet.logfile.file-max-size}
pattern
:
pattern
:
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
file
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[
%-5level]
%thread
[%logger{96}:%line]
-
%msg%n'
console
:
'
%d{yyyy-MM-dd
HH:mm:ss.SSS}
%-5level
%X{lnsTranceId}
[%logger{96}:%line]
-
%msg%n'
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
rolling-file-name
:
${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level
:
level
:
root
:
info
root
:
info
...
...
liquidnet-bus-service/liquidnet-service-consumer-adam/src/main/java/com/liquidnet/service/consumer/service/processor/ConsumerAdamProcessor.java
→
liquidnet-bus-service/liquidnet-service-consumer-adam/src/main/java/com/liquidnet/service/consumer/service/processor/ConsumerAdam
UCenter
Processor.java
View file @
866e774b
...
@@ -25,7 +25,7 @@ import java.io.IOException;
...
@@ -25,7 +25,7 @@ import java.io.IOException;
*/
*/
@Slf4j
@Slf4j
@Component
@Component
public
class
ConsumerAdamProcessor
{
public
class
ConsumerAdam
UCenter
Processor
{
@Resource
@Resource
IBaseDao
baseDao
;
IBaseDao
baseDao
;
...
@@ -81,115 +81,43 @@ public class ConsumerAdamProcessor {
...
@@ -81,115 +81,43 @@ public class ConsumerAdamProcessor {
/* ================================================================== | 用户注册 */
/* ================================================================== | 用户注册 */
@RabbitListener
(
bindings
=
@QueueBinding
(
@RabbitListener
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UREGISTER
,
bindings
=
@QueueBinding
(
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
))
key
=
MQConst
.
RK_SQL_UREGISTER
,
public
void
consumerSqlForURegisterA
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
),
}
concurrency
=
"5"
@RabbitListener
(
bindings
=
@QueueBinding
(
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UREGISTER
,
public
void
consumerSqlForURegister
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
))
public
void
consumerSqlForURegisterB
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UREGISTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
))
public
void
consumerSqlForURegisterC
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UREGISTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
))
public
void
consumerSqlForURegisterD
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UREGISTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UREGISTER
)
))
public
void
consumerSqlForURegisterE
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
}
/* ================================================================== | 用户信息 */
/* ================================================================== | 用户信息 */
@RabbitListener
(
bindings
=
@QueueBinding
(
@RabbitListener
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UCENTER
,
bindings
=
@QueueBinding
(
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
))
key
=
MQConst
.
RK_SQL_UCENTER
,
public
void
consumerSqlForUCenterA
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
),
}
concurrency
=
"5"
@RabbitListener
(
bindings
=
@QueueBinding
(
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UCENTER
,
public
void
consumerSqlForUCenter
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
))
public
void
consumerSqlForUCenterB
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UCENTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
))
public
void
consumerSqlForUCenterC
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UCENTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
))
public
void
consumerSqlForUCenterD
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UCENTER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UCENTER
)
))
public
void
consumerSqlForUCenterE
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
}
/* ================================================================== | 会员购买 */
/* ================================================================== | 会员购买 */
@RabbitListener
(
bindings
=
@QueueBinding
(
@RabbitListener
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UMEMBER
,
bindings
=
@QueueBinding
(
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
))
key
=
MQConst
.
RK_SQL_UMEMBER
,
public
void
consumerSqlForUMemberA
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
),
}
concurrency
=
"5"
@RabbitListener
(
bindings
=
@QueueBinding
(
)
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UMEMBER
,
public
void
consumerSqlForUMember
(
Message
msg
,
Channel
channel
)
{
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
))
public
void
consumerSqlForUMemberB
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UMEMBER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
))
public
void
consumerSqlForUMemberC
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UMEMBER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
))
public
void
consumerSqlForUMemberD
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
@RabbitListener
(
bindings
=
@QueueBinding
(
exchange
=
@Exchange
(
MQConst
.
EX_LNS_SQL_UCENTER
),
key
=
MQConst
.
RK_SQL_UMEMBER
,
value
=
@Queue
(
MQConst
.
QUEUES_SQL_UMEMBER
)
))
public
void
consumerSqlForUMemberE
(
Message
msg
,
Channel
channel
)
{
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
this
.
consumerSqlDaoHandler
(
msg
,
channel
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-consumer-adam/src/test/java/com/liquidnet/service/consumer/service/processor/ConsumerAdamProcessorTest.java
→
liquidnet-bus-service/liquidnet-service-consumer-adam/src/test/java/com/liquidnet/service/consumer/service/processor/ConsumerAdam
UCenter
ProcessorTest.java
View file @
866e774b
...
@@ -8,9 +8,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
...
@@ -8,9 +8,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
@SpringBootTest
public
class
ConsumerAdamProcessorTest
{
public
class
ConsumerAdam
UCenter
ProcessorTest
{
@Autowired
@Autowired
ConsumerAdam
Processor
consumerAdam
Processor
;
ConsumerAdam
UCenterProcessor
consumerAdamUCenter
Processor
;
@Test
@Test
public
void
test
()
{
public
void
test
()
{
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl-prod.sql
View file @
866e774b
...
@@ -4,7 +4,7 @@ db.createCollection("KylinCheckUserPerformanceVo");
...
@@ -4,7 +4,7 @@ db.createCollection("KylinCheckUserPerformanceVo");
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundsVo
Base
"
);
db
.
createCollection
(
"KylinOrderRefundsVo"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
...
@@ -21,8 +21,8 @@ db.KylinCheckUserVo.createIndex({mobile:"hashed"});
...
@@ -21,8 +21,8 @@ db.KylinCheckUserVo.createIndex({mobile:"hashed"});
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
Base
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
Base
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
...
@@ -42,7 +42,7 @@ sh.shardCollection("prod_ln_scene.KylinCheckUserPerformanceVo",{"checkUserId":"h
...
@@ -42,7 +42,7 @@ sh.shardCollection("prod_ln_scene.KylinCheckUserPerformanceVo",{"checkUserId":"h
sh
.
shardCollection
(
"prod_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundsVo
Base
"
,
{
"orderRefundsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundsVo"
,
{
"orderRefundsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
View file @
866e774b
...
@@ -4,7 +4,7 @@ db.createCollection("KylinCheckUserPerformanceVo");
...
@@ -4,7 +4,7 @@ db.createCollection("KylinCheckUserPerformanceVo");
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundsVo
Base
"
);
db
.
createCollection
(
"KylinOrderRefundsVo"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
...
@@ -21,8 +21,8 @@ db.KylinCheckUserVo.createIndex({mobile:"hashed"});
...
@@ -21,8 +21,8 @@ db.KylinCheckUserVo.createIndex({mobile:"hashed"});
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
Base
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
Base
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
...
@@ -42,7 +42,7 @@ sh.shardCollection("test_ln_scene.KylinCheckUserPerformanceVo",{"checkUserId":"h
...
@@ -42,7 +42,7 @@ sh.shardCollection("test_ln_scene.KylinCheckUserPerformanceVo",{"checkUserId":"h
sh
.
shardCollection
(
"test_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundsVo
Base
"
,
{
"orderRefundsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderRefundsVo"
,
{
"orderRefundsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
...
...
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