记得上下班打卡 | git大法好,push需谨慎

Commit 43f16567 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/master' into jxl_418_exchange

# Conflicts:
#	liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/utils/GoblinRedisUtils.java
parents 3c3f3c99 d06671ce
package com.liquidnet.service.goblin.dto;
import com.liquidnet.commons.lang.util.JsonUtils;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 积分增减队列消息体
*
* @author jiangxiulong
*/
@Data
public class GoblinQueueBizIntegralDto implements Serializable, Cloneable {
private static final long serialVersionUID = 7538372638864080920L;
private String content;
private BigDecimal score;
private String uid;
private int type; // 1增 2减
private static final GoblinQueueBizIntegralDto obj = new GoblinQueueBizIntegralDto();
public static GoblinQueueBizIntegralDto getNew() {
try {
return (GoblinQueueBizIntegralDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GoblinQueueBizIntegralDto();
}
}
public String toJson() {
return JsonUtils.toJson(this);
}
}
......@@ -31,6 +31,7 @@ public class GoblinUserDigitalArtworkVo implements Serializable, Cloneable {
/* ---------------------- 冗余SPU信息 ---------------------- */
private String author;
private String publisher;
private String hitArtworkId;
private static final GoblinUserDigitalArtworkVo obj = new GoblinUserDigitalArtworkVo();
......
......@@ -10,7 +10,7 @@ spring:
cloud:
config:
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.106.122.201:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -104,8 +104,8 @@ public class HttpUtil {
public static String postJson(String url, String jsonStr, MultiValueMap<String, String> headers) {
MultiValueMap<String, String> commonHeader = CollectionUtil.linkedMultiValueMapStringString();
headers.add("Content-Type", MediaType.APPLICATION_JSON_UTF8_VALUE);
headers.add("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE);
commonHeader.add("Content-Type", MediaType.APPLICATION_JSON_UTF8_VALUE);
commonHeader.add("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE);
if (url == null || url.trim().isEmpty()) {
return null;
......@@ -119,6 +119,7 @@ public class HttpUtil {
if (headers != null) {
httpHeaders.addAll(headers);
}
HttpEntity<Object> httpEntity = new HttpEntity(jsonStr, httpHeaders);
// 提交方式:表单、json
......
......@@ -41,7 +41,7 @@ public class RedisStreamConfig {
stringObjectObjectStreamOperations.delete(key, recordId.getValue());
}
} catch (Exception e) {
log.error("Ex:redis stream init [{},{}],ex:{}", key, group, e.getMessage());
log.warn("###Ex:redis stream init [{},{}],ex:{}", key, group, e.getMessage());
}
}
......
......@@ -268,7 +268,6 @@ public class MQConst {
GOBLIN_STORE_MARKET("goblin:stream:store.market", "group.store.market", "店铺活动"),
GOBLIN_SELF_MARKET("goblin:stream:self.market", "group.self.market", "平台活动"),
GOBLIN_ORDER_CREATE_PAY("goblin:stream:order:create_pay", "group.order:create_pay", "订单创建&支付"),
GOBLIN_NFT_ORDER("goblin:stream:nftOrder:create", "group.nftOrder:create", "NFT订单处理"),
GOBLIN_SHOP_CART("goblin:stream:sql.shopcart","group.shop.shopcart","购物车"),
GOBLIN_ORDER_AGAIN("goblin:stream:order:again", "group.order:again", "订单再次支付"),
GOBLIN_ORDER_CLOSE("goblin:stream:order:close", "group.order:close", "订单关闭"),
......@@ -291,6 +290,10 @@ public class MQConst {
BIZ_ARTWORK_CLQ("goblin:stream:biz_art:clq", "group.biz.artwork", "藏品声明查询"),
BIZ_ARTWORK_GEN("goblin:stream:biz_art:gen", "group.biz.artwork", "藏品生成"),
SQL_ARTWORK_GEN("goblin:stream:sql_art:gen", "group.biz.artwork", "藏品生成"),
GOBLIN_NFT_ORDER("goblin:stream:nftOrder:create", "group.nftOrder:create", "NFT订单处理"),
BIZ_INTEGRAL("goblin:stream:biz_integral", "group.biz.integral", "增减积分操作"),
;
private final String key;
......
......@@ -716,7 +716,8 @@ public class ZxlnftSdkUtil {
BeanUtil.copy(reqDto,req);
req.setPubKey(zxlnftConfig.getNftPlatformPubKey());
req.setPlatformPubKey(zxlnftConfig.getNftPlatformPubKey());
req.setHash(zxlnftBiz.getHashString(req.getUrl()));
// req.setHash(zxlnftBiz.getHashString(req.getUrl()));
req.setHash(reqDto.getMetaData());
/**
* 发行人的私钥签名,签名对象是(platformPubKey_pubKey_接口名_author_name_url_displayUrl_hash_desc_flag_publishCount_seriesId_seriesBeginIndex
......
......@@ -7,8 +7,6 @@ liquidnet:
logfile:
path: /data/logs
name: client-admin-web
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
mysql:
master:
......
......@@ -7,9 +7,7 @@ liquidnet:
logfile:
path: /data/logs
name: client-admin-web
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
level: info
mysql:
master:
urlHostAndPort: ${liquidnet.mysql.urlHostAndPort}
......
......@@ -41,24 +41,6 @@ logging:
level:
com.ruoyi: info
org.springframework: warn
#logging:
# # config: ${liquidnet.logfile.config}
# file:
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
# max-size: 200MB
# pattern:
# file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
# console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
# rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
# level:
# root: info
# #以下是为指定包设置日志级别
# com:
# liquidnet:
# client:
# admin: debug
# org:
# springframework: warn
# -----------------------------------------------------------
......
......@@ -6,5 +6,7 @@ liquidnet:
logfile:
name: client-job
path: /data/logs
max-history: 7
level: debug
mysql:
database-name: dev_ln_clijob
\ No newline at end of file
......@@ -6,5 +6,7 @@ liquidnet:
logfile:
name: client-job
path: /data/logs
max-history: 7
level: info
mysql:
database-name: test_ln_clijob
\ No newline at end of file
......@@ -109,11 +109,12 @@ xxl:
logging:
file:
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
level:
root: info
com:
liquidnet: info
root: error
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
pattern:
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-adam
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-adam
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-candy
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-candy
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-chime
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mongodb:
sslEnabled: false
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-chime
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mongodb:
sslEnabled: false
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-adam
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-adam
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-candy
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-candy
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-dragon
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-dragon
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......
liquidnet:
system:
updating:
switch: false
info:
port: 9993
context:
# context: /service-consumer
name: liquidnet-service-consumer-goblin
logfile:
path: /data/logs
name: service-consumer-goblin
config: classpath:logback-spring.xml
level: debug
mysql:
database-name: dev_ln_scene
#以下为spring各环境个性配置
\ No newline at end of file
liquidnet:
system:
updating:
switch: false
info:
port: 9993
context:
# context: /service-consumer
name: liquidnet-service-consumer-goblin
logfile:
path: /data/logs
name: service-consumer-goblin
config: classpath:logback-spring.xml
level: info
mysql:
database-name: test_ln_scene
#以下为spring各环境个性配置
server:
port: ${liquidnet.info.port}
tomcat:
uri-encoding: UTF-8
servlet:
context-path: ${liquidnet.info.context}
# -----------------------------------------------------------
knife4j:
production: ${liquidnet.knife4j.disable}
basic:
enable: true
username: ${liquidnet.security.username}
password: ${liquidnet.security.password}
# -----------------------------------------------------------
logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
# client:
# register-with-eureka: true
# fetch-registry: true
# serviceUrl:
# defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
instance:
hostname: ${spring.cloud.client.ip-address}
lease-expiration-duration-in-seconds: 15 #服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
lease-renewal-interval-in-seconds: 5 #服务刷新时间配置,每隔这个时间会主动心跳一次
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
# -----------------------------------------------------------
#actuator/info
info:
app:
name: ${liquidnet.info.name}
company:
name: zhengzai.tv
build:
groupId: '@project.groupId@'
artifactId: '@project.artifactId@'
version: '@project.version@'
# -----------------------------------------------------------
spring:
application:
name: ${liquidnet.info.name}
profiles:
include: common-service #这里加载management相关公共配置
redis:
database: ${liquidnet.redis.goblin.database}
dbs: ${liquidnet.redis.goblin.dbs}
port: ${liquidnet.redis.goblin.port}
host: ${liquidnet.redis.goblin.host}
password: ${liquidnet.redis.goblin.password}
lettuce:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
datasource:
name: ${liquidnet.mysql.database-name}
url: jdbc:mysql://${liquidnet.mysql.urlHostAndPort}/${liquidnet.mysql.database-name}?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&useSSL=false
username: ${liquidnet.mysql.username}
password: ${liquidnet.mysql.password}
# type: org.apache.tomcat.jdbc.pool.DataSource
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 45
minimum-idle: 8
connection-test-query: SELECT 1
# -----------------------------------------------------------
# -----------------------------------------------------------
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-kylin
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-kylin
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......@@ -63,7 +65,7 @@ spring:
password: ${liquidnet.redis.kylin.password}
lettuce:
pool:
max-active: 8
max-active: 20
max-wait: -1
max-idle: 8
min-idle: 0
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-stone
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-stone
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-sweet
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -10,7 +10,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-consumer-sweet
config: classpath:logback-spring.xml
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -17,6 +17,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -24,6 +25,7 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-dragon
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-dragon
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,7 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-example
config: classpath:logback-spring.xml
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
\ No newline at end of file
......@@ -17,7 +17,7 @@ spring:
# trace:
# enabled: true
datasource:
name: liquidnet_bus_db
name: ${liquidnet.mysql.database-name}
url: jdbc:mysql://${liquidnet.mysql.urlHostAndPort}/${liquidnet.mysql.database-name}?serverTimezone=UTC&characterEncoding=utf-8&useSSL=false
username: ${liquidnet.mysql.username}
password: ${liquidnet.mysql.password}
......@@ -41,18 +41,18 @@ spring:
# port: ${liquidnet.rabbitmq.port}
# username: ${liquidnet.rabbitmq.username}
# password: ${liquidnet.rabbitmq.password}
redis:
database: 15
dbs: ${liquidnet.redis.dbs}
port: ${liquidnet.redis.port}
host: ${liquidnet.redis.host}
password: ${liquidnet.redis.password}
lettuce:
pool:
max-active: 16
max-wait: -1
max-idle: 8
min-idle: 4
# redis:
# database: 15
# dbs: ${liquidnet.redis.dbs}
# port: ${liquidnet.redis.port}
# host: ${liquidnet.redis.host}
# password: ${liquidnet.redis.password}
# lettuce:
# pool:
# max-active: 16
# max-wait: -1
# max-idle: 8
# min-idle: 4
# -----------------------------------------------------------
knife4j:
enable: true
......@@ -66,15 +66,16 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
# com:
# liquidnet: info
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
client:
......
......@@ -6,6 +6,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-executor-main
max-history: 7
level: debug
xxl:
accessToken: qk52rqSejRBm9enf6BTTxw==
admin:
......
......@@ -6,6 +6,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-executor-main
max-history: 7
level: info
xxl:
accessToken: qk52rqSejRBm9enf6BTTxw==
admin:
......
......@@ -9,6 +9,7 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
......@@ -16,8 +17,8 @@ logging:
level:
root: error
#以下是为指定包设置日志级别
# com:
# liquidnet: info
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
instance:
......
liquidnet:
system:
updating:
switch: false
info:
port: 9016
context: /galaxy
name: liquidnet-service-galaxy
logfile:
path: /data/logs
name: service-galaxy
config: classpath:logback-spring.xml
file-max-size: 200MB
level: info
mongodb:
sslEnabled: false
database: dev_ln_scene
liquidnet:
system:
updating:
switch: false
info:
port: 9016
context: /galaxy
name: liquidnet-service-galaxy
logfile:
path: /data/logs
name: service-galaxy
config: classpath:logback-spring.xml
file-max-size: 200MB
level: info
mongodb:
sslEnabled: false
database: test_ln_scene
server:
port: ${liquidnet.info.port}
tomcat:
uri-encoding: UTF-8
maxThreads: 2000 #默认200
minSpareThreads: 200 #默认10
maxConnections: 20000 #默认10000
acceptCount: 5000 #默认100
processorCache: -1 #默认200
servlet:
context-path: ${liquidnet.info.context}
# -----------------------------------------------------------
knife4j:
enable: true
production: ${liquidnet.knife4j.disable}
basic:
enable: true
username: ${liquidnet.security.username}
password: ${liquidnet.security.password}
# -----------------------------------------------------------
logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
pattern:
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 %X{lnsTranceId} [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
# client:
# register-with-eureka: true
# fetch-registry: true
# serviceUrl:
# defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
instance:
hostname: ${spring.cloud.client.ip-address}
lease-expiration-duration-in-seconds: 15 #服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
lease-renewal-interval-in-seconds: 5 #服务刷新时间配置,每隔这个时间会主动心跳一次
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
# -----------------------------------------------------------
#actuator/info
info:
app:
name: ${liquidnet.info.name}
company:
name: lightnet.io
build:
groupId: '@project.groupId@'
artifactId: '@project.artifactId@'
version: '@project.version@'
# -----------------------------------------------------------
mybatis-plus:
mapper-locations: classpath:com.liquidnet.service.order.mapper/*Mapper.xml
# -----------------------------------------------------------
spring:
application:
name: ${liquidnet.info.name}
servlet:
multipart:
max-file-size: 5MB
max-request-size: 10MB
profiles:
include: common-service #这里加载management相关公共配置
redis:
database: ${liquidnet.redis.kylin.database}
dbs: ${liquidnet.redis.kylin.dbs}
port: ${liquidnet.redis.kylin.port}
host: ${liquidnet.redis.kylin.host}
password: ${liquidnet.redis.kylin.password}
lettuce:
pool:
max-active: 8
max-wait: -1
max-idle: 8
min-idle: 0
autoconfigure:
exclude:
- org.springframework.cloud.bus.BusAutoConfiguration
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
data:
mongodb:
uri: mongodb://${liquidnet.mongodb.user}:${liquidnet.mongodb.pwd}@${liquidnet.mongodb.host}/?authSource=admin&maxPoolSize=2000&waitQueueMultiple=100
sslEnabled: ${liquidnet.mongodb.sslEnabled}
database: ${liquidnet.mongodb.database}
# -----------------------------------------------------------
# -----------------------------------------------------------
global-auth:
exclude-url-pattern: # 模式I(与模式II互斥)
- ${liquidnet.info.context}/doc.html
- ${liquidnet.info.context}/webjars/**
- ${liquidnet.info.context}/swagger-resources/**
- ${liquidnet.info.context}/v2/api-docs*
oncheck-url-pattern:
# - ${liquidnet.info.context}/**
# -----------------------------------------------------------
# -----------------------------------------------------------
\ No newline at end of file
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-goblin
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,9 +9,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-goblin
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
max-history: 7
level: info
mysql:
database-name: test_ln_scene
mongodb:
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-kylin
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-kylin
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-notify
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
# rabbitmq:
# connection-timeout: 5000
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-notify
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
# rabbitmq:
# connection-timeout: 5000
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-order
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,9 +9,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-order
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
max-history: 7
level: info
mysql:
database-name: test_ln_scene
mongodb:
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-platform
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
# rabbitmq:
# connection-timeout: 5000
......
......@@ -9,9 +9,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-platform
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
max-history: 7
level: info
# rabbitmq:
# connection-timeout: 5000
mysql:
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -7,6 +7,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-reconciliation
max-history: 7
level: debug
mysql:
main-db:
urlHostAndPort: ${liquidnet.mysql.urlHostAndPort}
......
......@@ -47,16 +47,16 @@ spring:
# port: ${liquidnet.rabbitmq.port}
# username: ${liquidnet.rabbitmq.username}
# password: ${liquidnet.rabbitmq.password}
redis:
port: ${liquidnet.redis.port}
host: ${liquidnet.redis.host}
lettuce:
pool:
max-active: 16
max-wait: -1
max-idle: 8
min-idle: 4
password: ${liquidnet.redis.password}
# redis:
# port: ${liquidnet.redis.port}
# host: ${liquidnet.redis.host}
# lettuce:
# pool:
# max-active: 16
# max-wait: -1
# max-idle: 8
# min-idle: 4
# password: ${liquidnet.redis.password}
mvc:
static-path-pattern: /templates/**
# 定位模板的目录
......@@ -77,15 +77,16 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
# com:
# liquidnet: info
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
# client:
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-slime
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,9 +9,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-slime
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
max-history: 7
level: info
mysql:
database-name: test_ln_scene
mongodb:
......
......@@ -22,16 +22,17 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
com:
liquidnet: ${liquidnet.logfile.level}
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
# client:
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-smile
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-smile
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-stone
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
liquidnet:
system:
updating:
switch: false
info:
port: 9010
context: /stone
name: liquidnet-service-stone
logfile:
path: /data/logs
name: service-stone
config: classpath:logback-spring.xml
file-max-size: 200MB
level: info
mysql:
database-name: test_ln_scene
mongodb:
sslEnabled: false
database: test_ln_scene
adam:
url: ${liquidnet.service.adam.url}
candy:
url: ${liquidnet.service.candy.url}
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-stone
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: info
mysql:
database-name: test_ln_scene
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -9,8 +9,7 @@ liquidnet:
logfile:
path: /data/logs
name: service-sweet
config: classpath:logback-spring.xml
file-max-size: 200MB
max-history: 7
level: debug
mysql:
database-name: dev_ln_scene
......
......@@ -9,9 +9,8 @@ liquidnet:
logfile:
path: /data/logs
name: service-sweet
config: classpath:logback-spring.xml
file-max-size: 200MB
level: debug
max-history: 7
level: info
mysql:
database-name: test_ln_scene
mongodb:
......
......@@ -22,7 +22,8 @@ logging:
# config: ${liquidnet.logfile.config}
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: ${liquidnet.logfile.file-max-size}
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %X{lnsTranceId} [%logger{56}:%line] - %msg%n'
......
......@@ -5,4 +5,5 @@ liquidnet:
logfile:
path: /data/logs
name: support-zuul
max-history: 7
level: debug
......@@ -5,5 +5,6 @@ liquidnet:
logfile:
path: /data/logs
name: support-zuul
level: debug
max-history: 7
level: info
......@@ -21,13 +21,15 @@ logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
max-size: 200MB
max-history: ${liquidnet.logfile.max-history}
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
spring:
......@@ -39,10 +41,10 @@ spring:
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
profiles:
include: common-service
redis:
port: ${liquidnet.redis.port}
host: ${liquidnet.redis.host}
password: ${liquidnet.redis.password}
# redis:
# port: ${liquidnet.redis.port}
# host: ${liquidnet.redis.host}
# password: ${liquidnet.redis.password}
# -----------------------------------------------------------
eureka:
# client:
......
......@@ -10,6 +10,7 @@ spring:
cloud:
config:
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,9 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.105.38.151:7002/support-config
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,7 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,7 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -4,6 +4,7 @@ import com.liquidnet.common.cache.redis.config.RedisStreamConfig;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.consumer.kylin.receiver.ConsumerGoblinBizArtworkClqRdsReceiver;
import com.liquidnet.service.consumer.kylin.receiver.ConsumerGoblinBizArtworkUplRdsReceiver;
import com.liquidnet.service.consumer.kylin.receiver.ConsumerGoblinBizIntegralReceiver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -29,6 +30,8 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig {
ConsumerGoblinBizArtworkClqRdsReceiver consumerGoblinBizArtworkClqRdsReceiver;
// @Autowired
// ConsumerGoblinBizArtworkGenRdsReceiver consumerGoblinBizArtworkGenRdsReceiver;
@Autowired
ConsumerGoblinBizIntegralReceiver consumerGoblinBizIntegralReceiver;
@Bean// 藏品上传声明
public List<Subscription> subscriptionBizArtworkUpl(RedisConnectionFactory factory) {
......@@ -77,4 +80,20 @@ public class ConsumerCommonBizRedisStreamConfig extends RedisStreamConfig {
// }
// return subscriptionList;
// }
@Bean// 增减积分
public List<Subscription> subscriptionBizIntegral(RedisConnectionFactory factory) {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.BIZ_INTEGRAL;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
StreamOffset.create(stream.getKey(), ReadOffset.lastConsumed()), consumerGoblinBizIntegralReceiver
));
listenerContainer.start();
}
return subscriptionList;
}
}
......@@ -49,7 +49,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_0;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -65,7 +65,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_1;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -81,7 +81,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_2;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -97,7 +97,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_3;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -113,7 +113,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_4;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -129,7 +129,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_5;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -145,7 +145,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_6;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -161,7 +161,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_7;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -177,7 +177,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_8;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......@@ -193,7 +193,7 @@ public class ConsumerOrderCloseRedisStreamConfig extends RedisStreamConfig {
List<Subscription> subscriptionList = new ArrayList<>();
MQConst.GoblinQueue stream = MQConst.GoblinQueue.GOBLIN_UN_PAY_9;
this.initStream(stringRedisTemplate, stream.getKey(), stream.getGroup());
for (int i = 0; i < 20; i++) {
for (int i = 0; i < 10; i++) {
StreamMessageListenerContainer<String, MapRecord<String, String, String>> listenerContainer = this.buildStreamMessageListenerContainer(factory);
subscriptionList.add(listenerContainer.receiveAutoAck(
Consumer.from(stream.getGroup(), getConsumerName(stream.name() + i)),
......
package com.liquidnet.service.consumer.kylin.receiver;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.dto.GoblinQueueBizIntegralDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.stream.StreamRecords;
import org.springframework.stereotype.Component;
import org.springframework.util.MultiValueMap;
import java.util.HashMap;
@Slf4j
@Component
public class ConsumerGoblinBizIntegralReceiver extends AbstractBizRedisReceiver {
@Value("${liquidnet.service.stone.url}")
private String stoneUrl;
@Override
protected String getRedisStreamKey() {
return MQConst.GoblinQueue.BIZ_INTEGRAL.getKey();
}
@Override
protected String getRedisStreamGroup() {
return MQConst.GoblinQueue.BIZ_INTEGRAL.getGroup();
}
@Override
protected boolean consumerMessageHandler(String msg) {
boolean aBoolean = false;
try {
GoblinQueueBizIntegralDto fromJsonObj = JsonUtils.fromJson(msg, GoblinQueueBizIntegralDto.class);
if (fromJsonObj == null) {
log.warn("CONSUMER MSG NULL_DTO ==> [{}]:{}", this.getRedisStreamKey(), msg);
aBoolean = true;
} else {
aBoolean = this.bizIntegralProcessing(fromJsonObj);
}
} catch (Exception e) {
log.error("CONSUMER MSG EX_HANDLE ==> [{}]:{}", this.getRedisStreamKey(), msg, e);
} finally {
if (!aBoolean) {
HashMap<String, String> map = CollectionUtil.mapStringString();
map.put(MQConst.QUEUE_MESSAGE_KEY, msg);
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(this.getRedisStreamKey()));
}
}
return aBoolean;
}
private boolean bizIntegralProcessing(GoblinQueueBizIntegralDto dto) {
try {
log.info("bizIntegralProcessing params:{}", dto);
String uid = dto.getUid(), content = dto.getContent();
int type = dto.getType();
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("score", dto.getScore().intValue() + "");
params.add("content", content);
params.add("uid", uid);
String resultData = "";
long ss = System.currentTimeMillis();
log.info("HttpUtil s:{}", ss);
if (type == 1) {
resultData = HttpUtil.post(stoneUrl + "/user/logs/in2111", params, header);
} else {
resultData = HttpUtil.post(stoneUrl + "/user/logs/de2111", params, header);
}
log.info("HttpUtil e:{}", System.currentTimeMillis() - ss);
log.info("bizIntegralProcessing result:{}", resultData);
return true;
} catch (Exception e) {
log.error("bizIntegralProcessing e:{}", e);
return false;
}
}
/* ------------------------------------------------------------------------------------ */
}
......@@ -9,7 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,7 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,7 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -9,9 +9,8 @@ eureka:
spring:
cloud:
config:
# uri: http://39.105.38.151:7002/support-config
# uri: http://39.106.122.201:7002/support-config
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
......@@ -10,7 +10,7 @@ spring:
cloud:
config:
# uri: http://127.0.0.1:7002/support-config
# uri: http://39.106.122.201:7002/support-config
# uri: http://39.107.71.112:7002/support-config
profile: ${liquidnet.cloudConfig.profile}
name: ${spring.application.name} #默认为spring.application.name
discovery:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment