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
d5d2cb4e
Commit
d5d2cb4e
authored
Jul 22, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将发送短信验证码接口以及相关能力迁移到BGeneralBusiness
parent
0c01e0cd
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
146 additions
and
127 deletions
+146
-127
URLs.kt
...Lib/BCommon/src/main/java/com/yidian/bcommon/http/URLs.kt
+0
-2
ZapServiceNameConstants.kt
...va/com/yidian/bcommon/services/ZapServiceNameConstants.kt
+4
-0
BGeneralBusinessApplication.kt
...oquan/bgeneralbusiness/app/BGeneralBusinessApplication.kt
+5
-2
GeneralBusinessApiService.kt
...uoquan/bgeneralbusiness/http/GeneralBusinessApiService.kt
+19
-0
GeneralBusinessRemoteDataService.kt
...bgeneralbusiness/http/GeneralBusinessRemoteDataService.kt
+26
-0
GeneralAbilityService.kt
...huoquan/bgeneralbusiness/service/GeneralAbilityService.kt
+46
-0
BNAHttpReqService.kt
...huoquan/bgeneralbusiness/service/net/BNAHttpReqService.kt
+2
-6
BNARemoteDataSource.kt
...oquan/bgeneralbusiness/service/net/BNARemoteDataSource.kt
+2
-2
BNAService.kt
...n/shenghuoquan/bgeneralbusiness/service/net/BNAService.kt
+1
-1
IBNARequestCallBack.kt
...neralbusiness/service/net/callback/IBNARequestCallBack.kt
+1
-1
SettingApiService.kt
...om/yidian/shenghuoquan/bsetting/http/SettingApiService.kt
+1
-8
SettingRemoteDataSource.kt
...ian/shenghuoquan/bsetting/http/SettingRemoteDataSource.kt
+1
-1
LoginLifeCircleActivity.kt
...shenghuoquan/bsetting/ui/login/LoginLifeCircleActivity.kt
+1
-1
ApiService.kt
...va/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
+0
-18
CommonService.kt
...com/yidian/shenghuoquan/newscontent/http/CommonService.kt
+0
-6
PersonalRemoteDataSource.kt
...an/newscontent/personnel/http/PersonalRemoteDataSource.kt
+0
-20
PersonalService.kt
...henghuoquan/newscontent/personnel/http/PersonalService.kt
+0
-7
IPersonalGetSmsCodeCallBack.kt
...nt/personnel/http/callback/IPersonalGetSmsCodeCallBack.kt
+0
-7
AddStaffActivity.kt
...shenghuoquan/newscontent/personnel/ui/AddStaffActivity.kt
+18
-14
ManagerChangeActivity.kt
...huoquan/newscontent/personnel/ui/ManagerChangeActivity.kt
+18
-14
LifeNumberListService.kt
...shenghuoquan/newscontent/service/LifeNumberListService.kt
+1
-17
No files found.
CommonLib/BCommon/src/main/java/com/yidian/bcommon/http/URLs.kt
View file @
d5d2cb4e
...
@@ -18,8 +18,6 @@ class URLs {
...
@@ -18,8 +18,6 @@ class URLs {
const
val
getKSYunObjectId
=
"Ksy/ksyun/buildObectid"
const
val
getKSYunObjectId
=
"Ksy/ksyun/buildObectid"
const
val
getKSYunBucket
=
"Ksy/ksyun/getBucket"
const
val
getKSYunBucket
=
"Ksy/ksyun/getBucket"
const
val
businessLicenseOCR
=
"/Identify/BusLicense/businessLicenseOcr"
const
val
businessLicenseOCR
=
"/Identify/BusLicense/businessLicenseOcr"
const
val
sendMsgCode
=
"/sms/sms/send_code"
const
val
mobileLogin
=
"/user/user/login"
const
val
userLogout
=
"/user/user/logout"
const
val
userLogout
=
"/user/user/logout"
const
val
accountList
=
"/merchant/auth/account_list"
const
val
accountList
=
"/merchant/auth/account_list"
const
val
createLifeAccount
=
"/merchant/enterprise/check_life"
const
val
createLifeAccount
=
"/merchant/enterprise/check_life"
...
...
CommonLib/BCommon/src/main/java/com/yidian/bcommon/services/ZapServiceNameConstants.kt
View file @
d5d2cb4e
...
@@ -9,6 +9,10 @@ class ZapServiceNameConstants {
...
@@ -9,6 +9,10 @@ class ZapServiceNameConstants {
companion
object
{
companion
object
{
// 生活号列表服务名称
// 生活号列表服务名称
const
val
LifeNumberListServiceName
=
"LifeNumberListService"
const
val
LifeNumberListServiceName
=
"LifeNumberListService"
// BGeneralBusiness组件中提供的通用服务
const
val
GeneralAbilityServiceName
=
"GeneralAbilityServiceName"
// BGeneralBusiness组件中给H5提供的通用网络请求服务(名称需要和H5同步的)
const
val
BNAHttpReq
=
"BNAHttpReq"
}
}
...
...
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/app/BGeneralBusinessApplication.kt
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.app
package
com.yidian.shenghuoquan.bgeneralbusiness.app
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.app.YdBaseApplication
import
com.yidian.bcommon.services.ZapServiceNameConstants
import
com.yidian.news.util.ProcessUtil
import
com.yidian.news.util.ProcessUtil
import
com.yidian.shenghuoquan.bgeneralbusiness.http.BNAHttpReqService
import
com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService
import
com.yidian.shenghuoquan.bgeneralbusiness.service.net.BNAHttpReqService
import
com.yidian.yac.core.core.YacModuleSpec
import
com.yidian.yac.core.core.YacModuleSpec
import
com.yidian.yac.core.zap.Zap
import
com.yidian.yac.core.zap.Zap
...
@@ -17,6 +19,7 @@ class BGeneralBusinessApplication : YdBaseApplication() {
...
@@ -17,6 +19,7 @@ class BGeneralBusinessApplication : YdBaseApplication() {
}
}
private
fun
initService
()
{
private
fun
initService
()
{
Zap
.
addService
(
BNAHttpReqService
.
SERVICE_NAME
,
BNAHttpReqService
())
Zap
.
addService
(
ZapServiceNameConstants
.
BNAHttpReq
,
BNAHttpReqService
())
Zap
.
addService
(
ZapServiceNameConstants
.
GeneralAbilityServiceName
,
GeneralAbilityService
())
}
}
}
}
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/http/GeneralBusinessApiService.kt
0 → 100644
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.http
import
com.yidian.bcommon.http.*
import
io.reactivex.rxjava3.core.Observable
import
retrofit2.http.GET
import
retrofit2.http.QueryMap
interface
GeneralBusinessApiService
{
private
companion
object
{
const
val
sendMsgCode
=
"/sms/sms/send_code"
}
/**
* 发送验证码
*/
@GET
(
sendMsgCode
)
fun
sendMsgCode
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
}
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/http/GeneralBusinessRemoteDataService.kt
0 → 100644
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.http
import
com.yidian.bcommon.http.*
import
com.yidian.http.ServiceFactory
object
GeneralBusinessRemoteDataService
{
private
var
api
=
ServiceFactory
.
getInstance
().
createService
(
GeneralBusinessApiService
::
class
.
java
)
// 获取短信验证码
fun
sendMsgCode
(
requestParams
:
HashMap
<
String
,
String
?
>,
callback
:
((
Boolean
)
->
Unit
)?
=
null
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
val
privateParamsMap
=
HttpParamsUtils
.
getPrivateParamsMap
(
requestParams
,
timeStamp
)
api
.
sendMsgCode
(
publicParamsMap
,
privateParamsMap
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
Any
?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
Any
?
>?)
{
callback
?.
invoke
(
true
)
}
override
fun
onFailure
(
result
:
HttpResult
<
Any
?
>?)
{
}
})
}
}
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/service/GeneralAbilityService.kt
0 → 100644
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.service
import
com.yidian.bcommon.services.ZapServiceActionConstants
import
com.yidian.shenghuoquan.bgeneralbusiness.http.GeneralBusinessRemoteDataService
import
com.yidian.xarc.xrouter.ResultResolver
import
com.yidian.yac.core.zap.ZapService
import
org.json.JSONObject
/**
* 通用能力服务,提供其他组件的共用操作能力
*/
class
GeneralAbilityService
:
ZapService
()
{
private
lateinit
var
resolver
:
ResultResolver
override
fun
onAction
(
path
:
String
,
action
:
String
,
params
:
Any
,
options
:
Any
,
resolver
:
ResultResolver
)
{
this
.
resolver
=
resolver
params
as
JSONObject
when
(
action
)
{
ZapServiceActionConstants
.
ActionRequestSmsCode
->
requestSmsCode
(
params
)
}
}
override
fun
onExit
()
{
}
override
fun
onInit
()
{
}
/**
* 请求短信验证码
*/
private
fun
requestSmsCode
(
params
:
JSONObject
)
{
val
mobile
=
params
.
optString
(
"mobile"
)
val
scene
=
params
.
optString
(
"scene"
)
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
paramsMap
[
"scene"
]
=
scene
GeneralBusinessRemoteDataService
.
sendMsgCode
(
paramsMap
)
{
if
(
it
)
{
resolver
.
success
(
true
)
}
}
}
}
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
http
/BNAHttpReqService.kt
→
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
service/net
/BNAHttpReqService.kt
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.
http
package
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
import
com.google.gson.Gson
import
com.google.gson.Gson
import
com.yidian.bcommon.BuildConfig
import
com.yidian.bcommon.BuildConfig
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.shenghuoquan.bgeneralbusiness.
http
.callback.IBNARequestCallBack
import
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
.callback.IBNARequestCallBack
import
com.yidian.xarc.xrouter.ResultResolver
import
com.yidian.xarc.xrouter.ResultResolver
import
com.yidian.yac.core.zap.ZapService
import
com.yidian.yac.core.zap.ZapService
import
org.json.JSONObject
import
org.json.JSONObject
...
@@ -14,10 +14,6 @@ import org.json.JSONObject
...
@@ -14,10 +14,6 @@ import org.json.JSONObject
*/
*/
class
BNAHttpReqService
:
ZapService
()
{
class
BNAHttpReqService
:
ZapService
()
{
companion
object
{
const
val
SERVICE_NAME
:
String
=
"BNAHttpReq"
}
private
lateinit
var
resolver
:
ResultResolver
private
lateinit
var
resolver
:
ResultResolver
override
fun
onAction
(
path
:
String
,
action
:
String
,
params
:
Any
,
options
:
Any
,
resolver
:
ResultResolver
)
{
override
fun
onAction
(
path
:
String
,
action
:
String
,
params
:
Any
,
options
:
Any
,
resolver
:
ResultResolver
)
{
...
...
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
http
/BNARemoteDataSource.kt
→
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
service/net
/BNARemoteDataSource.kt
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.
http
package
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
import
com.yidian.bcommon.http.HttpParamsUtils
import
com.yidian.bcommon.http.HttpParamsUtils
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.bcommon.http.HttpResultSubscriber
import
com.yidian.bcommon.http.HttpResultSubscriber
import
com.yidian.bcommon.http.TransformUtil
import
com.yidian.bcommon.http.TransformUtil
import
com.yidian.shenghuoquan.bgeneralbusiness.
http
.callback.IBNARequestCallBack
import
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
.callback.IBNARequestCallBack
import
com.yidian.http.ServiceFactory
import
com.yidian.http.ServiceFactory
object
BNARemoteDataSource
{
object
BNARemoteDataSource
{
...
...
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
http
/BNAService.kt
→
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
service/net
/BNAService.kt
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.
http
package
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.bcommon.http.HttpResult
import
io.reactivex.rxjava3.core.Observable
import
io.reactivex.rxjava3.core.Observable
...
...
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
http
/callback/IBNARequestCallBack.kt
→
Components/BGeneralBusiness/src/main/java/com/yidian/shenghuoquan/bgeneralbusiness/
service/net
/callback/IBNARequestCallBack.kt
View file @
d5d2cb4e
package
com.yidian.shenghuoquan.bgeneralbusiness.
http
.callback
package
com.yidian.shenghuoquan.bgeneralbusiness.
service.net
.callback
import
com.yidian.bcommon.http.HttpResult
import
com.yidian.bcommon.http.HttpResult
...
...
Components/BSetting/src/main/java/com/yidian/shenghuoquan/bsetting/http/SettingService.kt
→
Components/BSetting/src/main/java/com/yidian/shenghuoquan/bsetting/http/Setting
Api
Service.kt
View file @
d5d2cb4e
...
@@ -5,11 +5,10 @@ import io.reactivex.rxjava3.core.Observable
...
@@ -5,11 +5,10 @@ import io.reactivex.rxjava3.core.Observable
import
retrofit2.http.GET
import
retrofit2.http.GET
import
retrofit2.http.QueryMap
import
retrofit2.http.QueryMap
interface
SettingService
{
interface
Setting
Api
Service
{
private
companion
object
{
private
companion
object
{
const
val
mobileLogin
=
"/user/user/login"
const
val
mobileLogin
=
"/user/user/login"
// const val sendMsgCode = "/sms/sms/send_code"
const
val
userLogout
=
"/user/user/logout"
const
val
userLogout
=
"/user/user/logout"
}
}
...
@@ -19,12 +18,6 @@ interface SettingService {
...
@@ -19,12 +18,6 @@ interface SettingService {
@GET
(
mobileLogin
)
@GET
(
mobileLogin
)
fun
mobileLogin
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
fun
mobileLogin
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
// /**
// * 发送验证码
// */
// @GET(sendMsgCode)
// fun sendMsgCode(@QueryMap commonParams: Map<String, String>, @QueryMap params: Map<String, String?>): Observable<HttpResult<Any?>>
/**
/**
* 退出登录
* 退出登录
*/
*/
...
...
Components/BSetting/src/main/java/com/yidian/shenghuoquan/bsetting/http/SettingRemoteDataSource.kt
View file @
d5d2cb4e
...
@@ -9,7 +9,7 @@ import com.yidian.shenghuoquan.bsetting.bean.MobileLoginBean
...
@@ -9,7 +9,7 @@ import com.yidian.shenghuoquan.bsetting.bean.MobileLoginBean
object
SettingRemoteDataSource
{
object
SettingRemoteDataSource
{
private
var
api
=
ServiceFactory
.
getInstance
().
createService
(
SettingService
::
class
.
java
)
private
var
api
=
ServiceFactory
.
getInstance
().
createService
(
Setting
Api
Service
::
class
.
java
)
/**
/**
* 手机号登录
* 手机号登录
...
...
Components/BSetting/src/main/java/com/yidian/shenghuoquan/bsetting/ui/login/LoginLifeCircleActivity.kt
View file @
d5d2cb4e
...
@@ -194,7 +194,7 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>(), View.OnFoc
...
@@ -194,7 +194,7 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>(), View.OnFoc
val
jsonObject
=
JSONObject
()
val
jsonObject
=
JSONObject
()
jsonObject
.
put
(
"mobile"
,
mobile
)
jsonObject
.
put
(
"mobile"
,
mobile
)
jsonObject
.
put
(
"scene"
,
"login"
)
jsonObject
.
put
(
"scene"
,
"login"
)
ZapTicket
(
ZapServiceNameConstants
.
LifeNumberList
ServiceName
)
ZapTicket
(
ZapServiceNameConstants
.
GeneralAbility
ServiceName
)
.
withAction
(
ZapServiceActionConstants
.
ActionRequestSmsCode
)
.
withAction
(
ZapServiceActionConstants
.
ActionRequestSmsCode
)
.
withServiceParams
(
jsonObject
)
.
withServiceParams
(
jsonObject
)
.
onResult
{
result
->
.
onResult
{
result
->
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
View file @
d5d2cb4e
...
@@ -55,24 +55,6 @@ class ApiService {
...
@@ -55,24 +55,6 @@ class ApiService {
})
})
}
}
// 获取短信验证码
fun
sendMsgCode
(
requestParams
:
HashMap
<
String
,
String
?
>,
callback
:
((
Boolean
)
->
Unit
)?
=
null
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
val
privateParamsMap
=
HttpParamsUtils
.
getPrivateParamsMap
(
requestParams
,
timeStamp
)
ServiceFactory
.
getInstance
().
createService
(
CommonService
::
class
.
java
)
.
sendMsgCode
(
publicParamsMap
,
privateParamsMap
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
Any
?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
Any
?
>?)
{
callback
?.
invoke
(
true
)
}
override
fun
onFailure
(
result
:
HttpResult
<
Any
?
>?)
{
}
})
}
// 用户退出登录接口
// 用户退出登录接口
fun
userLogout
(
apiCallback
:
IUserLogoutCallBack
)
{
fun
userLogout
(
apiCallback
:
IUserLogoutCallBack
)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
timeStamp
=
System
.
currentTimeMillis
()
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/CommonService.kt
View file @
d5d2cb4e
...
@@ -51,12 +51,6 @@ interface CommonService {
...
@@ -51,12 +51,6 @@ interface CommonService {
@Body
requestParams
:
Map
<
String
,
String
?
>
@Body
requestParams
:
Map
<
String
,
String
?
>
):
Observable
<
HttpResult
<
Any
?
>>
):
Observable
<
HttpResult
<
Any
?
>>
@GET
(
URLs
.
sendMsgCode
)
fun
sendMsgCode
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
requestParams
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
@GET
(
URLs
.
mobileLogin
)
fun
mobileLogin
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
requestParams
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
@GET
(
URLs
.
userLogout
)
@GET
(
URLs
.
userLogout
)
fun
userLogout
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
requestParams
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
fun
userLogout
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
requestParams
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/http/PersonalRemoteDataSource.kt
View file @
d5d2cb4e
...
@@ -36,26 +36,6 @@ object PersonalRemoteDataSource {
...
@@ -36,26 +36,6 @@ object PersonalRemoteDataSource {
})
})
}
}
/**
* 获取短信验证码
*/
fun
getSmsCode
(
apiCallback
:
IPersonalGetSmsCodeCallBack
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
val
privateParamsMap
=
HttpParamsUtils
.
getPrivateParamsMap
(
requestParams
,
timeStamp
)
api
.
getSmsCode
(
publicParamsMap
,
privateParamsMap
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
Any
?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
Any
?
>?)
{
apiCallback
.
getSmsCodeSuccess
()
}
override
fun
onFailure
(
result
:
HttpResult
<
Any
?
>?)
{
}
})
}
/**
/**
* 校验短信验证码
* 校验短信验证码
*/
*/
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/http/PersonalService.kt
View file @
d5d2cb4e
...
@@ -12,7 +12,6 @@ interface PersonalService {
...
@@ -12,7 +12,6 @@ interface PersonalService {
private
companion
object
{
private
companion
object
{
const
val
accountList
=
"/merchant/enterprise/get_account_role_list"
const
val
accountList
=
"/merchant/enterprise/get_account_role_list"
const
val
changeRole
=
"/merchant/enterprise/change_role"
const
val
changeRole
=
"/merchant/enterprise/change_role"
const
val
sendMobileCode
=
"/sms/sms/send_code"
const
val
checkMobileCode
=
"/merchant/enterprise/check_mobile_code"
const
val
checkMobileCode
=
"/merchant/enterprise/check_mobile_code"
const
val
addUser
=
"/merchant/enterprise/add_user"
const
val
addUser
=
"/merchant/enterprise/add_user"
const
val
disassociate
=
"/merchant/enterprise/delete_life_user"
const
val
disassociate
=
"/merchant/enterprise/delete_life_user"
...
@@ -30,12 +29,6 @@ interface PersonalService {
...
@@ -30,12 +29,6 @@ interface PersonalService {
@GET
(
changeRole
)
@GET
(
changeRole
)
fun
getChangeManager
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
fun
getChangeManager
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
/**
* 变更管理员 发送短信,老管理员/新管理员
*/
@GET
(
sendMobileCode
)
fun
getSmsCode
(
@QueryMap
commonParams
:
Map
<
String
,
String
>,
@QueryMap
params
:
Map
<
String
,
String
?
>):
Observable
<
HttpResult
<
Any
?
>>
/**
/**
* 变更管理员 验证短信,老管理员/新管理员
* 变更管理员 验证短信,老管理员/新管理员
*/
*/
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/http/callback/IPersonalGetSmsCodeCallBack.kt
deleted
100644 → 0
View file @
0c01e0cd
package
com.yidian.shenghuoquan.newscontent.personnel.http.callback
interface
IPersonalGetSmsCodeCallBack
{
fun
getSmsCodeSuccess
()
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/AddStaffActivity.kt
View file @
d5d2cb4e
...
@@ -6,17 +6,20 @@ import com.yidian.bcommon.constant.XRouterPathConstants
...
@@ -6,17 +6,20 @@ import com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.bcommon.constant.XRouterPathConstants.Companion.PERSONAL_ADD_STAFF
import
com.yidian.bcommon.constant.XRouterPathConstants.Companion.PERSONAL_ADD_STAFF
import
com.yidian.bcommon.base.BaseActivity
import
com.yidian.bcommon.base.BaseActivity
import
com.yidian.bcommon.extensions.clickAntiShake
import
com.yidian.bcommon.extensions.clickAntiShake
import
com.yidian.bcommon.services.ZapServiceActionConstants
import
com.yidian.bcommon.services.ZapServiceNameConstants
import
com.yidian.bcommon.widget.EditTextInputCallback
import
com.yidian.bcommon.widget.EditTextInputCallback
import
com.yidian.bcommon.widget.PhoneNumberTextWatcher
import
com.yidian.bcommon.widget.PhoneNumberTextWatcher
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityAddStaffBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityAddStaffBinding
import
com.yidian.shenghuoquan.newscontent.personnel.http.PersonalRemoteDataSource
import
com.yidian.shenghuoquan.newscontent.personnel.http.PersonalRemoteDataSource
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalAddUserCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalAddUserCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalGetSmsCodeCallBack
import
com.yidian.bcommon.utils.CountDownTimerUtils
import
com.yidian.bcommon.utils.CountDownTimerUtils
import
com.yidian.bcommon.utils.TextWatcherAdapter
import
com.yidian.bcommon.utils.TextWatcherAdapter
import
com.yidian.utils.ToastUtil
import
com.yidian.utils.ToastUtil
import
com.yidian.xpage.XPageManager
import
com.yidian.xpage.XPageManager
import
com.yidian.yac.core.zap.ZapTicket
import
org.json.JSONObject
/**
/**
* 人员管理 —— 添加员工
* 人员管理 —— 添加员工
...
@@ -122,21 +125,22 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
...
@@ -122,21 +125,22 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
}
}
/**
/**
*
获取
验证码
*
请求短信
验证码
*/
*/
private
fun
requestSmsCode
(
mobile
:
String
)
{
private
fun
requestSmsCode
(
mobile
:
String
)
{
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
jsonObject
=
JSONObject
()
paramsMap
[
"mobile"
]
=
mobile
jsonObject
.
put
(
"mobile"
,
mobile
)
paramsMap
[
"scene"
]
=
"add_user"
jsonObject
.
put
(
"scene"
,
"add_user"
)
PersonalRemoteDataSource
.
getSmsCode
(
getSmsCodeCallBack
,
paramsMap
)
ZapTicket
(
ZapServiceNameConstants
.
GeneralAbilityServiceName
)
}
.
withAction
(
ZapServiceActionConstants
.
ActionRequestSmsCode
)
.
withServiceParams
(
jsonObject
)
private
val
getSmsCodeCallBack
=
object
:
IPersonalGetSmsCodeCallBack
{
.
onResult
{
result
->
// 请求成功开始倒计时
override
fun
getSmsCodeSuccess
()
{
if
(
result
.
result
as
Boolean
)
{
// 开始倒计时
mCountDownTimerUtils
.
start
()
mCountDownTimerUtils
.
start
()
}
}
}
.
ship
()
}
}
private
val
postAddUserCallBack
=
object
:
IPersonalAddUserCallBack
{
private
val
postAddUserCallBack
=
object
:
IPersonalAddUserCallBack
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/ManagerChangeActivity.kt
View file @
d5d2cb4e
...
@@ -16,6 +16,8 @@ import com.yidian.bcommon.constant.XRouterPathConstants.Companion.PERSONAL_MANAG
...
@@ -16,6 +16,8 @@ import com.yidian.bcommon.constant.XRouterPathConstants.Companion.PERSONAL_MANAG
import
com.yidian.bcommon.base.BaseActivity
import
com.yidian.bcommon.base.BaseActivity
import
com.yidian.bcommon.extensions.clickAntiShake
import
com.yidian.bcommon.extensions.clickAntiShake
import
com.yidian.bcommon.extensions.initTitleBar
import
com.yidian.bcommon.extensions.initTitleBar
import
com.yidian.bcommon.services.ZapServiceActionConstants
import
com.yidian.bcommon.services.ZapServiceNameConstants
import
com.yidian.bcommon.widget.EditTextInputCallback
import
com.yidian.bcommon.widget.EditTextInputCallback
import
com.yidian.bcommon.widget.PhoneNumberTextWatcher
import
com.yidian.bcommon.widget.PhoneNumberTextWatcher
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
...
@@ -24,7 +26,6 @@ import com.yidian.shenghuoquan.newscontent.databinding.ActivityManagerChangeBind
...
@@ -24,7 +26,6 @@ import com.yidian.shenghuoquan.newscontent.databinding.ActivityManagerChangeBind
import
com.yidian.shenghuoquan.newscontent.personnel.http.PersonalRemoteDataSource
import
com.yidian.shenghuoquan.newscontent.personnel.http.PersonalRemoteDataSource
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalChangeAccountCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalChangeAccountCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalCheckSmsCodeCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalCheckSmsCodeCallBack
import
com.yidian.shenghuoquan.newscontent.personnel.http.callback.IPersonalGetSmsCodeCallBack
import
com.yidian.shenghuoquan.newscontent.ui.dialog.HintDialog
import
com.yidian.shenghuoquan.newscontent.ui.dialog.HintDialog
import
com.yidian.bcommon.utils.CountDownTimerUtils
import
com.yidian.bcommon.utils.CountDownTimerUtils
import
com.yidian.bcommon.utils.StorageUtil
import
com.yidian.bcommon.utils.StorageUtil
...
@@ -32,6 +33,8 @@ import com.yidian.bcommon.utils.TextWatcherAdapter
...
@@ -32,6 +33,8 @@ import com.yidian.bcommon.utils.TextWatcherAdapter
import
com.yidian.bcommon.webview.PublicWebViewActivity
import
com.yidian.bcommon.webview.PublicWebViewActivity
import
com.yidian.utils.ToastUtil
import
com.yidian.utils.ToastUtil
import
com.yidian.xpage.XPageManager
import
com.yidian.xpage.XPageManager
import
com.yidian.yac.core.zap.ZapTicket
import
org.json.JSONObject
/**
/**
* 人员管理 —— 管理员变更
* 人员管理 —— 管理员变更
...
@@ -192,13 +195,22 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -192,13 +195,22 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
}
}
/**
/**
*
获取
验证码
*
请求短信
验证码
*/
*/
private
fun
requestSmsCode
(
mobile
:
String
)
{
private
fun
requestSmsCode
(
mobile
:
String
)
{
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
jsonObject
=
JSONObject
()
paramsMap
[
"mobile"
]
=
mobile
jsonObject
.
put
(
"mobile"
,
mobile
)
paramsMap
[
"scene"
]
=
"enterprise"
jsonObject
.
put
(
"scene"
,
"enterprise"
)
PersonalRemoteDataSource
.
getSmsCode
(
getSmsCodeCallBack
,
paramsMap
)
ZapTicket
(
ZapServiceNameConstants
.
GeneralAbilityServiceName
)
.
withAction
(
ZapServiceActionConstants
.
ActionRequestSmsCode
)
.
withServiceParams
(
jsonObject
)
.
onResult
{
result
->
// 请求成功开始倒计时
if
(
result
.
result
as
Boolean
)
{
mCountDownTimerUtils
.
start
()
}
}
.
ship
()
}
}
private
fun
updateChangeButton
()
{
private
fun
updateChangeButton
()
{
...
@@ -241,14 +253,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -241,14 +253,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
}
}
private
val
getSmsCodeCallBack
=
object
:
IPersonalGetSmsCodeCallBack
{
override
fun
getSmsCodeSuccess
()
{
// 开始倒计时
mCountDownTimerUtils
.
start
()
}
}
private
val
getCheckOldSmsCodeCallBack
=
object
:
IPersonalCheckSmsCodeCallBack
{
private
val
getCheckOldSmsCodeCallBack
=
object
:
IPersonalCheckSmsCodeCallBack
{
override
fun
checkSmsCodeSuccess
()
{
override
fun
checkSmsCodeSuccess
()
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/service/LifeNumberListService.kt
View file @
d5d2cb4e
...
@@ -31,7 +31,7 @@ class LifeNumberListService : ZapService() {
...
@@ -31,7 +31,7 @@ class LifeNumberListService : ZapService() {
params
as
JSONObject
params
as
JSONObject
when
(
action
)
{
when
(
action
)
{
ZapServiceActionConstants
.
ActionRequestList
->
requestLifeNumberList
()
ZapServiceActionConstants
.
ActionRequestList
->
requestLifeNumberList
()
ZapServiceActionConstants
.
ActionRequestSmsCode
->
requestSmsCode
(
params
)
//
ZapServiceActionConstants.ActionRequestSmsCode -> requestSmsCode(params)
ZapServiceActionConstants
.
ActionClearAuthenticationData
->
clearAuthenticationData
()
ZapServiceActionConstants
.
ActionClearAuthenticationData
->
clearAuthenticationData
()
}
}
}
}
...
@@ -103,22 +103,6 @@ class LifeNumberListService : ZapService() {
...
@@ -103,22 +103,6 @@ class LifeNumberListService : ZapService() {
}
}
/**
* 请求短信验证码
*/
private
fun
requestSmsCode
(
params
:
JSONObject
)
{
val
mobile
=
params
.
optString
(
"mobile"
)
val
scene
=
params
.
optString
(
"scene"
)
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
paramsMap
[
"scene"
]
=
scene
ApiService
.
sendMsgCode
(
paramsMap
)
{
if
(
it
)
{
resolver
.
success
(
true
)
}
}
}
/**
/**
* 清除内存中的认证数据
* 清除内存中的认证数据
*/
*/
...
...
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