package com.bc_chat.bc_base.http

import com.bc_chat.bc_base.BuildConfig
import com.bc_chat.bc_base.entity.*
import com.bc_chat.bc_base.entity.contact.*
import com.bc_chat.bc_base.entity.group.Forbidden
import com.bc_chat.bc_base.entity.group.Group
import com.bc_chat.bc_base.entity.group.MemberBean
import com.bc_chat.bc_base.entity.wallet.*
import com.google.gson.JsonObject
import com.zhaohaoting.framework.abs.entity.ResultEntity
import io.reactivex.Flowable
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * author：Created by zhaohaoting on 2019/2/27
 * email：526309416@qq.com
 * desc：
 */
interface Api {

    companion object {
        const val PARENT_PATH = "index.php/"
        const val SHARE_PATH = BuildConfig.BaseUrl + "Public/Share/app.html"
    }

    //登录
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/login")
    fun login(@FieldMap map: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //网页
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/aboutUs")
    fun webPage(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<String>>

    //找回密码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/getPassword")
    fun resetPassword(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //修改密码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/changePassword")
    fun modifyPassword(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //注册
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/register")
    fun register(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //发送验证码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/sendCode")
    fun sendCode(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //验证验证吗
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/checkCode")
    fun varfiyCode(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //好友列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/friendList")
    fun getFriendList(@FieldMap map: MutableMap<String, Any?>): Flowable<ResultEntity<List<Contacts>>>

    //好友列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/friendList")
    fun getChooseFriendList(@FieldMap map: MutableMap<String, Any?>): Flowable<ResultEntity<List<UserInfo>>>

    //群组列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/getGroupList")
    fun getGroupList(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<List<Group>>>

    //建群
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/createRoom")
    fun createGroup(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //将用户加入指定群组
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/addUser")
    fun addGroupMember(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //退出群组方法
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/quit")
    fun exitGroup(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //解散群
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/dismiss")
    fun dissolutionGroup(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //修改群昵称
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/changeName")
    fun modifyGroupNick(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //查询群成员
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/queryUser")
    fun queryGroupMember(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<ListModel<MemberBean>>>

    //踢出群组方法
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/kickOut")
    fun kickoutGroupMember(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //举报
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/userReport")
    fun report(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //获取用户信息
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/getPersonalData")
    fun getUserInfo(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<User>>

    //群名片
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setUserRemark")
    fun groupMemberRemark(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //添加好友
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/addFriend")
    fun addFriend(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //黑名单
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/userBlock")
    fun black(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //删除好友
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/delFriend")
    fun deleteUser(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //备注设置
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/setUserRemark")
    fun setRemark(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //电话号码搜索
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/searchUser")
    fun phoneSearchFriend(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //群信息
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/getGroupInfo")
    fun groupInfo(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<Group>>

    //群信息修改
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setGroup")
    fun setGroupInfo(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //科邀请群成员
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/friendListTOGroup")
    fun groupInvite(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<List<MemberBean>>>

    //添加群管理
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/addGroupManagement")
    fun addGroupManagement(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //转让群
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setManager")
    fun assignment(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //设置群主消息置顶
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setTop")
    fun lordNoticeTop(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //禁言
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setBanned")
    fun forbidden(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //移除管理员
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/delManager")
    fun deleteAdmin(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //收藏列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/collectionList")
    fun collectList(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<ListModel<Collect>>>

    //收藏
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/collection")
    fun collection(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //移除收藏
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/delCollection")
    fun delCollection(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //解除禁言群成员
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/rollBackGagUser")
    fun delForbiddenMember(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //禁言群成员
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/addGagUser")
    fun forbiddenMember(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //用户通知
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/setUserType")
    fun userNotice(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //反馈
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/feedback")
    fun feedback(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //启动图片
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/getImg")
    fun splashPic(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<ArrayList<SplashImage>>>

    //用户资料修改
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/savePersonalData")
    fun savePersonalData(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //禁言列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Message/bannedList")
    fun forbiddenMemberList(@FieldMap params: MutableMap<String, Any?>): Flowable<ResultEntity<List<Forbidden>>>

    //动态列表
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/index")
    fun getDynamicList(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<Dynamic>>>

    //发布动态
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/add")
    fun releaseTopic(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //评论详情
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/detail")
    fun getComment(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<CommentModel>>

    //评论
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/comment")
    fun comment(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //关注
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/focus")
    fun like(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //朋友圈用户详情
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/userDetail")
    fun getUserCircle(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<UserCircleDetailModel>>

    //我的贴子
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/cardList")
    fun getMineTopic(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<Dynamic>>>

    //我的粉丝/关注
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Me/focusOrFans")
    fun getMineFansOrFollow(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<Fans>>>

    //评论我的/回复我的
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/commentList")
    fun getCommentMineList(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<CommentMine>>>

    //删除评论
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/commentDelete")
    fun deleteComment(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/getAppVersion")
    fun versonUpdate(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<ApkVersion>>

    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Circle/listOfWinning")
    fun hudgens(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<Hudgens>>>?

    //是否设置支付密码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/isSetPayKey")
    fun isSetPayKey(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //设置支付密码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/setPayKey")
    fun setPayKey(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //修改支付密码
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/editPayKey")
    fun editPayKey(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //钱包
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/getAccountMoney")
    fun getAccountMoney(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<WalletEntity>>

    //发送红包
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Redpacket/sendRedPacket")
    fun sendRedPacket(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<SendRedPacketEntity>>

    //打开红包
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Redpacket/takeRedPacket")
    fun takeRedPacket(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<OpenRedPacketEntity>>

    //单聊红包详情
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Redpacket/redPacketDetail")
    fun redPacketDetail(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<ChatRedPacketDetailEntity>>

    //群聊红包详情
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Redpacket/redPacketDetail")
    fun mucRedPacketDetail(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<MucRedPacketDetailEntity>>

    //红包是否已领取
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Redpacket/isTakeRedPacket")
    fun isTakeRedPacket(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    //获取最新公告
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Notice/getLastestNotice")
    fun getLastestNotice(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<NoticeEntity>>

    //获取导航信息
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Main/getNavData")
    fun getNavData(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<NavEntity>>>

    //我的红包记录
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/User/myRedPacketLog")
    fun myRedPacketLog(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<RedPacketRecordEntity>>>

    //提现
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Pay/withdraw")
    fun withdraw(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>

    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/Pay/myWithdrawLog")
    fun myWithdrawLog(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<WithdrawRecordBean>>>

    //好友申请记录
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/message/applyFriendList")
    fun applyFriendList(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<List<FriendApplyRecordBean>>>

    //处理好友申请
    @FormUrlEncoded
    @POST(value = PARENT_PATH + "Home/message/handleFriendApply")
    fun handleFriendApply(@FieldMap encryption: MutableMap<String, Any?>): Flowable<ResultEntity<JsonObject>>


}

