package com.bc_chat.circle.dataSource

import com.bc_chat.bc_base.entity.contact.Comment
import com.bc_chat.bc_base.entity.contact.CommentModel
import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
import com.zhaohaoting.framework.abs.datasource.RxDataSource
import com.zhaohaoting.framework.abs.entity.ResultEntity
import io.reactivex.Flowable
import java.util.*

/**
 * author：Created by zhaohaoting on 2019/2/27
 * email：526309416@qq.com
 * desc：联系人列表
 */
class CommentDataSource(val cid: String) : RxDataSource<Comment, CommentModel>() {

    override fun loadListFromNetWork(params: HashMap<String, Any?>): Flowable<ResultEntity<CommentModel>> {
        params.put("cid", cid)
        return RetrofitHelper.api.getComment(Encryption.encryption(params))
    }

    override fun hasMore(): Boolean {
        return false
    }
}
