瀏覽代碼

修改配置文件

master
wanghaoran 2 年之前
父節點
當前提交
deb94b3742
共有 5 個檔案被更改,包括 63 行新增39 行删除
  1. +32
    -32
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/TenantServiceImpl.java
  2. +8
    -2
      tuoheng-admin/src/main/resources/application-dev.yml
  3. +7
    -1
      tuoheng-admin/src/main/resources/application-local.yml
  4. +8
    -2
      tuoheng-admin/src/main/resources/application-prod.yml
  5. +8
    -2
      tuoheng-admin/src/main/resources/application-test.yml

+ 32
- 32
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/TenantServiceImpl.java 查看文件

@@ -117,10 +117,10 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
accountMap.put("type", "1");

// 调用网络请求处理租户账号信息
String result = handleTenantAccount(accountMap);
if (!result.equals("SUCCESS")) {
return JsonResult.error(result);
}
// String result = handleTenantAccount(accountMap);
// if (!result.equals("SUCCESS")) {
// return JsonResult.error(result);
// }
return JsonResult.success();
}

@@ -178,35 +178,35 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
accountMap.put("type", "2");

// 调用网络请求处理租户账号信息
String result = handleTenantAccount(accountMap);
if (!result.equals("SUCCESS")) {
return JsonResult.error(result);
}
// String result = handleTenantAccount(accountMap);
// if (!result.equals("SUCCESS")) {
// return JsonResult.error(result);
// }
return JsonResult.success();
}

/**
* 处理租户账号
*
* @param accountMap 账号信息
* @return
*/
private String handleTenantAccount(Map<String, String> accountMap) {
// 参数转换
JSONObject jsonParam = new JSONObject();
CommonUtils.toJsonObject(accountMap, jsonParam);
JSONObject jsonObject = null;
// 结果
String result = "";
try {
// 调用远程API接口
String data = HttpUtils.send("https://hhz.t-aaron.com/api/tenant/account", jsonParam, "UTF-8");
jsonObject = JSONObject.parseObject(data);
// 结果值
result = jsonObject.getString("result");
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
// /**
// * 处理租户账号
// *
// * @param accountMap 账号信息
// * @return
// */
// private String handleTenantAccount(Map<String, String> accountMap) {
// // 参数转换
// JSONObject jsonParam = new JSONObject();
// CommonUtils.toJsonObject(accountMap, jsonParam);
// JSONObject jsonObject = null;
// // 结果
// String result = "";
// try {
// // 调用远程API接口
// String data = HttpUtils.send("https://hhz.t-aaron.com/api/tenant/account", jsonParam, "UTF-8");
// jsonObject = JSONObject.parseObject(data);
// // 结果值
// result = jsonObject.getString("result");
// } catch (IOException e) {
// e.printStackTrace();
// }
// return result;
// }
}

+ 8
- 2
tuoheng-admin/src/main/resources/application-dev.yml 查看文件

@@ -8,7 +8,13 @@ server:
# 自定义配置
tuoheng:
# 图片域名
image-url: http://images.5gbox.yunhengwang.net/
image-url: https://image.t-aaron.com/
#阿里云
aliyuncsVod:
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4
accessKeySecret: yPPCyfsqWgrTuoz5H4sisY0COclx8E
roleArn: acs:ram::1399733914954856:role/ramosstest
bucketName: ta-tech-image

spring:
# 配置数据源
@@ -17,7 +23,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
# 填写你数据库的url、登录名、密码和数据库名
url: jdbc:mysql://192.168.11.13:3306/tuoheng_hhz_tenant?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
url: jdbc:mysql://192.168.11.13:3306/tuoheng_hhz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
username: root
password: idontcare
druid:

+ 7
- 1
tuoheng-admin/src/main/resources/application-local.yml 查看文件

@@ -9,6 +9,12 @@ server:
tuoheng:
# 图片域名
image-url: http://localhost:9057/api/
#阿里云
aliyuncsVod:
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4
accessKeySecret: yPPCyfsqWgrTuoz5H4sisY0COclx8E
roleArn: acs:ram::1399733914954856:role/ramosstest
bucketName: ta-tech-image

spring:
# 配置数据源
@@ -17,7 +23,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
# 填写你数据库的url、登录名、密码和数据库名
url: jdbc:mysql://127.0.0.1:3306/tuoheng_hhz_tenant?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
url: jdbc:mysql://127.0.0.1:3306/tuoheng_hhz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
username: root
password:
druid:

+ 8
- 2
tuoheng-admin/src/main/resources/application-prod.yml 查看文件

@@ -8,7 +8,13 @@ server:
# 自定义配置
tuoheng:
# 图片域名
image-url: http://images.5gbox.taauav.com/
image-url: https://image.t-aaron.com/
#阿里云
aliyuncsVod:
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4
accessKeySecret: yPPCyfsqWgrTuoz5H4sisY0COclx8E
roleArn: acs:ram::1399733914954856:role/ramosstest
bucketName: ta-tech-image

spring:
# 配置数据源
@@ -17,7 +23,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
# 填写你数据库的url、登录名、密码和数据库名
url: jdbc:mysql://rm-uf6x76i111rb1eo48.mysql.rds.aliyuncs.com:3306/tuoheng_hhz_tenant?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
url: jdbc:mysql://rm-uf6x76i111rb1eo48.mysql.rds.aliyuncs.com:3306/tuoheng_hhz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
username: root
password: TH22#2022
druid:

+ 8
- 2
tuoheng-admin/src/main/resources/application-test.yml 查看文件

@@ -8,7 +8,13 @@ server:
# 自定义配置
tuoheng:
# 图片域名
image-url: http://images.5gbox.yunhengzhizao.cn/
image-url: https://image.t-aaron.com/
#阿里云
aliyuncsVod:
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4
accessKeySecret: yPPCyfsqWgrTuoz5H4sisY0COclx8E
roleArn: acs:ram::1399733914954856:role/ramosstest
bucketName: ta-tech-image

spring:
# 配置数据源
@@ -17,7 +23,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
# 填写你数据库的url、登录名、密码和数据库名
url: jdbc:mysql://192.168.11.242:3306/tuoheng_hhz_tenant?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
url: jdbc:mysql://192.168.11.242:3306/tuoheng_hhz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
username: root
password: idontcare
druid:

Loading…
取消
儲存