Compare commits
9 Commits
master
...
83f083242e
Author | SHA1 | Date | |
---|---|---|---|
83f083242e | |||
708c96092b | |||
07e09ae405 | |||
b7fe71661b | |||
18c449a55c | |||
ea67975ce9 | |||
7b37a423d8 | |||
b8f9b63c14 | |||
8791d647ee |
@@ -116,7 +116,7 @@ public class RoomBoomLevelAwardAdminController {
|
|||||||
|
|
||||||
if (ObjectUtil.equal(RewardTypeEnum.DIAMOND.getType(), awardType)){
|
if (ObjectUtil.equal(RewardTypeEnum.DIAMOND.getType(), awardType)){
|
||||||
awardName = "coin";
|
awardName = "coin";
|
||||||
awardPic = "https://image.molistar.xyz/Molistarcoins.png";
|
awardPic = "https://cdn.moliparty.com/EPartycoins.png";
|
||||||
}
|
}
|
||||||
if (ObjectUtil.equal(RewardTypeEnum.GIFT.getType(), awardType)){
|
if (ObjectUtil.equal(RewardTypeEnum.GIFT.getType(), awardType)){
|
||||||
Gift gift = giftService.getEachGiftById(awardId.intValue());
|
Gift gift = giftService.getEachGiftById(awardId.intValue());
|
||||||
|
@@ -19,7 +19,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -42,7 +42,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -67,7 +67,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 172.19.16.15:8848
|
server-addr: 172.19.16.15:8848
|
||||||
namespace: 0c9bf047-19ca-4969-bf5d-bbc1f86b501a
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
|
@@ -19,7 +19,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -42,7 +42,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -66,7 +66,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 172.19.16.15:8848
|
server-addr: 172.19.16.15:8848
|
||||||
namespace: 0c9bf047-19ca-4969-bf5d-bbc1f86b501a
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
package com.accompany.common.constant;
|
package com.accompany.common.constant;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@@ -16,10 +18,12 @@ public enum AppEnum {
|
|||||||
Map.of(Pattern.compile("baishun.minigame.*"), "baishun.minigame.moliparty.com")),
|
Map.of(Pattern.compile("baishun.minigame.*"), "baishun.minigame.moliparty.com")),
|
||||||
molistar("molistar", "molistar google马甲包", "api.molistar.xyz", "image.molistar.xyz", "api.molistar.xyz", "molistar",
|
molistar("molistar", "molistar google马甲包", "api.molistar.xyz", "image.molistar.xyz", "api.molistar.xyz", "molistar",
|
||||||
Map.of(Pattern.compile("baishun.minigame.*"), "baishun.minigame.molistar.xyz")),
|
Map.of(Pattern.compile("baishun.minigame.*"), "baishun.minigame.molistar.xyz")),
|
||||||
|
moliparty("MoliParty", "moliparty google马甲包", "api.moliparty.com", "cdn.moliparty.com", "api.moliparty.com", "moliparty",
|
||||||
|
Map.of(Pattern.compile("baishun.minigame.*"), "baishun.minigame.moliparty.com")),
|
||||||
;
|
;
|
||||||
|
|
||||||
public static AppEnum getCurApp(){
|
public static AppEnum getCurApp(){
|
||||||
return AppEnum.molistar;
|
return AppEnum.moliparty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
@@ -74,4 +78,15 @@ public enum AppEnum {
|
|||||||
return patternMap;
|
return patternMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<AppEnum> getOtherAppEnums(AppEnum currentApp) {
|
||||||
|
List<AppEnum> otherApps = new ArrayList<>();
|
||||||
|
// 遍历所有枚举,排除传入的 app 对应的枚举
|
||||||
|
for (AppEnum app : AppEnum.values()) {
|
||||||
|
if (!app.equals(currentApp)) {
|
||||||
|
otherApps.add(app);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return otherApps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1894,9 +1894,9 @@ public class Constant {
|
|||||||
public static final Byte invalid = 0; //无效
|
public static final Byte invalid = 0; //无效
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String DEFAULT_DOMAIN = "https://img.molistar.xyz";
|
public static String DEFAULT_DOMAIN = "https://cdn.moliparty.com";
|
||||||
public static String DEFAULT_NICK = "Platform New User";
|
public static String DEFAULT_NICK = "Platform New User";
|
||||||
public static String DEFAULT_AVATAR = DEFAULT_DOMAIN + "/default_avatar_molistar.png";
|
public static String DEFAULT_AVATAR = DEFAULT_DOMAIN + "/useavater_MP.png";
|
||||||
public static String DEFAULT_CAR = DEFAULT_DOMAIN + "/default_car.png";
|
public static String DEFAULT_CAR = DEFAULT_DOMAIN + "/default_car.png";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1473,10 +1473,6 @@ public enum RedisKey {
|
|||||||
charge_user_x_detail,//嫌疑用户
|
charge_user_x_detail,//嫌疑用户
|
||||||
;
|
;
|
||||||
|
|
||||||
public String getKey() {
|
|
||||||
return ("molistar_" + name()).toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKey(String suffix) {
|
public String getKey(String suffix) {
|
||||||
if (StringUtils.isEmpty(suffix)) {
|
if (StringUtils.isEmpty(suffix)) {
|
||||||
return getKey();
|
return getKey();
|
||||||
@@ -1504,6 +1500,10 @@ public enum RedisKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return ("molistar_" + name()).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
public static String getCacheSign() {
|
public static String getCacheSign() {
|
||||||
return "molistar_";
|
return "molistar_";
|
||||||
}
|
}
|
||||||
|
@@ -3,14 +3,14 @@ package com.accompany.business.constant.family;
|
|||||||
public class FamilyConstant {
|
public class FamilyConstant {
|
||||||
|
|
||||||
public static class SkipUrl {
|
public static class SkipUrl {
|
||||||
public static final String MY_FAMILY_URL = "/molistar/modules/guildAr/index.html";
|
public static final String MY_FAMILY_URL = "/moliparty/modules/guildAr/index.html";
|
||||||
public static final String FAMILY_LIST_URL = "/molistar/modules/guildAr/guild.html";
|
public static final String FAMILY_LIST_URL = "/moliparty/modules/guildAr/guild.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DefaultInfo {
|
public static class DefaultInfo {
|
||||||
public static final String DEFAULT_NAME_SUFFIX_I18N_ID = "Family.defaultNameSuffix";
|
public static final String DEFAULT_NAME_SUFFIX_I18N_ID = "Family.defaultNameSuffix";
|
||||||
public static final String DEFAULT_NAME_SUFFIX = "的家族";
|
public static final String DEFAULT_NAME_SUFFIX = "的家族";
|
||||||
public static final String DEFAULT_BACKGROUND_URL = "https://image.molistar.xyz/family_default_background.png";
|
public static final String DEFAULT_BACKGROUND_URL = "https://cdn.moliparty.com/family_default_background.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class RoleType {
|
public static class RoleType {
|
||||||
|
@@ -5,16 +5,16 @@ import java.math.BigDecimal;
|
|||||||
public class GuildConstant {
|
public class GuildConstant {
|
||||||
|
|
||||||
public static class SkipUrl {
|
public static class SkipUrl {
|
||||||
public static final String MY_FAMILY_URL = "/molistar/modules/guild-ar/index.html";
|
public static final String MY_FAMILY_URL = "/moliparty/modules/guild-ar/index.html";
|
||||||
public static final String FAMILY_LIST_URL = "/molistar/modules/guild-ar/guild.html";
|
public static final String FAMILY_LIST_URL = "/moliparty/modules/guild-ar/guild.html";
|
||||||
public static final String BILL_RECORD_URL = "/molistar/modules/guild-ar/bill.html";
|
public static final String BILL_RECORD_URL = "/moliparty/modules/guild-ar/bill.html";
|
||||||
public static final String RECHARGE_USER_RECORD_URL = "/molistar/modules/guild-ar/record.html";
|
public static final String RECHARGE_USER_RECORD_URL = "/moliparty/modules/guild-ar/record.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DefaultInfo {
|
public static class DefaultInfo {
|
||||||
public static final String DEFAULT_NAME_SUFFIX_I18N_ID = "Family.defaultNameSuffix";
|
public static final String DEFAULT_NAME_SUFFIX_I18N_ID = "Family.defaultNameSuffix";
|
||||||
public static final String DEFAULT_NAME_SUFFIX = "的家族";
|
public static final String DEFAULT_NAME_SUFFIX = "的家族";
|
||||||
public static final String DEFAULT_BACKGROUND_URL = "https://image.molistar.xyz/family_default_background.png";
|
public static final String DEFAULT_BACKGROUND_URL = "https://cdn.moliparty.com/family_default_background.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class RoleType {
|
public static class RoleType {
|
||||||
|
@@ -5,7 +5,7 @@ import com.accompany.common.redis.BaseRedisKey;
|
|||||||
|
|
||||||
public interface UserEventConstant {
|
public interface UserEventConstant {
|
||||||
|
|
||||||
String H5_URL = "%s/molistar/modules/eventDetails/index.html?eventId=%s&lang=en";
|
String H5_URL = "%s/moliparty/modules/eventDetails/index.html?eventId=%s&lang=en";
|
||||||
|
|
||||||
interface EventStatus {
|
interface EventStatus {
|
||||||
byte IN_REVIEW = 0; //待审核
|
byte IN_REVIEW = 0; //待审核
|
||||||
|
@@ -60,7 +60,7 @@ public class AutoGenRobotService extends BaseService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysConfService sysConfService;
|
private SysConfService sysConfService;
|
||||||
|
|
||||||
private static final String DEFAULT_NICK = "Molistar";
|
private static final String DEFAULT_NICK = "Hello Nick";
|
||||||
|
|
||||||
public void batchGenRobAccount() throws Exception {
|
public void batchGenRobAccount() throws Exception {
|
||||||
AutoGenRobotExample AutoGenRobotExample = new AutoGenRobotExample();
|
AutoGenRobotExample AutoGenRobotExample = new AutoGenRobotExample();
|
||||||
|
@@ -324,7 +324,7 @@ public class ActivityH5LevelAwardServiceImpl extends ServiceImpl<ActivityH5Level
|
|||||||
break;
|
break;
|
||||||
case DIAMOND:
|
case DIAMOND:
|
||||||
i18nValue = I18NMessageSourceUtil.getMessage(GOLD_NAME, partitionId);
|
i18nValue = I18NMessageSourceUtil.getMessage(GOLD_NAME, partitionId);
|
||||||
vo.setPic("https://image.molistar.xyz/moli_coin_rechage.png");
|
vo.setPic("https://cdn.moliparty.com/moli_coin_rechage.png");
|
||||||
break;
|
break;
|
||||||
case GOLD:
|
case GOLD:
|
||||||
i18nValue = I18NMessageSourceUtil.getMessage(DIAMOND_NAME, partitionId);
|
i18nValue = I18NMessageSourceUtil.getMessage(DIAMOND_NAME, partitionId);
|
||||||
|
@@ -66,54 +66,59 @@ public class FaceJsonService extends BaseService {
|
|||||||
*/
|
*/
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public FaceJson getValidFaceJson(String appVersion) {
|
public FaceJson getValidFaceJson(String appVersion) {
|
||||||
boolean afterVipFaceVer = AppVersionUtil.compareVersion(appVersion, VIP_FACE_VERSION) >= 0;
|
|
||||||
String json = jedisService.get(RedisKey.face_json.getKey());
|
|
||||||
FaceJson faceJson;
|
FaceJson faceJson;
|
||||||
if (!BlankUtil.isBlank(json)) {
|
try {
|
||||||
faceJson = gson.fromJson(json, FaceJson.class);
|
boolean afterVipFaceVer = AppVersionUtil.compareVersion(appVersion, VIP_FACE_VERSION) >= 0;
|
||||||
} else {
|
String json = jedisService.get(RedisKey.face_json.getKey());
|
||||||
faceJson = getFaceJsonFromDB();
|
if (!BlankUtil.isBlank(json)) {
|
||||||
jedisService.set(RedisKey.face_json.getKey(), gson.toJson(faceJson));
|
faceJson = gson.fromJson(json, FaceJson.class);
|
||||||
}
|
} else {
|
||||||
/**
|
faceJson = getFaceJsonFromDB();
|
||||||
* 解密 -> 处理数据 -> 重新加密返回
|
jedisService.set(RedisKey.face_json.getKey(), gson.toJson(faceJson));
|
||||||
* 不知道为啥非要全部信息加密返回给客户端,真是折磨
|
}
|
||||||
*/
|
/**
|
||||||
String faceJsonString = DESUtils.DESAndBase64Decrypt(faceJson.getJson(), Constant.FaceJsonConfig.FACE_JSON_KEY);
|
* 解密 -> 处理数据 -> 重新加密返回
|
||||||
FaceJsonDetail faceJsonDetail = JSONObject.parseObject(faceJsonString, FaceJsonDetail.class);
|
* 不知道为啥非要全部信息加密返回给客户端,真是折磨
|
||||||
List<FaceInfo> faceList = faceJsonDetail.getFaces();
|
*/
|
||||||
for (FaceInfo faceInfo : faceList) {
|
String faceJsonString = DESUtils.DESAndBase64Decrypt(faceJson.getJson(), Constant.FaceJsonConfig.FACE_JSON_KEY);
|
||||||
faceInfo.setName(StrUtil.EMPTY);
|
FaceJsonDetail faceJsonDetail = JSONObject.parseObject(faceJsonString, FaceJsonDetail.class);
|
||||||
}
|
List<FaceInfo> faceList = faceJsonDetail.getFaces();
|
||||||
List<FaceInfo> normalFaceList = faceList.stream().filter(faceInfo ->
|
for (FaceInfo faceInfo : faceList) {
|
||||||
(faceInfo.getFaceKind() == null || Constant.FaceKind.NORMAL.equals(faceInfo.getFaceKind())))
|
faceInfo.setName(StrUtil.EMPTY);
|
||||||
.collect(Collectors.toList());
|
}
|
||||||
if (afterVipFaceVer) {
|
List<FaceInfo> normalFaceList = faceList.stream().filter(faceInfo ->
|
||||||
// 按照faceKind进行分组
|
(faceInfo.getFaceKind() == null || Constant.FaceKind.NORMAL.equals(faceInfo.getFaceKind())))
|
||||||
List<FaceInfo> vipFaceList = faceList.stream().filter(faceInfo -> Constant.FaceKind.VIP_FACE.equals(faceInfo.getFaceKind()))
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<FaceInfo> vipFaces = new ArrayList<>();
|
if (afterVipFaceVer) {
|
||||||
List<FaceInfo> finalVipFaces = vipFaces;
|
// 按照faceKind进行分组
|
||||||
vipFaceList.forEach(faceInfo -> {
|
List<FaceInfo> vipFaceList = faceList.stream().filter(faceInfo -> Constant.FaceKind.VIP_FACE.equals(faceInfo.getFaceKind()))
|
||||||
VipInfo vipInfo = vipAuthItemService.getVipInfoByTypeAndItemId(Constant.VipAuthType.FACE, faceInfo.getId().toString());
|
.collect(Collectors.toList());
|
||||||
if (null != vipInfo) {
|
List<FaceInfo> vipFaces = new ArrayList<>();
|
||||||
VipBaseInfoVO faceVipInfo = new VipBaseInfoVO();
|
List<FaceInfo> finalVipFaces = vipFaces;
|
||||||
faceVipInfo.setVipIcon(vipInfo.getVipIcon());
|
vipFaceList.forEach(faceInfo -> {
|
||||||
faceVipInfo.setVipLevel(vipInfo.getVipLevel());
|
VipInfo vipInfo = vipAuthItemService.getVipInfoByTypeAndItemId(Constant.VipAuthType.FACE, faceInfo.getId().toString());
|
||||||
faceVipInfo.setVipName(vipInfo.getVipName());
|
if (null != vipInfo) {
|
||||||
faceInfo.setFaceVipInfo(faceVipInfo);
|
VipBaseInfoVO faceVipInfo = new VipBaseInfoVO();
|
||||||
finalVipFaces.add(faceInfo);
|
faceVipInfo.setVipIcon(vipInfo.getVipIcon());
|
||||||
}
|
faceVipInfo.setVipLevel(vipInfo.getVipLevel());
|
||||||
});
|
faceVipInfo.setVipName(vipInfo.getVipName());
|
||||||
vipFaces = finalVipFaces.stream().sorted(Comparator.comparing(face -> face.getFaceVipInfo().getVipLevel())).collect(Collectors.toList());
|
faceInfo.setFaceVipInfo(faceVipInfo);
|
||||||
faceJsonDetail.setVipFaces(vipFaces);
|
finalVipFaces.add(faceInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
vipFaces = finalVipFaces.stream().sorted(Comparator.comparing(face -> face.getFaceVipInfo().getVipLevel())).collect(Collectors.toList());
|
||||||
|
faceJsonDetail.setVipFaces(vipFaces);
|
||||||
|
}
|
||||||
|
faceJsonDetail.setFaces(normalFaceList);
|
||||||
|
// 加密返回
|
||||||
|
String faceJsonDetailStr = JSONObject.toJSONString(faceJsonDetail);
|
||||||
|
String encryptStr = DESUtils.DESAndBase64Encrypt(faceJsonDetailStr, Constant.FaceJsonConfig.FACE_JSON_KEY);
|
||||||
|
faceJson.setJson(encryptStr);
|
||||||
|
return faceJson;
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("FaceJsonService.getValidFaceJson(java.lang.String)", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
faceJsonDetail.setFaces(normalFaceList);
|
return null;
|
||||||
// 加密返回
|
|
||||||
String faceJsonDetailStr = JSONObject.toJSONString(faceJsonDetail);
|
|
||||||
String encryptStr = DESUtils.DESAndBase64Encrypt(faceJsonDetailStr, Constant.FaceJsonConfig.FACE_JSON_KEY);
|
|
||||||
faceJson.setJson(encryptStr);
|
|
||||||
return faceJson;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class QrCodeUtil {
|
public class QrCodeUtil {
|
||||||
|
|
||||||
private static final String LOGO_FILE = "molistar.png";
|
private static final String LOGO_FILE = "MoliParty.png";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成二维码
|
* 生成二维码
|
||||||
|
@@ -0,0 +1,51 @@
|
|||||||
|
package com.accompany.business.interceptor;
|
||||||
|
|
||||||
|
import com.accompany.common.constant.AppEnum;
|
||||||
|
import org.springframework.core.Ordered;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.util.ContentCachingResponseWrapper;
|
||||||
|
|
||||||
|
import javax.servlet.*;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
|
public class CustomResponseFilter implements Filter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
|
throws IOException, ServletException {
|
||||||
|
ContentCachingResponseWrapper responseWrapper = new ContentCachingResponseWrapper((HttpServletResponse) response);
|
||||||
|
chain.doFilter(request, responseWrapper);
|
||||||
|
|
||||||
|
byte[] responseArray = responseWrapper.getContentAsByteArray();
|
||||||
|
String responseStr = new String(responseArray, "UTF-8");
|
||||||
|
|
||||||
|
// 在这里处理响应内容
|
||||||
|
String modifiedResponse = modifyResponse(responseStr);
|
||||||
|
|
||||||
|
response.getOutputStream().write(modifiedResponse.getBytes());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String modifyResponse(String original) {
|
||||||
|
AppEnum curApp = AppEnum.getCurApp();
|
||||||
|
String apiDomain = curApp.getApiDomain();
|
||||||
|
String resourceDomain = curApp.getResourceDomain();
|
||||||
|
|
||||||
|
List<AppEnum> otherTwoAppEnums = AppEnum.getOtherAppEnums(curApp);
|
||||||
|
for (AppEnum otherApp : otherTwoAppEnums) {
|
||||||
|
String diffResourceDomain = otherApp.getResourceDomain();
|
||||||
|
String diffApiDomain = otherApp.getApiDomain();
|
||||||
|
if (original.contains(diffResourceDomain)) {
|
||||||
|
original = original.replaceAll(diffResourceDomain, resourceDomain);
|
||||||
|
}
|
||||||
|
if (original.contains(diffApiDomain)) {
|
||||||
|
original = original.replaceAll(diffApiDomain, apiDomain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
}
|
@@ -19,7 +19,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -42,7 +42,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -66,7 +66,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 172.19.16.15:8848
|
server-addr: 172.19.16.15:8848
|
||||||
namespace: 0c9bf047-19ca-4969-bf5d-bbc1f86b501a
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
|
@@ -19,7 +19,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -42,7 +42,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -66,7 +66,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 172.19.16.15:8848
|
server-addr: 172.19.16.15:8848
|
||||||
namespace: 0c9bf047-19ca-4969-bf5d-bbc1f86b501a
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
|
@@ -16,7 +16,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -39,7 +39,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 124.156.164.187:8848
|
server-addr: 124.156.164.187:8848
|
||||||
namespace: 5edc3246-3e69-4be5-a32a-273f0a09ddf6
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
@@ -63,7 +63,7 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
server-addr: 172.19.16.15:8848
|
server-addr: 172.19.16.15:8848
|
||||||
namespace: 0c9bf047-19ca-4969-bf5d-bbc1f86b501a
|
namespace: aeb633ac-d6eb-4d3e-b40d-80b5458064b0
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: application.yml
|
- data-id: application.yml
|
||||||
|
Reference in New Issue
Block a user