[8.5.0]
[新加坡类型添加]
This commit is contained in:
@@ -168,7 +168,8 @@ enum class ProjectType {
|
||||
dali,
|
||||
mogo,
|
||||
saas,
|
||||
yantai
|
||||
yantai,
|
||||
singapore,
|
||||
}
|
||||
|
||||
enum class EnvType {
|
||||
|
||||
@@ -35,6 +35,7 @@ object FlavorUtils {
|
||||
Project.DALI -> info.append("dali")
|
||||
Project.MOGO -> info.append("mogo")
|
||||
Project.YANTAI -> info.append("yantai")
|
||||
Project.SINGAPORE -> info.append("singapore")
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isT1T2(FunctionBuildConfig.appIdentityMode)) {
|
||||
@@ -147,6 +148,7 @@ object FlavorUtils {
|
||||
Project.DALI -> ProjectType.dali
|
||||
Project.MOGO -> ProjectType.mogo
|
||||
Project.YANTAI -> ProjectType.yantai
|
||||
Project.SINGAPORE -> ProjectType.singapore
|
||||
}
|
||||
envType = when (DebugConfig.getNetMode()) {
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ abstract class MyDataBase : RoomDatabase() {
|
||||
|
||||
fun getDBName():MyDataBase{
|
||||
val roomName = when (ProjectUtils.getProjectType()) {
|
||||
Project.SINGAPORE -> {
|
||||
"singapore_offline_db"
|
||||
}
|
||||
Project.SAAS -> {
|
||||
"saas_offline_db"
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ object RepositoryManager {
|
||||
get() {
|
||||
if (field == null) {
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = WeaknetRepository()
|
||||
CallerLogger.d(TAG, "saas shuttle 支持db")
|
||||
@@ -80,7 +80,7 @@ object RepositoryManager {
|
||||
get() {
|
||||
if (field == null) {
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = WriteOffCacheRepository()
|
||||
CallerLogger.d(TAG, "saas shuttle 核销缓存")
|
||||
|
||||
@@ -135,7 +135,7 @@ abstract class MyDataBase : RoomDatabase() {
|
||||
|
||||
fun getDBName(): MyDataBase {
|
||||
val roomName = when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
"shuttle_db"
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class NormalRepository : ILineRepository {
|
||||
get() {
|
||||
if (field == null) {
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
// throw NetException("非缓存weakNetInterface 初始化环境错误 isBus")
|
||||
throw NetException(StringUtils.getString(R.string.module_och_init_env_error_bus))
|
||||
|
||||
@@ -54,7 +54,7 @@ class WeaknetRepository : ILineRepository {
|
||||
get() {
|
||||
if (field == null) {
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = SaasShuttleServiceManager
|
||||
} else if (AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -40,7 +40,7 @@ class WriteOffCacheRepository : IWriteOffRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = SaasScheduledServiceManager
|
||||
}else if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class WriteOffNormallRepository: IWriteOffRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
// throw NetException("writeoff 核销 初始化环境错误 SAAS")
|
||||
throw NetException(StringUtils.getString(R.string.module_och_verification_init_env_error_saas))
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ object RepositoryManager {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = WeaknetRepository()
|
||||
CallerLogger.d(TAG,"saas shuttle 支持db")
|
||||
@@ -76,7 +76,7 @@ object RepositoryManager {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = WriteOffCacheRepository()
|
||||
CallerLogger.d(TAG,"saas shuttle 核销缓存")
|
||||
|
||||
@@ -135,7 +135,7 @@ abstract class MyDataBase : RoomDatabase() {
|
||||
|
||||
fun getDBName():MyDataBase{
|
||||
val roomName = when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
"shuttle_db"
|
||||
}else if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class NormalRepository: ILineRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
// throw NetException("非缓存weakNetInterface 初始化环境错误 isBus")
|
||||
throw NetException(StringUtils.getString(R.string.module_och_init_env_error_bus))
|
||||
|
||||
@@ -54,7 +54,7 @@ class WeaknetRepository : ILineRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = SaasShuttleServiceManager
|
||||
}else if(AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -40,7 +40,7 @@ class WriteOffCacheRepository : IWriteOffRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
field = SaasScheduledServiceManager
|
||||
}else if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class WriteOffNormallRepository: IWriteOffRepository {
|
||||
get() {
|
||||
if(field==null){
|
||||
when (ProjectUtils.getProjectType()) {
|
||||
Project.SAAS -> {
|
||||
Project.SAAS,Project.SINGAPORE -> {
|
||||
// throw NetException("writeoff 核销 初始化环境错误 SAAS")
|
||||
throw NetException(StringUtils.getString(R.string.module_och_verification_init_env_error_saas))
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ object ToolKitDataManager : IToolKitItemClickListener, IDataCenterBizListener {
|
||||
ToolTypeEnum.OPERATION_PANEL.name,
|
||||
getDefaultItemView(ctx, "运营面板", R.drawable.icon_toolkit_item_operation_panel)
|
||||
)
|
||||
if (ProjectUtils.isSaas()) {
|
||||
if (ProjectUtils.isSaas()||ProjectUtils.isSingapore()) {
|
||||
it += ToolKitBean(
|
||||
ToolTypeEnum.TAKE_OVER_HISTORY.name,
|
||||
getDefaultItemView(
|
||||
|
||||
@@ -7,6 +7,10 @@ object ProjectUtils {
|
||||
return DebugConfig.getProjectFlavor() == Project.SAAS.value
|
||||
}
|
||||
|
||||
fun isSingapore(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.SINGAPORE.value
|
||||
}
|
||||
|
||||
fun isDali(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.DALI.value
|
||||
}
|
||||
@@ -44,6 +48,7 @@ object ProjectUtils {
|
||||
|
||||
enum class Project(val value: String) {
|
||||
SAAS("saas"),
|
||||
SINGAPORE("singapore"),
|
||||
DALI("dali"),
|
||||
MOGO("mogo"),
|
||||
YANTAI("yantai")
|
||||
|
||||
Reference in New Issue
Block a user