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

Commit a3445e85 authored by limingyang's avatar limingyang

Merge remote-tracking branch 'origin/lmy_start' into lmy_start

# Conflicts:
#	liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/tools/ExportDataController.java
parents 188f4a58 16139d5f
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);
}
}
......@@ -8,6 +8,7 @@ import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -15,12 +16,20 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
@RequestMapping("/exportDetailed")
@RequestMapping("tools/export")
public class ExportDataController extends BaseController {
@Autowired
private IExportService exportService;
private String prefix = "zhengzai/financial";
@GetMapping()
public String financial() {
return prefix + "/export";
}
/**
* 导出订单明细
*
......
......@@ -285,6 +285,9 @@
} else if(26 == targetType) {
Id = dataList[i].id;
Title = dataList[i].name;
}else if(7 == targetType || 9 == targetType) {
Id = dataList[i].spuId;
Title = dataList[i].spuName;
} else {
Id = dataList[i].id;
Title = dataList[i].title;
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('财务导出')"/>
<th:block th:include="include :: datetimepicker-css"/>
</head>
<style>
td {
horiz-align: center;
text-align: left;
padding: 10px;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>搜索类型:</label>
<select id="type" name="type">
<option value="0">请选择</option>
<option value="1">商品[订单时间]</option>
<option value="2">演出[订单时间]</option>
<option value="3">演出[演出id]</option>
<option value="4">演出[演出时间]</option>
<option value="5">会员[订单时间]</option>
</select>
</li>
<li>
<label>演出id:</label>
<input id="performanceId" type="text" name="performanceId"/>
</li>
<li>
<div class="form-group">
<label>时间范围:</label>
<input type="text" style="width: 200px;float: left"
class="form-control" id="startTime" placeholder="开始时间选择" name="timeStart"/>
<span class="control-label"
style="float: left;margin-left: 10px;margin-right: 10px"> - </span>
<input type="text" style="width: 200px;float: left"
class="form-control" id="endTime" placeholder="结束时间选择" name="timeEnd"/>
</div>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchExport()"><i
class="fa fa-search"></i>导出</a>
</li>
</ul>
</div>
</form>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var prefix = ctx + "tools/export";
$("input[name='timeStart']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
autoclose: true
});
$("input[name='timeEnd']").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
autoclose: true
});
function searchExport() {
var type = document.getElementById("type").value;
var performanceId = document.getElementById("performanceId").value;
var st = document.getElementById("startTime").value;
var et = document.getElementById("endTime").value;
if (type == 0) {
alert("请选择导出类型");
} else if (type == 1) {//商品导出逻辑
if (st == "" || et == "") {
alert("请选择时间范围");
}
} else if (type == 2) {//商品导出逻辑
if (st == "" || et == "") {
alert("请选择时间范围");
}
} else if (type == 4) {//商品导出逻辑
if (st == "" || et == "") {
alert("请选择时间范围");
}
} else if (type == 5) {//商品导出逻辑
if (st == "" || et == "") {
alert("请选择时间范围");
}
} else if (type == 3) {//演出导出逻辑
if (performanceId == "") {
alert("演出id不能为空");
}
}
// $.ajax({
// url: prefix + "/platform/basicServices/alOss/upload",//路径是你控制器中上传图片的方法,下面controller里面我会写到
// data: formData,
// cache: false,
// contentType: false,
// processData: false,
// type: 'POST',
// success: function (res) {
// }
// });
}
</script>
</body>
</html>
......@@ -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;
......
......@@ -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:
......
......@@ -75,21 +75,28 @@ public class ZxinTradeCommonBiz {
//获取订单信息
GalaxyNftOrderBo nftOrderBo = dataUtils.getNftOrderBo(reqDto.getRouterType(),reqDto.getNftOrderPayId());
if(StringUtil.isNotNull(nftOrderBo)){
/**
* 如果已经发行购买成功
*/
//初始化订单数据
if(nftOrderBo==null){
nftOrderBo = galaxyBeanTransferBiz.buildNftOrderBo(reqDto.getNftOrderPayId(),userInfoBo,seriesNftInfoBo);
dataUtils.setNftOrderBo(reqDto.getRouterType(),reqDto.getNftOrderPayId(),nftOrderBo);
}else if(StringUtil.isNotNull(nftOrderBo)){
if(nftOrderBo.getNftPublishStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.TASK_SUCCESS.getCode())
&&nftOrderBo.getNftBuyStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.TASK_SUCCESS.getCode())){
return ResponseDto.failure(GalaxyErrorEnum.PUBLISH_FAIL_ALREADY_EXIST.getCode(), GalaxyErrorEnum.PUBLISH_FAIL_ALREADY_EXIST.getMessage());
GalaxyNftPublishAndBuyRespDto nftPublishAndBuyRespDto = GalaxyNftPublishAndBuyRespDto.getNew();
nftPublishAndBuyRespDto.setUserId(reqDto.getUserId());
nftPublishAndBuyRespDto.setNftId(nftOrderBo.getNftId());
log.error("开始执行nftPublishAndBuy error msg:{}", GalaxyErrorEnum.PUBLISH_FAIL_ALREADY_EXIST.toString());
return ResponseDto.success(nftPublishAndBuyRespDto);
}
if(nftOrderBo.getNftPublishStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.TASK_SUCCESS.getCode())
&&nftOrderBo.getNftBuyStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.INIT.getCode())){
&&(nftOrderBo.getNftBuyStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.INIT.getCode())
||nftOrderBo.getNftBuyStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.PROCESSING.getCode()))){
//再次发起购买
GalaxyNftPublishAndBuyRespDto nftPublishAndBuyRespDto = this.executeBuyBusiness(reqDto,userInfoBo,seriesNftInfoBo,nftOrderBo);
if(StringUtil.isNotNull(nftPublishAndBuyRespDto)&&StringUtil.isNotEmpty(nftPublishAndBuyRespDto.getNftId())){
return ResponseDto.success(nftPublishAndBuyRespDto);
}else{
log.error("开始执行nftPublishAndBuy-->executeBuyBusiness error msg:{}",GalaxyErrorEnum.NFT_BUY_FAIL.getMessage());
return ResponseDto.failure(GalaxyErrorEnum.NFT_BUY_FAIL.getCode(),GalaxyErrorEnum.NFT_BUY_FAIL.getMessage());
}
}
......@@ -146,12 +153,6 @@ public class ZxinTradeCommonBiz {
}
seriesBeginIndex = nftOrderBindBo.getNftIdIndex();
//初始化订单数据
if(nftOrderBo==null){
nftOrderBo = galaxyBeanTransferBiz.buildNftOrderBo(reqDto.getNftOrderPayId(),userInfoBo,seriesNftInfoBo);
dataUtils.setNftOrderBo(reqDto.getRouterType(),reqDto.getNftOrderPayId(),nftOrderBo);
}
// //查询系列信息(暂时不通过系列查询获取发行序列号)
// Nft032SeriesReqDto nft032ReqDto = Nft032SeriesReqDto.getNew();
// nft032ReqDto.setSeriesId(seriesId);
......@@ -165,6 +166,14 @@ public class ZxinTradeCommonBiz {
// seriesBeginIndex = Integer.parseInt(String.valueOf(crtCount.longValue() + 1));
// }
/**
* 如果已经发行购买成功
*/
if(nftOrderBo.getNftPublishStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.PROCESSING.getCode())){
if(StringUtil.isNotEmpty(nftOrderBo.getNftPublishTaskId())){
publishTaskId = nftOrderBo.getNftPublishTaskId();
}
}else if(nftOrderBo.getNftPublishStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.INIT.getCode())){
//3.1.2调用NFT发行接口
/**
* 发行无限制系列
......@@ -186,12 +195,14 @@ public class ZxinTradeCommonBiz {
nft034ReqDto.setMetaData(seriesNftInfoBo.getNftHash());
ZxlnftResponseDto<Nft034PublishRespDto> nft034RespDto = zxlnftSdkUtil.nft034Publish(nft034ReqDto);
if (nft034RespDto.isSuccess()) {
try{
if (nft034RespDto.isSuccess()){
publishTaskId = nft034RespDto.getData().getTaskId();
nftOrderBo.setNftPublishTaskId(publishTaskId);
}
}
if (StringUtil.isNotEmpty(publishTaskId)){
try{
//3.1.4查询 NFT发行结果
Nft035PublishResultReqDto nft035ReqDto = Nft035PublishResultReqDto.getNew();
nft035ReqDto.setTaskId(publishTaskId);
......@@ -200,6 +211,7 @@ public class ZxinTradeCommonBiz {
String nftIdBegin = null;
long timeStart = System.currentTimeMillis();
while (StringUtil.isEmpty(nftIdBegin)) {
Thread.sleep(500l);
count++;
ZxlnftResponseDto<Nft035PublishResultRespDto> nft035RespDtoTemp = zxlnftSdkUtil.nft035PublishResult(nft035ReqDto);
log.info("=======执行第{}次查询,taskId:{}", count, nft035ReqDto.getTaskId());
......@@ -226,6 +238,7 @@ public class ZxinTradeCommonBiz {
//赋值返回参数
nftId = nftIdBegin;
nftOrderBo.setNftId(nftId);
log.info("发行NFT后返回给前端nftID:{}", nftIdBegin);
log.info("总共执行了{}次查询 总耗时:{} MS", count, (System.currentTimeMillis() - timeStart));
}catch (GalaxyNftPublishException e){
......@@ -237,7 +250,7 @@ public class ZxinTradeCommonBiz {
}
}else{
//发行失败
throw new GalaxyNftPublishException(GalaxyErrorEnum.NFT_PUBLISH_ERROR.getCode(),"nft034Publish_resp:"+nft034RespDto.getMessage());
throw new GalaxyNftPublishException(GalaxyErrorEnum.NFT_PUBLISH_ERROR.getCode(),"nft034Publish_resp:taskId : "+publishTaskId);
}
}catch (GalaxyNftPublishException e) {
failDesc = e.getMessage();
......@@ -250,9 +263,18 @@ public class ZxinTradeCommonBiz {
if(StringUtil.isNotEmpty(failDesc)){
//记录发行异常信息
try{
//发行异常或者失败记录任务id
if(StringUtil.isNotNull(nftOrderBo)&&StringUtil.isNotEmpty(nftOrderBo.getNftPublishTaskId())){
nftOrderBo.setNftPublishStatus(GalaxyEnum.TaskStatusEnum.PROCESSING.getCode());
nftOrderBo.setUpdatedAt(LocalDateTime.now());
//更新nft发行状态为处理中
dataUtils.updateNftOrderPublishInfo(reqDto.getRouterType(),reqDto.getNftOrderPayId(),nftOrderBo);
}else{
//记录错误信息
GalaxyNftOrderFailLogVo nftOrderFailLogVo = galaxyBeanTransferBiz.buildNftOrderFailLogVo(GalaxyEnum.TradeTypeEnum.TRADE_PUBLISH,reqDto,GalaxyEnum.OrderDealWithStatusEnum.DATA_INIT,failDesc,null
,userInfoBo,seriesNftInfoBo,nftOrderBo);
dataUtils.setNftOrderFailLogVo(reqDto.getRouterType(),nftOrderFailLogVo);
}
}catch(Exception e){
log.error(reqDto.getNftOrderPayId()+"发行setNftOrderFailLogVo记录异常:"+e.getMessage(),e);
}
......@@ -260,8 +282,7 @@ public class ZxinTradeCommonBiz {
}
//更新订单缓存数据状态
if(StringUtil.isNotEmpty(nftId)){
nftOrderBo.setNftId(nftId);
if(StringUtil.isNotEmpty(nftOrderBo.getNftId())){
if(StringUtil.isNotNull(nftPublishChainTimestamp)){
//设置时间
String nftPublishChainTimestampStr = DateUtil.format(new Date(nftPublishChainTimestamp*1000),DateUtil.Formatter.yyyyMMddHHmmss);
......@@ -279,7 +300,7 @@ public class ZxinTradeCommonBiz {
}
//第二步:执行购买逻辑
if(StringUtil.isNotEmpty(nftId)){
if(StringUtil.isNotEmpty(nftOrderBo.getNftId())){
GalaxyNftPublishAndBuyRespDto nftPublishAndBuyRespDto = this.executeBuyBusiness(reqDto,userInfoBo,seriesNftInfoBo,nftOrderBo);
if(StringUtil.isNotNull(nftPublishAndBuyRespDto)&&StringUtil.isNotEmpty(nftPublishAndBuyRespDto.getNftId())){
return ResponseDto.success(nftPublishAndBuyRespDto);
......@@ -331,7 +352,13 @@ public class ZxinTradeCommonBiz {
String nftBuyTradeHash = null;
String nftBuyPayTaskId = null;
// 3.2.2调用购买NFT接口
//如果购买任务不为空,则直接进行购买任务查询
if(StringUtil.isNotEmpty(nftOrderBo.getNftBuyTaskId())){
nftBuyTaskId = nftOrderBo.getNftBuyTaskId();
}
if(StringUtil.isEmpty(nftBuyTaskId)){
// 3.2.2调用购买NFT接口
Nft043BuyReqDto nft043BuyReqDto = Nft043BuyReqDto.getNew();
nft043BuyReqDto.setNftId(nftId);
nft043BuyReqDto.setApplyScore(seriesNftInfoBo.getSellCount().intValue());
......@@ -366,10 +393,14 @@ public class ZxinTradeCommonBiz {
ZxlnftResponseDto<Nft043BuyRespDto> nft043RespDto = zxlnftSdkUtil.nft043Buy(nft043BuyReqDto);
if(nft043RespDto.isSuccess()){
try{
nftBuyTaskId = nft043RespDto.getData().getTaskId();
nftOrderBo.setNftBuyTaskId(nftBuyTaskId);
}
}
//如果购买任务id不为空
if(StringUtil.isNotEmpty(nftBuyTaskId)){
try{
//3.2.4查询NFT购买结果
Nft044BuyResultReqDto nft044ReqDto = Nft044BuyResultReqDto.getNew();
nft044ReqDto.setTaskId(nftBuyTaskId);
......@@ -378,6 +409,7 @@ public class ZxinTradeCommonBiz {
int count = 0;
while(nftBuyPayTaskId == null){
Thread.sleep(500l);
count++;
log.info("=======执行第{}次查询,taskId:{}",count,nft044ReqDto.getTaskId());
ZxlnftResponseDto<Nft044BuyResultRespDto> nft044RespDto = zxlnftSdkUtil.nft044BuyResult(nft044ReqDto);
......@@ -397,6 +429,8 @@ public class ZxinTradeCommonBiz {
nftBuyStatus = nft044RespDto.getData().getTaskStatus();
}
if(count==20){
//查询超过20次,则把nftId设置为空,为后续重新入队
nftId = null;
log.info("=======查询共5次,跳出循环!taskId:{}",nft044ReqDto.getTaskId());
break;
}
......@@ -431,12 +465,13 @@ public class ZxinTradeCommonBiz {
nftOrderBo.setNftBuyTradeHash(nftBuyTradeHash);
nftOrderBo.setNftBuyPayTaskId(nftBuyPayTaskId);
nftOrderBo.setUpdatedAt(LocalDateTime.now());
//先更新nft发行数据
//先更新nft购买数据
dataUtils.updateNftOrderBuyInfo(routerType,nftOrderBo.getNftOrderPayId(),nftOrderBo);
}else{
//购买失败
throw new GalaxyNftBuyException(GalaxyErrorEnum.NFT_BUY_ERROR.getCode(),"nft043Buy_resp:"+nft043RespDto.getMessage());
throw new GalaxyNftBuyException(GalaxyErrorEnum.NFT_BUY_ERROR.getCode(),"nft043Buy_resp: nftBuyTaskId:"+nftBuyTaskId);
}
GalaxyNftBuyRespDto nftBuyRespDto = GalaxyNftBuyRespDto.getNew();
nftBuyRespDto.setUserId(userInfoBo.getUserId());
nftBuyRespDto.setNftId(nftId);
......
......@@ -7,7 +7,6 @@ import com.liquidnet.common.third.zxlnft.dto.*;
import com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil;
import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.galaxy.biz.GalaxyBeanTransferBiz;
import com.liquidnet.service.galaxy.biz.GalaxyEnumBiz;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
......@@ -192,13 +191,13 @@ public class ZxinTradeBiz {
}
//判断是否需要二次购买
if(isNeedSecondBuy){
GalaxyNftPublishAndBuyReqDto galaxyNftPublishAndBuyReqDto = GalaxyNftPublishAndBuyReqDto.getNew();
BeanUtil.copy(reqDto,galaxyNftPublishAndBuyReqDto);
galaxyNftPublishAndBuyReqDto.setSkuId(nftOrderBo.getSkuId());
galaxyNftPublishAndBuyReqDto.setBuyTimestamp(DateUtil.getNowTime());
queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), JsonUtils.toJson(galaxyNftPublishAndBuyReqDto));
}
// if(isNeedSecondBuy){
// GalaxyNftPublishAndBuyReqDto galaxyNftPublishAndBuyReqDto = GalaxyNftPublishAndBuyReqDto.getNew();
// BeanUtil.copy(reqDto,galaxyNftPublishAndBuyReqDto);
// galaxyNftPublishAndBuyReqDto.setSkuId(nftOrderBo.getSkuId());
// galaxyNftPublishAndBuyReqDto.setBuyTimestamp(DateUtil.getNowTime());
// queueUtil.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), JsonUtils.toJson(galaxyNftPublishAndBuyReqDto));
// }
GalaxyNftPublishAndBuyResultQueryRespDto resultQueryRespDto = GalaxyNftPublishAndBuyResultQueryRespDto.getNew();
if(nftOrderBo.getNftPublishStatus().equalsIgnoreCase(GalaxyEnum.TaskStatusEnum.TASK_SUCCESS.getCode())&&
......
......@@ -27,6 +27,8 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
@Autowired
GoblinRedisUtils redisUtils;
@Autowired
GoblinOrderUtils goblinOrderUtils;
@Autowired
GoblinMongoUtils mongoUtils;
@Autowired
QueueUtils queueUtils;
......@@ -205,7 +207,7 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
uid, now, storeOrderVo.getOrderId(), now, now));
}
if (priceActual.compareTo(BigDecimal.ZERO) != 0) {
orderUtils.doTask(uid, priceActual);
goblinOrderUtils.integral(uid, priceActual, "购买商品", 1);
}
}
return ResponseDto.success();
......
......@@ -7,8 +7,10 @@ import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.candy.param.BackCouponParam;
import com.liquidnet.service.candy.vo.CandyCouponVo;
import com.liquidnet.service.goblin.dto.GoblinQueueBizIntegralDto;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -27,10 +29,10 @@ public class GoblinOrderUtils {
@Value("${liquidnet.service.candy.url}")
private String candyUrl;
@Value("${liquidnet.service.stone.url}")
private String stoneUrl;
@Autowired
GoblinRedisUtils redisUtils;
@Autowired
QueueUtils queueUtils;
public void backCoupon(String uCouponId, String uid) {
try {
......@@ -76,18 +78,14 @@ public class GoblinOrderUtils {
}
}
public void doTask(String uid, BigDecimal price) {
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("score", price.intValue() + "");
params.add("content", "购买商品:");
params.add("uid", uid);
String resultData = HttpUtil.post(stoneUrl + "/user/logs/in2111", params, header);
} catch (Exception e) {
log.error("添加积分失败,e:{}", e);
e.printStackTrace();
public void integral(String uid, BigDecimal price, String content, int type) {
if (price.intValue() > 0) {
GoblinQueueBizIntegralDto goblinQueueBizIntegralDto = GoblinQueueBizIntegralDto.getNew();
goblinQueueBizIntegralDto.setUid(uid);
goblinQueueBizIntegralDto.setScore(price);
goblinQueueBizIntegralDto.setContent(content);
goblinQueueBizIntegralDto.setType(type);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.BIZ_INTEGRAL.getKey(), goblinQueueBizIntegralDto.toJson());
}
}
......
......@@ -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:
......
......@@ -8,7 +8,6 @@ import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.UserPathDto;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.GoblinQueueBizArtworkGenDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
......@@ -658,6 +657,8 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
});
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlDataOrder));
// 加积分
goblinOrderUtils.integral(uid, orderVo.getPriceActual(), "购买数字藏品", 1);
// 处理订单退款和其他流程
if (Objects.equals(orderStatusOld, GoblinStatusConst.NftStatus.ORDER_STATUS_3.getValue())) {// 超时支付 退款
log.info("Nft订单超时支付 param:[orderCode:{}]", orderCode);
......@@ -673,8 +674,6 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
this.generateUserArtwork(orderVo);
// 增加销量
goblinRedisUtils.incrSkuSaleCount(orderVo.getSpuId(), orderVo.getSkuId(), orderVo.getNum());
// 加积分
goblinOrderUtils.doTask(uid, orderVo.getPriceActual());
}
// 写入用户订单列表 因取消的订单不展示 所以放在这里
nftOrderUtils.addNftOrderList(uid, orderVo.getOrderId());
......@@ -740,7 +739,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_NFT_ORDER.getKey(),
SqlMapping.gets(sqls, sqlsOrder, sqlsBackOrder));
//减积分
goblinOrderUtils.desTask(nftOrder.getUserId(), nftOrderRefundVo.getPrice());
goblinOrderUtils.integral(nftOrder.getUserId(), nftOrderRefundVo.getPrice(), "数字藏品退款", 2);
} else if (0 == status) {
log.info("NftRefundCallback: 支付平台返回状态为失败,编号{}", refundCallbackParam.getOrderRefundCode());
return "fail";
......
......@@ -871,7 +871,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
// }
//加分
if (orderUtils.noZhengzaiOrder(uid)) {
orderUtils.doTask(uid, priceActual);
orderUtils.integral(uid, priceActual, "购买商品", 1);
}
}
return "success";
......@@ -1029,7 +1029,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.GOBLIN_STORE_ORDER_OPERA.getKey(),
SqlMapping.gets(sqls, sqlsOrder, sqlsOrderSku, sqlsBackOrder));
//减积分
orderUtils.desTask(orderVo.getUserId(), backOrderVo.getRealBackPrice());
orderUtils.integral(orderVo.getUserId(), backOrderVo.getRealBackPrice(), "商品退款", 2);
} else if (0 == status) {
return "fail";
}
......@@ -1153,7 +1153,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
//加分
if (orderUtils.noZhengzaiOrder(uid)) {
orderUtils.doTask(uid, priceActual);
orderUtils.integral(uid, priceActual, "购买商品", 1);
}
} else {
// 业务处理失败
......
......@@ -68,6 +68,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
@Autowired
private OrderUtils orderUtils;
@Autowired
GoblinOrderUtils goblinOrderUtils;
@Autowired
private MongoTemplate mongoTemplate;
@Autowired
private MongoConverter mongoConverter;
......@@ -1032,7 +1034,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
// log.info("下单消息模版错误",e);
// }
//加分
orderUtils.doTask(orderTicketData.getUserId(), orderTicketData.getPerformanceTitle(), orderTicketData.getPriceActual());
goblinOrderUtils.integral(orderTicketData.getUserId(), orderTicketData.getPriceActual(), "购买演出:".concat(orderTicketData.getPerformanceTitle()), 1);
//
// innerService.reportO(orderTicketData, "摩登天空");
//大麦回调
......
......@@ -10,6 +10,7 @@ import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.candy.param.BackCouponParam;
import com.liquidnet.service.candy.vo.CandyUseResultVo;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.GoblinQueueBizIntegralDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinBackOrder;
import com.liquidnet.service.goblin.entity.GoblinBackOrderLog;
......@@ -30,12 +31,8 @@ import java.util.List;
@Slf4j
public class GoblinOrderUtils {
@Value("${liquidnet.service.adam.url}")
private String adamUrl;
@Value("${liquidnet.service.candy.url}")
private String candyUrl;
@Value("${liquidnet.service.stone.url}")
private String stoneUrl;
@Value("${liquidnet.service.order.url-pay.goblinRefundUrl}")
private String synUrl;
@Value("${liquidnet.service.dragon.urls.refundApply}")
......@@ -212,33 +209,14 @@ public class GoblinOrderUtils {
}
}
public void doTask(String uid, BigDecimal price) {
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("score", price.intValue() + "");
params.add("content", "购买商品:");
params.add("uid", uid);
String resultData = HttpUtil.post(stoneUrl + "/user/logs/in2111", params, header);
} catch (Exception e) {
log.error("添加积分失败,e:{}", e);
e.printStackTrace();
}
}
public void desTask(String uid, BigDecimal price) {
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("score", price.intValue() + "");
params.add("content", "购买商品:");
params.add("uid", uid);
String resultData = HttpUtil.post(stoneUrl + "/user/logs/de2111", params, header);
} catch (Exception e) {
log.error("添加积分失败,e:{}", e);
e.printStackTrace();
public void integral(String uid, BigDecimal price, String content, int type) {
if (price.intValue() > 0) {
GoblinQueueBizIntegralDto goblinQueueBizIntegralDto = GoblinQueueBizIntegralDto.getNew();
goblinQueueBizIntegralDto.setUid(uid);
goblinQueueBizIntegralDto.setScore(price);
goblinQueueBizIntegralDto.setContent(content);
goblinQueueBizIntegralDto.setType(type);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.BIZ_INTEGRAL.getKey(), goblinQueueBizIntegralDto.toJson());
}
}
......
......@@ -152,21 +152,6 @@ public class OrderUtils {
return surplusGeneral;
}
public void doTask(String uid, String title, BigDecimal price) {
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("score", price.intValue() + "");
params.add("content", "购买演出:" + title);
params.add("uid", uid);
String resultData = HttpUtil.post(stoneUrl + "/user/logs/in2111", params, header);
} catch (Exception e) {
log.error("添加积分失败,e:{}", e);
e.printStackTrace();
}
}
public AdamRscPolymer01Vo adamAddressEnterMember(String uid, String enterIds, String addressId) {
try {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
......
......@@ -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:
......
......@@ -3,21 +3,22 @@ package com.liquidnet.service.platform.service.refund;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.base.Joiner;
import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.service.base.UserPathDto;
import com.liquidnet.service.candy.param.BackCouponParam;
import com.liquidnet.service.feign.stone.api.FeignStoneIntegralClient;
import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
import com.liquidnet.service.kylin.dto.param.RefundCallbackParam;
import com.liquidnet.service.kylin.dto.param.ticketSystem.STRefundOrderParam;
import com.liquidnet.service.kylin.dto.vo.mongo.*;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo;
import com.liquidnet.service.kylin.dto.vo.ticketSystem.RefundOrderVo;
import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.platform.service.ticketSystem.ITicketSystemService;
import com.liquidnet.service.platform.utils.DataUtils;
import com.liquidnet.service.platform.utils.GoblinRedisUtils;
import com.liquidnet.service.platform.utils.MongoVoUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.client.result.UpdateResult;
......@@ -30,7 +31,6 @@ import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -82,10 +82,7 @@ public class KylinRefundsStatusServiceImpl {
private MongoVoUtils mongoVoUtils;
@Autowired
private FeignStoneIntegralClient feignStoneIntegralClient;
@Autowired
private ITicketSystemService ticketSystemService;
private GoblinRedisUtils goblinRedisUtils;
@Value("${liquidnet.service.candy.url}")
private String candyUrl;
......@@ -311,12 +308,7 @@ public class KylinRefundsStatusServiceImpl {
}*/
}
// 退积分
try {
ResponseDto<String> de2111 = feignStoneIntegralClient.de2111(orderInfo.getUserId(), refundCallbackParam.getRefundPrice().setScale(0, BigDecimal.ROUND_DOWN).intValue(), "演出订单退款:".concat(orderInfo.getPerformanceTitle()).concat(":").concat(orderInfo.getOrderCode().substring(orderInfo.getOrderCode().length() - 10)));
log.info("订单退款回调退积分结果:[getCode={}, getData={}]", de2111.getCode(), de2111.getData());
} catch (Exception e) {
log.error("订单退款回调退积分异常:[refundId={}, errorMsg={}, e={}]", refundInfo.getRefundId(), e.getMessage(), e);
}
goblinRedisUtils.integral(orderInfo.getUserId(), refundCallbackParam.getRefundPrice(), "演出订单退款:".concat(orderInfo.getPerformanceTitle()).concat(":").concat(orderInfo.getOrderCode().substring(orderInfo.getOrderCode().length() - 10)), 2);
}
return true;
......
......@@ -5,7 +5,9 @@ import com.liquidnet.common.cache.redis.util.AbstractRedisUtil;
import com.liquidnet.common.cache.redis.util.RedisDataSourceUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import com.liquidnet.service.goblin.dto.GoblinQueueBizIntegralDto;
import com.liquidnet.service.goblin.dto.GoblinStoreMarketDto;
import com.liquidnet.service.goblin.dto.vo.GoblinOrderSkuVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreOrderVo;
......@@ -14,12 +16,16 @@ import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.List;
@Component
public class GoblinRedisUtils {
@Autowired
private RedisDataSourceUtil redisDataSourceUtil;
@Autowired
QueueUtils queueUtils;
public int randomMax = 10;
private AbstractRedisUtil getRedis() {
......@@ -164,6 +170,17 @@ public class GoblinRedisUtils {
}
}
public void integral(String uid, BigDecimal price, String content, int type) {
if (price.intValue() > 0) {
GoblinQueueBizIntegralDto goblinQueueBizIntegralDto = GoblinQueueBizIntegralDto.getNew();
goblinQueueBizIntegralDto.setUid(uid);
goblinQueueBizIntegralDto.setScore(price);
goblinQueueBizIntegralDto.setContent(content);
goblinQueueBizIntegralDto.setType(type);
queueUtils.sendMsgByGoblinRedis(MQConst.GoblinQueue.BIZ_INTEGRAL.getKey(), goblinQueueBizIntegralDto.toJson());
}
}
/* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */
/* ---------------------------------------- ---------------------------------------- */
......
......@@ -9,8 +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:
......
......@@ -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:
......
# begin-dev-这里是配置信息基本值
liquidnet:
cloudConfig:
profile: k8s-test
security:
username: user
password: user123
eureka:
#host: 192.168.216.81:7001
instance:
prefer-ip-address: true
host: eureka-test-0.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-1.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-2.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka
# end-dev-这里是配置信息基本值
spring:
profiles:
include: service-stone
......@@ -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://101.200.131.124: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,13 +10,15 @@ liquidnet:
logfile:
path: /data/logs
name: support-config
max-history: 7
level: debug
eureka:
host: 127.0.0.1:7001
rabbitmq:
host: 127.0.0.1
port: 5672
username: admin
password: admin
# rabbitmq:
# host: 127.0.0.1
# port: 5672
# username: admin
# password: admin
config:
# location: /Users/hujiachen/IdeaProjects/liquidnet-bus-v1/liquidnet-bus-config/liquidnet-config
location: /app/support-config
......
......@@ -10,13 +10,15 @@ liquidnet:
logfile:
path: /data/logs
name: support-config
max-history: 7
level: error
eureka:
host: 172.17.207.189:7001
rabbitmq:
host: 127.0.0.1
port: 5672
username: admin
password: admin
# rabbitmq:
# host: 127.0.0.1
# port: 5672
# username: admin
# password: admin
config:
location: /data/config/support-config
# end-prod-这里是配置信息基本值
......
......@@ -156,15 +156,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{96}:%line] - %msg%n'
console: '%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{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: info
com.liquidnet.service.feign: error
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
eureka:
client:
......
......@@ -10,6 +10,8 @@ liquidnet:
logfile:
path: /data/logs
name: support-config
max-history: 7
level: info
eureka:
host: 172.17.207.177:7001
#instance:
......@@ -17,11 +19,11 @@ liquidnet:
#host: eureka-test-0.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-1.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-2.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka
rabbitmq:
host: 127.0.0.1
port: 5672
username: admin
password: admin
# rabbitmq:
# host: 127.0.0.1
# port: 5672
# username: admin
# password: admin
config:
location: /data/config/support-config
# end-test-这里是配置信息基本值
......
liquidnet:
logfile:
path: /Users/anjiabin/data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
......@@ -23,7 +13,7 @@ spring:
eureka:
instance:
hostname: 127.0.0.1
hostname: 172.17.192.42
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
......@@ -46,13 +36,15 @@ eureka:
logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name: /data/logs/support-eureka.log
max-size: 200MB
max-history: 7
pattern:
file: '%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] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
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: /data/logs/support-eureka-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
com.liquidnet: debug
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
context-path: /eureka-server
spring:
application:
name: liquidnet-support-eureka
security:
user:
name: user
password: user123
eureka:
instance:
hostname: 127.0.0.1
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
home-page-url: http://localhost:${server.port}${server.servlet.context-path}
metadata-map:
configPath: ${server.servlet.context-path}
management.context-path: ${server.servlet.context-path}
server:
enable-self-preservation: false # 设为false,关闭自我保护 #自我保护设置 解决Eureka Server不踢出已关停的节点的问题,同时客户端也需要配置
eviction-interval-timer-in-ms: 4000 # 清理间隔(单位毫秒,默认是60*1000)
client:
register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息
serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@eureka-test-0.eureka-test-svc.zhengzai-test:7001${server.servlet.context-path}/eureka
# instance:
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
logging:
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{96}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
......@@ -23,7 +13,7 @@ spring:
eureka:
instance:
hostname: 172.17.207.189
hostname: 172.17.207.177
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
......@@ -35,10 +25,10 @@ eureka:
enable-self-preservation: false # 设为false,关闭自我保护 #自我保护设置 解决Eureka Server不踢出已关停的节点的问题,同时客户端也需要配置
eviction-interval-timer-in-ms: 4000 # 清理间隔(单位毫秒,默认是60*1000)
client:
register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息
register-with-eureka: false #禁止自己当做服务注册
fetch-registry: false #屏蔽注册信息
serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@172.17.207.189:7001${server.servlet.context-path}/eureka
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@${eureka.instance.hostname}:${server.port}${server.servlet.context-path}/eureka
# instance:
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
......@@ -46,13 +36,15 @@ eureka:
logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name: /data/logs/support-eureka.log
max-size: 200MB
max-history: 7
pattern:
file: '%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] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
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: /data/logs/support-eureka-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
\ No newline at end of file
com.liquidnet: error
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
context-path: /eureka-server
spring:
application:
name: liquidnet-support-eureka
security:
user:
name: user
password: user123
eureka:
instance:
hostname: 172.17.207.177
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
home-page-url: http://localhost:${server.port}${server.servlet.context-path}
metadata-map:
configPath: ${server.servlet.context-path}
management.context-path: ${server.servlet.context-path}
server:
enable-self-preservation: false # 设为false,关闭自我保护 #自我保护设置 解决Eureka Server不踢出已关停的节点的问题,同时客户端也需要配置
eviction-interval-timer-in-ms: 4000 # 清理间隔(单位毫秒,默认是60*1000)
client:
register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息
serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@172.17.121.157:7001${server.servlet.context-path}/eureka,http://${spring.security.user.name}:${spring.security.user.password}@172.17.121.158:7001${server.servlet.context-path}/eureka
# instance:
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
logging:
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{96}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
\ No newline at end of file
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
context-path: /eureka-server
spring:
application:
name: liquidnet-support-eureka
security:
user:
name: user
password: user123
eureka:
instance:
hostname: 172.17.121.157
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
home-page-url: http://localhost:${server.port}${server.servlet.context-path}
metadata-map:
configPath: ${server.servlet.context-path}
management.context-path: ${server.servlet.context-path}
server:
enable-self-preservation: false # 设为false,关闭自我保护 #自我保护设置 解决Eureka Server不踢出已关停的节点的问题,同时客户端也需要配置
eviction-interval-timer-in-ms: 4000 # 清理间隔(单位毫秒,默认是60*1000)
client:
register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息
serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@172.17.207.177:7001${server.servlet.context-path}/eureka,http://${spring.security.user.name}:${spring.security.user.password}@172.17.121.158:7001${server.servlet.context-path}/eureka
# instance:
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
logging:
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{96}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
\ No newline at end of file
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
context-path: /eureka-server
spring:
application:
name: liquidnet-support-eureka
security:
user:
name: user
password: user123
eureka:
instance:
hostname: 172.17.121.158
preferIpAddress: true
health-check-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/health
status-page-url: http://localhost:${server.port}${server.servlet.context-path}/actuator/info
home-page-url: http://localhost:${server.port}${server.servlet.context-path}
metadata-map:
configPath: ${server.servlet.context-path}
management.context-path: ${server.servlet.context-path}
server:
enable-self-preservation: false # 设为false,关闭自我保护 #自我保护设置 解决Eureka Server不踢出已关停的节点的问题,同时客户端也需要配置
eviction-interval-timer-in-ms: 4000 # 清理间隔(单位毫秒,默认是60*1000)
client:
register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息
serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@172.17.207.177:7001${server.servlet.context-path}/eureka,http://${spring.security.user.name}:${spring.security.user.password}@172.17.121.157:7001${server.servlet.context-path}/eureka
# instance:
# prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port}
# hostname: localhost
logging:
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{96}:%line] - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: info
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
\ No newline at end of file
liquidnet:
logfile:
path: /data/logs
name: support-eureka
file-max-size: 200MB
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
server:
port: 7001
servlet:
......@@ -46,13 +36,15 @@ eureka:
logging:
file:
name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
# name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
name: /data/logs/support-eureka.log
max-size: 200MB
max-history: 7
pattern:
file: '%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] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
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: /data/logs/support-eureka-%d{yyyy-MM-dd}.%i.log
level:
root: info
root: error
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
com.liquidnet: info
......@@ -6,7 +6,7 @@ liquidnet:
username: user
password: user123
eureka:
host: 127.0.0.1:7001
host: 39.107.71.112:7001
# end-dev-这里是配置信息基本值
spring:
......
......@@ -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:
......
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