changed the getSn and visual func

This commit is contained in:
zhongchao
2021-05-27 21:13:36 +08:00
parent aecdc24636
commit 504fc47132
54 changed files with 216 additions and 192 deletions

View File

@@ -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) }
}

View File

@@ -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) }
}
}