package com.bc_chat.bc_base.task

import com.bc_chat.bc_base.entity.wallet.RedPacketRecordEntity
import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
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 RedPacketRecordTask(var type: Int
                          , var page_num: Int
                          , var page_size: Int) : RxDataAsyncTask<List<RedPacketRecordEntity>, ResultEntity<List<RedPacketRecordEntity>>>() {
    override fun loadDataAsyncTask(): Flowable<ResultEntity<List<RedPacketRecordEntity>>>? {
        val params: MutableMap<String, Any?> = mutableMapOf(
                "type" to type
                , "page_num" to page_num
                , "page_size" to page_size
        )
        return RetrofitHelper.api.myRedPacketLog(Encryption.encryption(params))
    }
}
