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
4fe0cae2
Commit
4fe0cae2
authored
Jun 23, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SHQBD-179 个人认证完成页、个人认证信息页中"个人小店"修改为显示生活号名称,证件号码和手机号脱敏处理
parent
f7515ae7
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
159 additions
and
190 deletions
+159
-190
AuthEnterpriseLegalIdentityCommitBean.kt
...nt/http/httpbean/AuthEnterpriseLegalIdentityCommitBean.kt
+19
-19
AuthIndividualBusinessCompleteBean.kt
...ntent/http/httpbean/AuthIndividualBusinessCompleteBean.kt
+3
-3
AuthPersonalCompleteBean.kt
...uan/newscontent/http/httpbean/AuthPersonalCompleteBean.kt
+12
-3
LifeAccountEnterpriseAuthActivity.kt
.../newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
+10
-40
LifeAccountEnterpriseAuthCompleteActivity.kt
...tent/ui/auth/LifeAccountEnterpriseAuthCompleteActivity.kt
+2
-3
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+19
-24
LifeAccountPersonalAuthCompleteActivity.kt
...ontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
+2
-0
MerchantAuthInfoActivity.kt
...huoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
+61
-60
SensitiveInfoUtil.kt
...idian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
+2
-12
LifeAccountPersonalAuthInfoView.kt
...uan/newscontent/widget/LifeAccountPersonalAuthInfoView.kt
+29
-26
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthEnterpriseLegalIdentityCommitBean.kt
View file @
4fe0cae2
...
...
@@ -25,6 +25,6 @@ class AuthEnterpriseLegalIdentityCommitBean {
val
mobile
:
String
,
)
data class
Response
(
val
life_account_i
d
:
String
)
data class
Response
(
val
life_account_id
:
String
,
val
name
:
String
,
val
code
:
String
,
val
legal_person
:
String
,
val
legal_id_car
d
:
String
)
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthIndividualBusinessCompleteBean.kt
View file @
4fe0cae2
...
...
@@ -9,6 +9,6 @@ class AuthIndividualBusinessCompleteBean {
data class
Request
(
val
record_id
:
Long
)
data class
Response
(
val
life_account_i
d
:
String
)
data class
Response
(
val
life_account_id
:
String
,
val
name
:
String
,
val
code
:
String
,
val
legal_person
:
String
,
val
legal_id_car
d
:
String
)
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthPersonalCompleteBean.kt
View file @
4fe0cae2
...
...
@@ -6,6 +6,15 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
* description: API /merchant/auth/complete
*/
class
AuthPersonalCompleteBean
(
val
request
:
Request
)
{
data class
Request
(
val
mobile
:
String
,
val
life_account_id
:
Long
?)
data class
Response
(
val
life_account_id
:
String
)
data class
Response
(
val
life_account_id
:
String
,
val
occupation
:
String
,
val
full_name
:
String
,
val
id_card
:
String
,
val
life_account_name
:
String
)
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
View file @
4fe0cae2
...
...
@@ -305,26 +305,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
hashMapOf
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
result
?.
name
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
result
?.
code
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
result
?.
legal_person
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
legal_id_card
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
)
)
...
...
@@ -342,26 +327,11 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
,
hashMapOf
(
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_NAME
,
result
?.
name
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
REGISTRATION_CODE
,
result
?.
code
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NAME
,
result
?.
legal_person
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
legal_id_card
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountEnterpriseAuthCompleteActivity
.
EXTRA_IS_AUTH_MODIFY
,
isAuthModify
)
)
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthCompleteActivity.kt
View file @
4fe0cae2
...
...
@@ -66,10 +66,9 @@ class LifeAccountEnterpriseAuthCompleteActivity :
-
1
,
-
1
,
params
?.
get
(
REGISTRATION_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
REGISTRATION_CODE
)
?.
let
{
it
as
String
},
params
?.
get
(
REGISTRATION_CODE
)
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NAME
)
?.
let
{
it
as
String
},
SensitiveInfoUtil
.
idCardNumEncrypt
(
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
}
?:
""
)
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
}
)
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
4fe0cae2
package
com.yidian.shenghuoquan.newscontent.ui.auth
import
android.os.Bundle
import
android.util.Log
import
android.view.View
import
android.widget.CompoundButton
import
com.orhanobut.hawk.Hawk
...
...
@@ -11,7 +10,6 @@ import com.yidian.common.XEventConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountPersonalAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
...
...
@@ -37,6 +35,7 @@ class LifeAccountPersonalAuthActivity :
companion
object
{
// 认证数据
const
val
EXTRA_AUTH_DATA
=
"authData"
const
val
EXTRA_LIFE_ACCOUNT_ID
=
"life_account_id"
}
/**
...
...
@@ -55,6 +54,17 @@ class LifeAccountPersonalAuthActivity :
}
}
/**
* 个人未认证的生活号升级传入
*/
private
val
lifeAccountId
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
params
->
(
params
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_ID
]
?.
let
{
it
as
String
}
}
}
override
fun
createViewBinding
():
ActivityLifeAccountPersonalAuthBinding
{
return
ActivityLifeAccountPersonalAuthBinding
.
inflate
(
layoutInflater
)
}
...
...
@@ -123,9 +133,8 @@ class LifeAccountPersonalAuthActivity :
XPageManager
.
push
(
XRouterPathConstants
.
CHOOSE_CAREER
,
null
)
}
R
.
id
.
btn_next
->
{
// TODO: 6/21/21 未认证生活号进行个人认证 传参life_account_id
// 个人认证 完成认证
ApiService
.
authComplete
(
this
,
hashMapOf
())
ApiService
.
authComplete
(
this
,
lifeAccountId
?.
let
{
hashMapOf
(
Pair
(
EXTRA_LIFE_ACCOUNT_ID
,
it
))
}
?:
hashMapOf
())
}
R
.
id
.
tv_privacy_certification
->
{
...
...
@@ -155,26 +164,12 @@ class LifeAccountPersonalAuthActivity :
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
hashMapOf
(
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
OCCUPATION
,
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
PHONE_NUM
,
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
REAL_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
)
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
OCCUPATION
,
result
?.
occupation
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
PHONE_NUM
,
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
REAL_NAME
,
result
?.
full_name
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
ID_CARD_NUM
,
result
?.
id_card
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
result
?.
life_account_id
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
LIFE_ACCOUNT_NAME
,
result
?.
life_account_name
)
)
)
XPageManager
.
pop
(
null
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
View file @
4fe0cae2
...
...
@@ -21,6 +21,7 @@ class LifeAccountPersonalAuthCompleteActivity :
BaseActivity
<
ActivityLifeAccountPersonalAuthCompleteBinding
>(),
IGetLifeAccountListCallback
,
View
.
OnClickListener
{
companion
object
{
const
val
LIFE_ACCOUNT_NAME
=
"lifeAccountName"
const
val
OCCUPATION
=
"occupation"
const
val
REAL_NAME
=
"realName"
const
val
ID_CARD_NUM
=
"idCardNum"
...
...
@@ -58,6 +59,7 @@ class LifeAccountPersonalAuthCompleteActivity :
private
fun
initData
()
{
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
params
?.
get
(
LIFE_ACCOUNT_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
OCCUPATION
)
?.
let
{
it
as
String
},
params
?.
get
(
REAL_NAME
)
?.
let
{
it
as
String
},
params
?.
get
(
ID_CARD_NUM
)
?.
let
{
it
as
String
},
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
View file @
4fe0cae2
...
...
@@ -51,6 +51,7 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
// 个人认证
viewBind
.
ivPersonAuthInfo
.
isVisible
=
true
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
life_account_name
,
lifeAccountInfo
?.
occupation
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
id_card
,
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
View file @
4fe0cae2
...
...
@@ -12,18 +12,8 @@ object SensitiveInfoUtil {
* 身份证号码出生日期脱敏
*/
fun
idCardNumEncrypt
(
content
:
String
):
String
{
val
rule
=
"(\\d{6})\\d{8}(\\d{4})"
return
content
.
replace
(
rule
.
toRegex
(),
"$1********$2"
)
}
/**
* 身份证号前三后四脱敏
*/
fun
idCardPartEncrypt
(
content
:
String
):
String
{
if
(
content
.
isBlank
()
||
content
.
length
<
18
)
{
return
content
}
return
content
.
replace
((
"(?<=\\w{3})\\w(?=\\w{4})"
).
toRegex
(),
"*"
);
if
(
content
.
isBlank
())
return
content
return
content
.
replace
((
"(\\d{6})\\d{8}(\\d{4})"
).
toRegex
(),
"$1********$2"
)
}
/**
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountPersonalAuthInfoView.kt
View file @
4fe0cae2
...
...
@@ -6,6 +6,7 @@ import android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountPersonalAuthInfoBinding
import
com.yidian.shenghuoquan.newscontent.utils.SensitiveInfoUtil
/**
* author: yinjiacheng
...
...
@@ -30,15 +31,17 @@ class LifeAccountPersonalAuthInfoView @JvmOverloads constructor(
/**
* 填充认证信息
* @param lifeAccountName 生活号名称
* @param occupation 职业
* @param realName 真实姓名
* @param idCardNo 身份证号
* @param phoneNo 手机号
*/
fun
fillAuthInfo
(
occupation
:
String
?,
realName
:
String
?,
idCardNo
:
String
?,
phoneNo
:
String
?)
{
fun
fillAuthInfo
(
lifeAccountName
:
String
?,
occupation
:
String
?,
realName
:
String
?,
idCardNo
:
String
?,
phoneNo
:
String
?)
{
viewBinding
.
tvLifeAccountName
.
text
=
lifeAccountName
viewBinding
.
tvContentOccupationLabel
.
text
=
occupation
viewBinding
.
tvContentRealName
.
text
=
realName
viewBinding
.
tvContentIdCardNo
.
text
=
idCardNo
viewBinding
.
tvContentPhoneNo
.
text
=
phoneNo
viewBinding
.
tvContentIdCardNo
.
text
=
idCardNo
?.
let
{
SensitiveInfoUtil
.
idCardNumEncrypt
(
it
)
}
viewBinding
.
tvContentPhoneNo
.
text
=
phoneNo
?.
let
{
SensitiveInfoUtil
.
mobileEncrypt
(
it
)
}
}
}
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