package com.bc_chat.bc_base.task

import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
import com.google.gson.JsonObject
import com.zhaohaoting.framework.abs.entity.ResultEntity
import com.zhaohaoting.framework.abs.task.RxDataAsyncTask
import io.reactivex.Flowable

/**
 * author：Created by zhaohaoting on 2019/9/6
 * email：526309416@qq.com
 * desc：
 */
class ApplyWithdrawTask(val amount: String
                        , var user_account: String
                        , var platform_name: String
                        , val info: String
                        , val withdraw_desc: String?
) : RxDataAsyncTask<JsonObject, ResultEntity<JsonObject>>() {
    override fun loadDataAsyncTask(): Flowable<ResultEntity<JsonObject>>? {
        val params: MutableMap<String, Any?> = mutableMapOf(
                "amount" to amount
                , "user_account" to user_account
                , "platform_name" to platform_name
                , "info" to info
                , "withdraw_desc" to withdraw_desc
        )
        return RetrofitHelper.api.withdraw(Encryption.encryption(params))
    }
}
