|
|
@@ -100,6 +100,9 @@ public class RiskServiceImpl implements RiskService {
|
|
|
}
|
|
|
|
|
|
private void checkAppPermission(YtApp ytApp, String userId) {
|
|
|
+ if (ytApp != null && StrUtil.isEmpty(ytApp.getSuperiorId())) {
|
|
|
+ ytApp = appMapper.selectPrimary(ytApp.getAppId());
|
|
|
+ }
|
|
|
YtPlatformUserApp platformUserApp = ytApp == null ? null : agentAppMapper.selectByPrimaryKey(ytApp.getSuperiorId());
|
|
|
if (platformUserApp != null && StringUtils.equals(platformUserApp.getUserId(), userId)) {
|
|
|
return;
|
|
|
@@ -440,7 +443,6 @@ public class RiskServiceImpl implements RiskService {
|
|
|
if (CollUtil.isEmpty(param.getConfigList())) {
|
|
|
return Result.resultErr(RepMessage.COLLECTION_EMPTY);
|
|
|
}
|
|
|
- checkAppPermission(curUser, param.getAppId());
|
|
|
List<YtRiskConfig> configs = new ArrayList<>();
|
|
|
YtRiskConfig config;
|
|
|
StringBuilder content = new StringBuilder();
|
|
|
@@ -493,7 +495,13 @@ public class RiskServiceImpl implements RiskService {
|
|
|
if (Objects.isNull(old)) {
|
|
|
return Result.resultErr(RepMessage.OBJECT_NOT_EXIST);
|
|
|
}
|
|
|
- checkAppPermission(curUser, param.getAppId());
|
|
|
+ String appId = old.getAppId();
|
|
|
+ if (StrUtil.isEmpty(appId) && StrUtil.isNotEmpty(old.getTemplateCode())) {
|
|
|
+ appId = old.getTemplateCode().split("-")[0];
|
|
|
+ }
|
|
|
+ if (StrUtil.isNotEmpty(appId)) {
|
|
|
+ checkAppPermission(curUser, appId);
|
|
|
+ }
|
|
|
// 获取原有配置信息
|
|
|
List<YtRiskConfig> configs = riskMapper.selectRiskConfig(param.getTemplateId());
|
|
|
Map<String, String> valueMap = configs.stream().collect(Collectors.toMap(
|