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
70900aae
Commit
70900aae
authored
Jun 16, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 生活号基本信息和认证信息
parent
69cc81ab
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
47 deletions
+64
-47
GetLifeAccountInfoByIdBean.kt
...n/newscontent/http/httpbean/GetLifeAccountInfoByIdBean.kt
+6
-10
MerchantAuthInfoActivity.kt
...huoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
+5
-5
MerchantCenterActivity.kt
...nghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
+29
-1
MerchantInfoActivity.kt
...henghuoquan/newscontent/ui/center/MerchantInfoActivity.kt
+9
-24
LifeAccountLabelView.kt
...n/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
+14
-7
view_merchant_info.xml
...ts/newscontent/src/main/res/layout/view_merchant_info.xml
+1
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/GetLifeAccountInfoByIdBean.kt
View file @
70900aae
...
...
@@ -12,28 +12,24 @@ class GetLifeAccountInfoByIdBean {
data class
Request
(
val
life_account_id
:
Long
)
data class
Response
(
val
code
:
String
,
val
audit_status
:
Int
,
val
create_time
:
String
,
val
enterprise_auth_record_id
:
Int
,
val
enterprise_auth_record_status
:
Int
,
val
id_card
:
String
,
val
id_type
:
Int
,
val
legal_id_card
:
String
,
val
legal_person
:
String
,
val
life_account_admin_id
:
Long
,
val
life_account_auth_status
:
Int
,
val
life_account_id
:
Long
,
val
life_account_name
:
String
,
val
life_account_origin
:
String
,
val
life_account_status
:
Int
,
val
life_account_type
:
Int
,
val
merchant_id
:
Int
,
val
name
:
String
,
val
shop_auditing_count
:
Int
,
val
shop_count
:
Int
,
val
shop_totel_count
:
Int
,
val
update_time
:
String
,
val
occupation
:
String
,
val
mobile
:
String
val
update_time
:
String
,
val
code
:
String
,
val
name
:
String
,
val
mobile
:
String
,
)
:
Serializable
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantAuthInfoActivity.kt
View file @
70900aae
...
...
@@ -53,7 +53,7 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
viewBind
.
ivPersonAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
occupation
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
legal_
id_card
,
lifeAccountInfo
?.
id_card
,
Hawk
.
get
(
HawkConfig
.
Mobile
)
)
}
...
...
@@ -62,11 +62,11 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
id_type
,
lifeAccountInfo
?.
enterprise_auth_record
_status
,
lifeAccountInfo
?.
audit
_status
,
lifeAccountInfo
?.
name
,
lifeAccountInfo
?.
code
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
legal_
id_card
lifeAccountInfo
?.
id_card
)
}
Constant
.
TYPE_AUTH_COMMON_ENTERPRISE
->
{
...
...
@@ -74,11 +74,11 @@ class MerchantAuthInfoActivity : BaseActivity<ActivityMerchantAuthInfoBinding>()
viewBind
.
ivEnterpriseAuthInfo
.
isVisible
=
true
viewBind
.
ivEnterpriseAuthInfo
.
fillAuthInfo
(
lifeAccountInfo
?.
id_type
,
lifeAccountInfo
?.
enterprise_auth_record
_status
,
lifeAccountInfo
?.
audit
_status
,
lifeAccountInfo
?.
name
,
lifeAccountInfo
?.
code
,
lifeAccountInfo
?.
legal_person
,
lifeAccountInfo
?.
legal_
id_card
lifeAccountInfo
?.
id_card
)
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
View file @
70900aae
...
...
@@ -11,9 +11,13 @@ import com.yidian.shenghuoquan.newscontent.adapter.MerchantServiceGroupAdapter
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMerchantCenterBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IGetConfigListCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IGetLifeAccountInfoByIdCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IGetLifeAccountListCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetConfigListBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetLifeAccountInfoByIdBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.LifeAccountItemBean
import
com.yidian.shenghuoquan.newscontent.widget.LifeAccountLabelView
import
com.yidian.xpage.XPageManager
/**
* author: yinjiacheng
...
...
@@ -22,7 +26,8 @@ import com.yidian.shenghuoquan.newscontent.http.httpbean.LifeAccountItemBean
*/
class
MerchantCenterActivity
:
BaseActivity
<
ActivityMerchantCenterBinding
>(),
IGetConfigListCallback
,
IGetLifeAccountListCallback
,
View
.
OnClickListener
,
MerchantSwitchDialog
.
OnMerchantSwitchCallback
{
MerchantSwitchDialog
.
OnMerchantSwitchCallback
,
LifeAccountLabelView
.
OnLifeAccountLabelCallback
,
IGetLifeAccountInfoByIdCallback
{
companion
object
{
// 传递的生活号信息
...
...
@@ -30,6 +35,8 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
// 是否有多个生活号
const
val
EXTRA_IS_MULTI
=
"isMulti"
const
val
PARAMS_LIFE_ACCOUNT_ID
=
"life_account_id"
}
/**
...
...
@@ -62,6 +69,7 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
private
fun
initListener
()
{
viewBind
.
tvSwitch
.
setOnClickListener
(
this
)
viewBind
.
lvLifeAccountLabel
.
setOnLifeAccountLabelCallback
(
this
)
}
private
fun
initData
()
{
...
...
@@ -115,4 +123,24 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
curLifeAccount
=
data
viewBind
.
lvLifeAccountLabel
.
setLifeAccountData
(
data
)
}
override
fun
onEnterLifeAccountInfo
(
lifeAccountId
:
Long
)
{
// 请求生活号详情接口
ApiService
.
getLifeAccountInfoById
(
this
,
hashMapOf
(
Pair
(
PARAMS_LIFE_ACCOUNT_ID
,
lifeAccountId
.
toString
()))
)
}
override
fun
getLifeAccountInfoByIdSuccess
(
result
:
GetLifeAccountInfoByIdBean
.
Response
?)
{
// 跳转生活号基本信息
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_INFO
,
hashMapOf
(
Pair
(
MerchantInfoActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
))
)
}
override
fun
getLifeAccountInfoByIdFailure
(
message
:
String
?)
{
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantInfoActivity.kt
View file @
70900aae
...
...
@@ -10,10 +10,8 @@ import com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMerchantInfoBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthMerchantCheckCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IGetLifeAccountInfoByIdCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthMerchantCheckBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetLifeAccountInfoByIdBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.LifeAccountItemBean
import
com.yidian.shenghuoquan.newscontent.ui.auth.LifeAccountEnterpriseAuthActivity
import
com.yidian.shenghuoquan.newscontent.widget.MerchantInfoView
import
com.yidian.xpage.XPageManager
...
...
@@ -24,8 +22,7 @@ import com.yidian.xpage.XPageManager
* description: 商户基本信息
*/
class
MerchantInfoActivity
:
BaseActivity
<
ActivityMerchantInfoBinding
>(),
View
.
OnClickListener
,
MerchantInfoView
.
OnMerchantInfoViewListener
,
IAuthMerchantCheckCallback
,
IGetLifeAccountInfoByIdCallback
{
MerchantInfoView
.
OnMerchantInfoViewListener
,
IAuthMerchantCheckCallback
{
companion
object
{
const
val
EXTRA_LIFE_ACCOUNT_INFO
=
"lifeAccountInfo"
...
...
@@ -38,7 +35,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
private
val
lifeAccountInfo
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
params
->
(
params
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_INFO
]
?.
let
{
it
as
LifeAccountItem
Bean
.
Response
it
as
GetLifeAccountInfoById
Bean
.
Response
}
}
}
...
...
@@ -74,7 +71,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
viewBind
.
ivLifeAccountName
.
fillContent
(
lifeAccountInfo
?.
life_account_name
)
viewBind
.
ivLifeAccountName
.
showDetailEntry
()
// 生活号认证信息
if
(
lifeAccountInfo
?.
enterprise_
audit_status
==
Constant
.
STATUS_AUDIT_REJECT
)
{
if
(
lifeAccountInfo
?.
audit_status
==
Constant
.
STATUS_AUDIT_REJECT
)
{
// 认证驳回
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
auth_reject
))
viewBind
.
ivLifeAccountAuth
.
showAuthEntry
(
MerchantInfoView
.
LifeAccountAuthStatus
.
MODIFY_AUTH
)
...
...
@@ -88,7 +85,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
}
Constant
.
STATUS_AUTH_FINISH
->
{
// 已认证 判断认证类型
when
(
lifeAccountInfo
?.
life_account
_type
)
{
when
(
lifeAccountInfo
?.
id
_type
)
{
Constant
.
TYPE_AUTH_PERSONAL
->
{
// 个人认证
viewBind
.
ivLifeAccountAuth
.
fillContent
(
resources
.
getString
(
R
.
string
.
personal_auth
))
...
...
@@ -135,10 +132,10 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
)
)
}
else
if
(
from
==
viewBind
.
ivLifeAccountAuth
)
{
//
请求生活号详情接口
跳转认证详情页
ApiService
.
getLifeAccountInfoById
(
this
,
hashMapOf
(
Pair
(
PARAMS_LIFE_ACCOUNT_ID
,
lifeAccountInfo
?.
life_account_id
.
toString
()
))
// 跳转认证详情页
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_AUTH_INFO
,
hashMapOf
(
Pair
(
MerchantAuthInfoActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
lifeAccountInfo
))
)
}
}
...
...
@@ -149,7 +146,7 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
if
(
lifeAccountInfo
?.
life_account_auth_status
==
Constant
.
STATUS_AUTH_NOT
)
{
// 未认证 进入认证流程首页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
,
null
)
}
else
if
(
lifeAccountInfo
?.
enterprise_
audit_status
==
Constant
.
STATUS_AUDIT_REJECT
)
{
}
else
if
(
lifeAccountInfo
?.
audit_status
==
Constant
.
STATUS_AUDIT_REJECT
)
{
// 认证驳回 请求企业认证信息 此处为升级认证情况 需要传入生活号id
ApiService
.
authMerchantCheck
(
this
,
...
...
@@ -192,16 +189,4 @@ class MerchantInfoActivity : BaseActivity<ActivityMerchantInfoBinding>(), View.O
}
override
fun
getLifeAccountInfoByIdSuccess
(
result
:
GetLifeAccountInfoByIdBean
.
Response
?)
{
// 跳转认证详情页
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_AUTH_INFO
,
hashMapOf
(
Pair
(
MerchantAuthInfoActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
))
)
}
override
fun
getLifeAccountInfoByIdFailure
(
message
:
String
?)
{
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
View file @
70900aae
...
...
@@ -5,13 +5,10 @@ import android.util.AttributeSet
import
android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
androidx.core.content.ContextCompat
import
com.yidian.common.XRouterPathConstants
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountLabelBinding
import
com.yidian.shenghuoquan.newscontent.http.httpbean.LifeAccountItemBean
import
com.yidian.shenghuoquan.newscontent.ui.center.MerchantInfoActivity
import
com.yidian.xpage.XPageManager
/**
* author: yinjiacheng
...
...
@@ -37,6 +34,8 @@ class LifeAccountLabelView @JvmOverloads constructor(
*/
private
lateinit
var
curLifeAccount
:
LifeAccountItemBean
.
Response
private
var
callback
:
OnLifeAccountLabelCallback
?
=
null
init
{
viewBinding
.
ivLifeAccountDetail
.
setOnClickListener
(
this
)
}
...
...
@@ -88,11 +87,19 @@ class LifeAccountLabelView @JvmOverloads constructor(
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
iv_life_account_detail
)
{
// 跳转生活号基本信息
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_INFO
,
hashMapOf
(
Pair
(
MerchantInfoActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
curLifeAccount
))
)
callback
?.
onEnterLifeAccountInfo
(
curLifeAccount
.
life_account_id
)
}
}
fun
setOnLifeAccountLabelCallback
(
callback
:
OnLifeAccountLabelCallback
)
{
this
.
callback
=
callback
}
interface
OnLifeAccountLabelCallback
{
/**
* 进入生活号基本信息
*/
fun
onEnterLifeAccountInfo
(
lifeAccountId
:
Long
)
}
...
...
Components/newscontent/src/main/res/layout/view_merchant_info.xml
View file @
70900aae
...
...
@@ -3,6 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp58"
android:background=
"@color/color_FFFFFFFF"
android:paddingStart=
"@dimen/dp19"
android:paddingEnd=
"@dimen/dp12"
>
...
...
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