Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
32aa57ce
Commit
32aa57ce
authored
Aug 06, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 生活号类型判断统一使用tag
parent
789188ba
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
86 deletions
+74
-86
MerchantSwitchAdapter.kt
...nghuoquan/bmanagercenter/adapter/MerchantSwitchAdapter.kt
+5
-5
ManagerCenterConfig.kt
...shenghuoquan/bmanagercenter/config/ManagerCenterConfig.kt
+13
-13
LifeAccountManager.kt
...shenghuoquan/bmanagercenter/manager/LifeAccountManager.kt
+17
-17
MerchantAuthInfoActivity.kt
...quan/bmanagercenter/ui/center/MerchantAuthInfoActivity.kt
+4
-16
MerchantCenterActivity.kt
...uoquan/bmanagercenter/ui/center/MerchantCenterActivity.kt
+11
-11
MerchantInfoActivity.kt
...ghuoquan/bmanagercenter/ui/center/MerchantInfoActivity.kt
+12
-12
LifeAccountEnterpriseAuthInfoView.kt
...managercenter/widget/LifeAccountEnterpriseAuthInfoView.kt
+7
-7
LifeAccountLabelView.kt
...henghuoquan/bmanagercenter/widget/LifeAccountLabelView.kt
+5
-5
No files found.
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/adapter/MerchantSwitchAdapter.kt
View file @
32aa57ce
...
...
@@ -42,23 +42,23 @@ class MerchantSwitchAdapter(
holder
.
viewBinding
.
tvLifeAccountName
.
text
=
data
.
life_account_name
holder
.
viewBinding
.
tvLifeAccountStatus
.
apply
{
text
=
data
.
tag
.
tag_text
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT_INDIVIDUAL_BUSINESS_AUTH
,
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
{
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
{
// 个体工商户、普通企业、个人
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_auth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FF1852F1
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
{
// 未认证
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_unauth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_audit
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFF26E3D
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 审核驳回
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/config/ManagerCenterConfig.kt
View file @
32aa57ce
...
...
@@ -110,14 +110,14 @@ object ManagerCenterConfig {
*/
fun
getFunctionPermissionMap
(
data
:
List
<
GetCommonConfigBean
.
Item
>,
lifeAccountType
:
LifeAccountManager
.
LifeAccountT
ype
,
lifeAccountType
:
LifeAccountManager
.
LifeAccountT
ag
,
client
:
ClientType
):
ArrayList
<
Int
>?
{
if
(
data
.
isEmpty
())
return
null
when
(
client
)
{
ClientType
.
MERCHANT_B
->
{
when
(
lifeAccountType
)
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_COMMON_ENTERPRISE_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
// 所有服务都可用
return
arrayListOf
(
...
...
@@ -132,7 +132,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_INDIVIDUAL_BUSINESS_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
// 所有服务都可用
return
arrayListOf
(
...
...
@@ -147,7 +147,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
{
// 个人认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -157,7 +157,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
{
// 未认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -167,7 +167,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -177,7 +177,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 认证驳回
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -191,7 +191,7 @@ object ManagerCenterConfig {
}
ClientType
.
MERCHANT_C
->
{
when
(
lifeAccountType
)
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_COMMON_ENTERPRISE_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
// 所有服务都可用
return
arrayListOf
(
...
...
@@ -206,7 +206,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_INDIVIDUAL_BUSINESS_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
// 所有服务都可用
return
arrayListOf
(
...
...
@@ -221,7 +221,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
{
// 个人认证
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -230,7 +230,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
{
// 未认证
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -239,7 +239,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
...
...
@@ -248,7 +248,7 @@ object ManagerCenterConfig {
data
[
2
].
functions
[
4
].
functionId
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 认证驳回
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/manager/LifeAccountManager.kt
View file @
32aa57ce
...
...
@@ -13,30 +13,30 @@ object LifeAccountManager {
* 获取生活号类型 by tag
* e.g. 未认证、个人认证、个体工商户认证、普通企业认证、认证审核、认证驳回
*/
fun
getLifeAccountT
ype
(
tagKey
:
Int
?):
LifeAccountType
{
fun
getLifeAccountT
ag
(
tagKey
:
Int
?):
LifeAccountTag
{
return
when
(
tagKey
)
{
Constant
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_COMMON_ENTERPRISE_AUTH
Constant
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_INDIVIDUAL_BUSINESS_AUTH
Constant
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_PERSONAL_AUTH
Constant
.
LIFE_ACCOUNT_TAG_NOT_AUTH
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
Constant
.
LIFE_ACCOUNT_TAG_AUDIT_UNDER
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
Constant
.
LIFE_ACCOUNT_TAG_AUTH_REJECT
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
else
->
LifeAccountT
ype
.
LIFE_ACCOUNT
_DEFAULT
Constant
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_COMMON_ENTERPRISE_AUTH
Constant
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_INDIVIDUAL_BUSINESS_AUTH
Constant
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
Constant
.
LIFE_ACCOUNT_TAG_NOT_AUTH
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
Constant
.
LIFE_ACCOUNT_TAG_AUDIT_UNDER
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
Constant
.
LIFE_ACCOUNT_TAG_AUTH_REJECT
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
else
->
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_DEFAULT
}
}
/**
* 生活号
类型
* 生活号
Tag
* @param tagKey 唯一标识
* @param tagText 名称
*/
enum
class
LifeAccountT
ype
(
private
val
tagKey
:
Int
,
private
val
tagText
:
String
)
{
LIFE_ACCOUNT_DEFAULT
(-
1
,
""
),
LIFE_ACCOUNT_COMMON_ENTERPRISE_AUTH
(
1
,
"普通企业"
),
LIFE_ACCOUNT_INDIVIDUAL_BUSINESS_AUTH
(
2
,
"个体工商户"
),
LIFE_ACCOUNT_PERSONAL_AUTH
(
3
,
"个人认证"
),
LIFE_ACCOUNT_NOT_AUTH
(
4
,
"未认证"
),
LIFE_ACCOUNT_AUDIT_UNDER
(
5
,
"审核中"
),
LIFE_ACCOUNT_AUTH_REJECT
(
6
,
"认证驳回"
)
enum
class
LifeAccountT
ag
(
private
val
tagKey
:
Int
,
private
val
tagText
:
String
)
{
LIFE_ACCOUNT_
TAG_
DEFAULT
(-
1
,
""
),
LIFE_ACCOUNT_
TAG_
COMMON_ENTERPRISE_AUTH
(
1
,
"普通企业"
),
LIFE_ACCOUNT_
TAG_
INDIVIDUAL_BUSINESS_AUTH
(
2
,
"个体工商户"
),
LIFE_ACCOUNT_
TAG_
PERSONAL_AUTH
(
3
,
"个人认证"
),
LIFE_ACCOUNT_
TAG_
NOT_AUTH
(
4
,
"未认证"
),
LIFE_ACCOUNT_
TAG_
AUDIT_UNDER
(
5
,
"审核中"
),
LIFE_ACCOUNT_
TAG_
AUTH_REJECT
(
6
,
"认证驳回"
)
}
}
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/ui/center/MerchantAuthInfoActivity.kt
View file @
32aa57ce
...
...
@@ -46,9 +46,9 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
}
private
fun
initData
()
{
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
lifeAccountInfo
?.
tag
?.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT_COMMON_ENTERPRISE
_AUTH
->
{
// 普通企业认证
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
lifeAccountInfo
?.
tag
?.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS
_AUTH
->
{
// 普通企业认证
、个体工商户认证
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
tag
?.
tag_key
,
...
...
@@ -59,19 +59,7 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
lifeAccountInfo
?.
id_card
)
}
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个人工商户认证
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
tag
?.
tag_key
,
lifeAccountInfo
?.
id_type
,
lifeAccountInfo
?.
name
,
lifeAccountInfo
?.
code
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
id_card
)
}
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT_PERSONAL_AUTH
->
{
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
{
// 个人认证
viewBind
.
ivPersonAuthInfo
.
isVisible
=
true
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/ui/center/MerchantCenterActivity.kt
View file @
32aa57ce
...
...
@@ -169,7 +169,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
// 生成当前生活号状态下的功能集
ManagerCenterConfig
.
getFunctionPermissionMap
(
configData
.
merchantManagerCenter
.
items
,
LifeAccountManager
.
getLifeAccountT
ype
(
curLifeAccount
?.
tag
?.
tag_key
),
LifeAccountManager
.
getLifeAccountT
ag
(
curLifeAccount
?.
tag
?.
tag_key
),
JudgeClientUtils
.
judgeClient
(
packageName
)
)
?.
let
{
functionPermissionList
=
it
}
// 过滤商户服务数据
...
...
@@ -182,14 +182,14 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
* @param data 当前生活号数据
*/
private
fun
showMerchantCenterBottomHint
(
data
:
LifeAccountItemBean
.
Response
)
{
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
// 当前是个人未认证生活号 提示认证升级
MerchantCenterBottomHintDialog
(
this
,
MerchantCenterBottomHintDialog
.
TYPE_AUTH_UPGRADE
,
this
).
show
()
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
// 当前企业认证驳回 提示修改
if
(
data
.
role_type
!=
Constant
.
TYPE_ROLE_ORDINARY
)
{
// 企业员工不显示
...
...
@@ -212,7 +212,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
val
group
=
next
()
if
(
group
.
groupId
==
Constant
.
MERCHANT_SERVICE_GROUP_MANAGEMENT
)
{
// 个人认证或企业员工不展示管理服务
if
(
LifeAccountManager
.
getLifeAccountT
ype
(
curLifeAccount
?.
tag
?.
tag_key
)
==
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_PERSONAL_AUTH
if
(
LifeAccountManager
.
getLifeAccountT
ag
(
curLifeAccount
?.
tag
?.
tag_key
)
==
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
||
curLifeAccount
?.
role_type
==
Constant
.
TYPE_ROLE_ORDINARY
)
{
remove
()
...
...
@@ -275,7 +275,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
Pair
(
LifeAccountEnterpriseAuthActivity
.
EXTRA_AUTH_DATA
,
result
),
Pair
(
LifeAccountEnterpriseAuthActivity
.
EXTRA_IS_AUTH_MODIFY
,
LifeAccountManager
.
getLifeAccountT
ype
(
curLifeAccount
?.
tag
?.
tag_key
)
==
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_AUTH_REJECT
LifeAccountManager
.
getLifeAccountT
ag
(
curLifeAccount
?.
tag
?.
tag_key
)
==
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
)
)
)
...
...
@@ -292,15 +292,15 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
functionPageMap
[
data
.
functionId
]
?.
let
{
XPageManager
.
push
(
it
,
functionParamsMap
[
data
.
functionId
])
}
}
else
{
// 若当前功能无权限 根据生活号类型做弹窗提示
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
curLifeAccount
?.
tag
?.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
curLifeAccount
?.
tag
?.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
// 审核中 提示加急审核
HintDialog
(
this
,
resources
.
getString
(
R
.
string
.
audit_urgent
),
arrayListOf
(
HintOptionBean
(
resources
.
getString
(
R
.
string
.
close
))),
null
).
setRightBtnColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_FF1852F1
)).
show
()
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
// 审核驳回 提示修改认证
HintDialog
(
this
,
...
...
@@ -320,7 +320,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
}
}).
setRightBtnColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_FFFF3A3A
)).
show
()
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
// 未认证 提示认证 此处企业审核中也满足此条件但前面审核状态判断已拦截
HintDialog
(
this
,
...
...
@@ -343,7 +343,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
}
}).
setRightBtnColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_FF1852F1
)).
show
()
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
// 个人认证 提示认证升级
HintDialog
(
this
,
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/ui/center/MerchantInfoActivity.kt
View file @
32aa57ce
...
...
@@ -120,8 +120,8 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
override
fun
onEnterAuth
(
from
:
MerchantInfoView
)
{
// 认证或认证升级或修改认证
if
(
from
==
viewBind
.
ivLifeAccountAuth
)
{
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
lifeAccountInfo
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
lifeAccountInfo
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
// 未认证 进入认证流程首页 此处需要传参from控制认证流程首页返回按钮显示
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
,
...
...
@@ -130,7 +130,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
IntentConstants
.
KEY_EXTRA_LIFE_ACCOUNT_ID
to
lifeAccountInfo
.
life_account_id
)
)
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
// 认证驳回 请求企业认证信息 此处为升级认证情况 需要传入生活号id
ApiService
.
authMerchantCheck
(
this
,
...
...
@@ -152,7 +152,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
hashMapOf
(
LifeAccountEnterpriseAuthActivity
.
EXTRA_LIFE_ACCOUNT_ID
to
lifeAccountInfo
.
life_account_id
,
LifeAccountEnterpriseAuthActivity
.
EXTRA_AUTH_DATA
to
result
,
LifeAccountEnterpriseAuthActivity
.
EXTRA_IS_AUTH_MODIFY
to
(
LifeAccountManager
.
getLifeAccountT
ype
(
lifeAccountInfo
.
tag
.
tag_key
)
==
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_AUTH_REJECT
)
LifeAccountEnterpriseAuthActivity
.
EXTRA_IS_AUTH_MODIFY
to
(
LifeAccountManager
.
getLifeAccountT
ag
(
lifeAccountInfo
.
tag
.
tag_key
)
==
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
)
)
)
}
...
...
@@ -167,15 +167,15 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
// 更新UI
// 生活号名称
viewBind
.
ivLifeAccountName
.
fillContent
(
lifeAccountInfo
.
life_account_name
)
if
(
LifeAccountManager
.
getLifeAccountT
ype
(
lifeAccountInfo
.
tag
.
tag_key
)
!=
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_AUDIT_UNDER
if
(
LifeAccountManager
.
getLifeAccountT
ag
(
lifeAccountInfo
.
tag
.
tag_key
)
!=
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
&&
lifeAccountInfo
.
role_type
!=
Constant
.
TYPE_ROLE_ORDINARY
)
{
// 审核中和企业员工不允许修改生活号名称
viewBind
.
ivLifeAccountName
.
showDetailEntry
()
}
// 认证信息
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
lifeAccountInfo
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_COMMON_ENTERPRISE_AUTH
->
{
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
lifeAccountInfo
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
common_enterprise
))
if
(
lifeAccountInfo
.
role_type
!=
Constant
.
TYPE_ROLE_ORDINARY
)
{
...
...
@@ -183,7 +183,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
viewBind
.
ivLifeAccountAuth
.
showDetailEntry
()
}
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_INDIVIDUAL_BUSINESS_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
individual_business
))
if
(
lifeAccountInfo
.
role_type
!=
Constant
.
TYPE_ROLE_ORDINARY
)
{
...
...
@@ -191,21 +191,21 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), Mercha
viewBind
.
ivLifeAccountAuth
.
showDetailEntry
()
}
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
{
// 个人认证
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
personal_auth
))
viewBind
.
ivLifeAccountAuthUpgrade
.
isVisible
=
true
viewBind
.
ivLifeAccountAuthUpgrade
.
showAuthEntry
(
MerchantInfoView
.
LifeAccountAuthStatus
.
UPGRADE_AUTH
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
{
// 未认证
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
not_auth
))
viewBind
.
ivLifeAccountAuth
.
showAuthEntry
(
MerchantInfoView
.
LifeAccountAuthStatus
.
NOT_AUTH
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 认证驳回
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
auth_reject
))
if
(
lifeAccountInfo
.
role_type
!=
Constant
.
TYPE_ROLE_ORDINARY
)
{
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/widget/LifeAccountEnterpriseAuthInfoView.kt
View file @
32aa57ce
...
...
@@ -35,7 +35,7 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
/**
* 填充认证信息
* @param tagKey 生活号tag
* @param
authType 认证
类型 e.g. 个体工商户、普通企业
* @param
lifeAccountType 生活号
类型 e.g. 个体工商户、普通企业
* @param registrationName 公司名称
* @param registrationCode 统一社会信用代码
* @param realName 经营者姓名或法人姓名
...
...
@@ -43,7 +43,7 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
*/
fun
fillAuthInfo
(
tagKey
:
Int
?,
auth
Type
:
Int
?,
lifeAccount
Type
:
Int
?,
registrationName
:
String
?,
registrationCode
:
String
?,
realName
:
String
?,
...
...
@@ -57,7 +57,7 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
realName
,
SensitiveInfoUtil
.
idCardNumEncrypt
(
idCardNo
.
toString
())
)
when
(
auth
Type
)
{
when
(
lifeAccount
Type
)
{
Constant
.
TYPE_AUTH_INDIVIDUAL_BUSINESS
->
{
// 个体工商户
viewBinding
.
tvAuthType
.
text
=
resources
.
getText
(
R
.
string
.
individual_business
)
...
...
@@ -76,8 +76,8 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
resources
.
getText
(
R
.
string
.
operator_information
)
}
}
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
tagKey
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
tagKey
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
viewBinding
.
tvAuditStatus
.
text
=
resources
.
getText
(
R
.
string
.
under_audit
)
viewBinding
.
tvAuditStatus
.
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_audit
)
...
...
@@ -88,7 +88,7 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
)
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_INDIVIDUAL_BUSINESS_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户、普通企业
viewBinding
.
tvAuditStatus
.
text
=
resources
.
getText
(
R
.
string
.
audit_pass
)
viewBinding
.
tvAuditStatus
.
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_open
)
...
...
@@ -99,7 +99,7 @@ class LifeAccountEnterpriseAuthInfoView @JvmOverloads constructor(
)
)
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 审核驳回
viewBinding
.
tvAuditStatus
.
text
=
resources
.
getText
(
R
.
string
.
audit_reject
)
viewBinding
.
tvAuditStatus
.
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/widget/LifeAccountLabelView.kt
View file @
32aa57ce
...
...
@@ -49,23 +49,23 @@ class LifeAccountLabelView @JvmOverloads constructor(
viewBinding
.
tvLifeAccountName
.
text
=
data
.
life_account_name
viewBinding
.
tvLifeAccountStatus
.
apply
{
text
=
data
.
tag
.
tag_text
when
(
LifeAccountManager
.
getLifeAccountT
ype
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT_INDIVIDUAL_BUSINESS_AUTH
,
LifeAccountManager
.
LifeAccountType
.
LIFE_ACCOUNT
_PERSONAL_AUTH
->
{
when
(
LifeAccountManager
.
getLifeAccountT
ag
(
data
.
tag
.
tag_key
))
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
,
LifeAccountManager
.
LifeAccountTag
.
LIFE_ACCOUNT_TAG
_PERSONAL_AUTH
->
{
// 个体工商户、普通企业、个人
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_auth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FF1852F1
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_NOT_AUTH
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_NOT_AUTH
->
{
// 未认证
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_unauth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUDIT_UNDER
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUDIT_UNDER
->
{
// 审核中
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_audit
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFF26E3D
))
}
LifeAccountManager
.
LifeAccountT
ype
.
LIFE_ACCOUNT
_AUTH_REJECT
->
{
LifeAccountManager
.
LifeAccountT
ag
.
LIFE_ACCOUNT_TAG
_AUTH_REJECT
->
{
// 审核驳回
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment