master
liuqingkun 3 years ago
parent f645195dab
commit d94a57db58
  1. 124
      src/main/java/org/springblade/common/constant/LauncherConstant.java
  2. 2
      src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  3. 2
      src/main/java/org/springblade/modules/business/controller/ApmRecordController.java
  4. 2
      src/main/java/org/springblade/modules/business/service/impl/ApmConfigServiceImpl.java
  5. 14
      src/main/resources/application-dev.yml
  6. 3
      src/main/resources/application.yml
  7. BIN
      src/main/resources/static/images/icon.png

@ -24,70 +24,70 @@ import org.springblade.core.launch.constant.AppConstant;
* @author Chill
*/
public interface LauncherConstant {
//
// /**
// * sentinel dev 地址
// */
// String SENTINEL_DEV_ADDR = "127.0.0.1:8858";
//
// /**
// * sentinel prod 地址
// */
// String SENTINEL_PROD_ADDR = "10.211.55.5:8858";
//
// /**
// * sentinel test 地址
// */
// String SENTINEL_TEST_ADDR = "172.30.0.58:8858";
//
// /**
// * elk dev 地址
// */
// String ELK_DEV_ADDR = "127.0.0.1:9000";
//
// /**
// * elk prod 地址
// */
// String ELK_PROD_ADDR = "172.30.0.58:9000";
//
// /**
// * elk test 地址
// */
// String ELK_TEST_ADDR = "172.30.0.58:9000";
/**
* sentinel dev 地址
*/
String SENTINEL_DEV_ADDR = "127.0.0.1:8858";
// /**
// * 动态获取sentinel地址
// *
// * @param profile 环境变量
// * @return addr
// */
// static String sentinelAddr(String profile) {
// switch (profile) {
// case (AppConstant.PROD_CODE):
// return SENTINEL_PROD_ADDR;
// case (AppConstant.TEST_CODE):
// return SENTINEL_TEST_ADDR;
// default:
// return SENTINEL_DEV_ADDR;
// }
// }
/**
* sentinel prod 地址
*/
String SENTINEL_PROD_ADDR = "10.211.55.5:8858";
/**
* sentinel test 地址
*/
String SENTINEL_TEST_ADDR = "172.30.0.58:8858";
/**
* elk dev 地址
*/
String ELK_DEV_ADDR = "127.0.0.1:9000";
/**
* elk prod 地址
*/
String ELK_PROD_ADDR = "172.30.0.58:9000";
/**
* elk test 地址
*/
String ELK_TEST_ADDR = "172.30.0.58:9000";
/**
* 动态获取sentinel地址
*
* @param profile 环境变量
* @return addr
*/
static String sentinelAddr(String profile) {
switch (profile) {
case (AppConstant.PROD_CODE):
return SENTINEL_PROD_ADDR;
case (AppConstant.TEST_CODE):
return SENTINEL_TEST_ADDR;
default:
return SENTINEL_DEV_ADDR;
}
}
/**
* 动态获取elk地址
*
* @param profile 环境变量
* @return addr
*/
static String elkAddr(String profile) {
switch (profile) {
case (AppConstant.PROD_CODE):
return ELK_PROD_ADDR;
case (AppConstant.TEST_CODE):
return ELK_TEST_ADDR;
default:
return ELK_DEV_ADDR;
}
}
// /**
// * 动态获取elk地址
// *
// * @param profile 环境变量
// * @return addr
// */
// static String elkAddr(String profile) {
// switch (profile) {
// case (AppConstant.PROD_CODE):
// return ELK_PROD_ADDR;
// case (AppConstant.TEST_CODE):
// return ELK_TEST_ADDR;
// default:
// return ELK_DEV_ADDR;
// }
// }
}

@ -35,7 +35,7 @@ public class LauncherServiceImpl implements LauncherService {
@Override
public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
Properties props = System.getProperties();
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
// PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "false");
// 开启elk日志
//PropsUtil.setProperty(props, "blade.log.elk.destination", LauncherConstant.elkAddr(profile));

@ -150,7 +150,7 @@ public class ApmRecordController extends BladeController {
@ApiOperation(value = "分页", notes = "分页")
public R<IPage<ApmRecordListVO>> selectPage(Query query, Long createDept, String startTime, String endTime, String cupCardNo, String project) {
BladeUser user = AuthUtil.getUser();
if (!BusinessConstant.ROLE_NAME_HOSPITAL.equals(user.getRoleName())) {
if (Func.isNotEmpty(user) && !BusinessConstant.ROLE_NAME_HOSPITAL.equals(user.getRoleName())) {
createDept = null;
}

@ -120,7 +120,7 @@ public class ApmConfigServiceImpl extends ServiceImpl<ApmConfigMapper, ApmConfig
@Override
public List<ApmConfigListVO> detailForApm(Long createDept, String apmDay, String cupCardNo) {
List<ApmConfig> allConfigList = baseMapper.selectList(Wrappers.<ApmConfig>lambdaQuery()
List<ApmConfig> allConfigList = baseMapper.selectList(Wrappers.<ApmConfig>lambdaQuery()
.eq(ApmConfig::getCreateDept, createDept)
.eq(ApmConfig::getApmDay, apmDay));
Map<String, List<ApmConfig>> configProjectMap = new HashMap<>();

@ -29,17 +29,3 @@ blade:
remote-mode: true
upload-domain: http://127.0.0.1:8999
remote-path: D:\WorkSoft\minio\data
#oss默认配置
oss:
enabled: false
name: minio
tenant-mode: false
endpoint: http://127.0.0.1:9000
access-key: admin
secret-key: 12345678
# access-key: minioadmin
# secret-key: minioadmin
# access-key: Ycu4QN8np3TrTJDd
# secret-key: WGwePhEBJE6ekD8Etv7tJh8GCDwZd7zp
bucket-name: hcu-cgs

@ -1,5 +1,7 @@
#服务器配置
server:
# 服务器host, 用于文件上传
host: 127.0.0.1
port: 80
undertow:
threads:
@ -12,6 +14,7 @@ server:
# 是否分配的直接内存
direct-buffers: true
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Loading…
Cancel
Save