changed the getSn and visual func
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.authorize.authprovider.launcher
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.mogo.commons.network.Utils.getSn
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.module.authorize.model.BaseResponse
|
||||
import com.mogo.module.authorize.model.IMogoAuthorizeModel
|
||||
import com.mogo.module.authorize.model.bean.UpdateAuthorize
|
||||
@@ -10,7 +10,7 @@ class MogoAuthorizeMainModel : IMogoAuthorizeModel() {
|
||||
|
||||
suspend fun updateAuthorize(agrId: Long, agreementStatus: Int): BaseResponse<Any> {
|
||||
val updateAuthorize = Gson().toJson(UpdateAuthorize(agrId, agreementStatus))
|
||||
val map = mapOf("sn" to getSn(), "data" to updateAuthorize)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to updateAuthorize)
|
||||
return apiCall { getNetWorkApi().updateAuthorize(map) }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.module.authorize.model
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.mogo.commons.network.Utils.getSn
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.module.authorize.model.bean.AgreementData
|
||||
import com.mogo.module.authorize.model.bean.AgreementStatus
|
||||
import com.mogo.module.authorize.model.bean.RequestUserAgreement
|
||||
@@ -14,13 +14,13 @@ open class IMogoAuthorizeModel : BaseRepository() {
|
||||
|
||||
suspend fun invokeAuthorizeContent(agreementType: Int, needContent: Boolean = false): BaseResponse<AgreementData> {
|
||||
val requestUserAgreement = Gson().toJson(RequestUserAgreement(agreementType, needContent))
|
||||
val map = mapOf("sn" to getSn(), "data" to requestUserAgreement)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to requestUserAgreement)
|
||||
return apiCall { getNetWorkApi().getAuthorizeContent(map) }
|
||||
}
|
||||
|
||||
suspend fun invokeIfNeedAuthorize(agreementType: Int): BaseResponse<AgreementStatus> {
|
||||
val requestUserAgreement = Gson().toJson(RequestUserAgreement(agreementType))
|
||||
val map = mapOf("sn" to getSn(), "data" to requestUserAgreement)
|
||||
val map = mapOf("sn" to MoGoAiCloudClientConfig.getInstance().sn, "data" to requestUserAgreement)
|
||||
return apiCall { getNetWorkApi().checkIfNeedAuthorize(map) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user