|
|
@@ -36,9 +36,10 @@ public class TenantExceptionInformStrategyServiceImpl extends ServiceImpl<Tenant
|
|
|
public SingleResponse<TenantExceptionInformStrategyCO> getTenantInformStrategy(String tenant) {
|
|
|
TenantExceptionInformStrategyDO informStrategyDO = this.getById(tenant);
|
|
|
if (informStrategyDO == null) {
|
|
|
- return SingleResponse.of(getDefaultStrategy(tenant));
|
|
|
+ TenantExceptionInformStrategyCO defaultStrategy = getDefaultStrategy(tenant);
|
|
|
+ return SingleResponse.of(removeUnUseStrategy(defaultStrategy));
|
|
|
}
|
|
|
- return SingleResponse.of(changeToInformStrategyCo(informStrategyDO));
|
|
|
+ return SingleResponse.of(removeUnUseStrategy(changeToInformStrategyCo(informStrategyDO)));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -106,4 +107,13 @@ public class TenantExceptionInformStrategyServiceImpl extends ServiceImpl<Tenant
|
|
|
return informStrategyCo;
|
|
|
}
|
|
|
|
|
|
+ private TenantExceptionInformStrategyCO removeUnUseStrategy(TenantExceptionInformStrategyCO strategyCO) {
|
|
|
+ strategyCO.getStrategy().remove(TenantExceptionInformStrategyCO.TENANT_LEVEL_KEY);
|
|
|
+ strategyCO.getStrategy().remove(TenantExceptionInformStrategyCO.DEPARTMENT_LEVEL);
|
|
|
+ // single method
|
|
|
+ strategyCO.getStrategy().remove(TenantExceptionInformStrategyCO.SINGLE_NOTE);
|
|
|
+ strategyCO.getStrategy().remove(TenantExceptionInformStrategyCO.SINGLE_EMAIL);
|
|
|
+ return strategyCO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|