Merge branch 'master' into feat/app_index_feat_0324
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
package com.xiang.app;
|
||||||
|
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class HealthController {
|
||||||
|
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String env;
|
||||||
|
|
||||||
|
@GetMapping("/actuator/health")
|
||||||
|
public Map<String, String> checkHealth() {
|
||||||
|
Map<String, String> map = Maps.newHashMap();
|
||||||
|
map.put("env", env);
|
||||||
|
map.put("status", "UP");
|
||||||
|
log.info("cornucopia application health check success! listening in env:{}, now:{}", env, System.currentTimeMillis());
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,7 +49,10 @@ public class JtVenueSubscribeTask {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<VenueInfoDO> venueInfoDOS = venueService.queryTomorrowCanBuyVenue();
|
List<VenueInfoDO> venueInfoDOS = venueService.queryTomorrowCanBuyVenue();
|
||||||
Map<String, List<VenueInfoDO>> venueInfoMap = venueInfoDOS.stream().filter(VenueInfoUtils::get8210VenueInfo).collect(Collectors.groupingByConcurrent(VenueInfoDO::getPlaceName));
|
Map<String, List<VenueInfoDO>> venueInfoMap = venueInfoDOS.stream()
|
||||||
|
.filter(VenueInfoUtils::get8210VenueInfo)
|
||||||
|
.filter(item -> !StringUtils.contains(item.getPlaceName(), "小馆"))
|
||||||
|
.collect(Collectors.groupingByConcurrent(VenueInfoDO::getPlaceName));
|
||||||
if (MapUtils.isEmpty(venueInfoMap)) {
|
if (MapUtils.isEmpty(venueInfoMap)) {
|
||||||
log.info("暂无可下单场地,time:{}", System.currentTimeMillis());
|
log.info("暂无可下单场地,time:{}", System.currentTimeMillis());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
group: DEFAULT_GROUP
|
group: DEFAULT_GROUP
|
||||||
namespace: 00131110-3ecb-4a35-8bbb-624edde1d937
|
namespace: 00131110-3ecb-4a35-8bbb-624edde1d937
|
||||||
server-addr: general.xiangtech.xyz:8848
|
server-addr: http://192.168.1.10:8848
|
||||||
|
|
||||||
|
# 是否启用健康检查
|
||||||
|
register-enabled: true
|
||||||
username: nacos
|
username: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
datasource:
|
datasource:
|
||||||
47
xservice-server/src/main/resources/application-outside.yml
Normal file
47
xservice-server/src/main/resources/application-outside.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
group: DEFAULT_GROUP
|
||||||
|
namespace: 00131110-3ecb-4a35-8bbb-624edde1d937
|
||||||
|
server-addr: http://general.xiangtech.xyz:8848
|
||||||
|
# 是否启用健康检查
|
||||||
|
register-enabled: false
|
||||||
|
username: nacos
|
||||||
|
password: nacos
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
primary: master
|
||||||
|
datasource:
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://120.27.153.87:3306/xservice_cornucopia?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||||
|
username: cornucopia
|
||||||
|
password: cornucopia@123
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
sshConnect: false
|
||||||
|
redis:
|
||||||
|
host: r-bp1wt59a6nfyt4e3ltpd.redis.rds.aliyuncs.com
|
||||||
|
port: 6379
|
||||||
|
password: Xiang0000 # 如果无密码可以省略
|
||||||
|
database: 10
|
||||||
|
timeout: 5000
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
max-active: 8
|
||||||
|
max-idle: 8
|
||||||
|
min-idle: 0
|
||||||
|
max-wait: 1000
|
||||||
|
xxz-job:
|
||||||
|
app-name: xservice-cornucopia
|
||||||
|
admin-address: http://192.168.1.10:10001
|
||||||
|
namespace: 1
|
||||||
|
|
||||||
|
dingtalk:
|
||||||
|
robot:
|
||||||
|
properties:
|
||||||
|
venue:
|
||||||
|
name: 江南体育中心通知群
|
||||||
|
token: 6a218646972c684c75832b0229ea93a234778af537d7469ce96bef290faf530e
|
||||||
|
secret: SEC9018755ba86d3e5c1ed2fbfa1d6953d84bb2a6c8ebe7ed4e318457bfed5e0465
|
||||||
|
users:
|
||||||
|
- 450841600726084717
|
||||||
@@ -4,7 +4,9 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
group: DEFAULT_GROUP
|
group: DEFAULT_GROUP
|
||||||
namespace: 6f603892-e9f7-4ca4-acbc-538fa09ebec0
|
namespace: 6f603892-e9f7-4ca4-acbc-538fa09ebec0
|
||||||
server-addr: general.xiangtech.xyz:8848
|
server-addr: http://192.168.32.3:8848
|
||||||
|
# 是否启用健康检查
|
||||||
|
register-enabled: true
|
||||||
username: nacos
|
username: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
datasource:
|
datasource:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: test
|
active: local
|
||||||
application:
|
application:
|
||||||
name: xservice-cornucopia
|
name: xservice-cornucopia
|
||||||
main:
|
main:
|
||||||
|
|||||||
Reference in New Issue
Block a user