# -*- coding: utf-8 -*-
import logging

from joyhub_backend.library.joyhub_interface import JoyhubInterface


class JoyhubBusiness(JoyhubInterface):
    def get_video_label_list(self):
        logging.info("==========获取视频标签列表==========")
        body = {
            "page": 1,
            "limit": 10,
            "sort": "id",
            "label_name": "",
            "category_id": 0,
            "video_type": 0,
            "video_num": 0,
            "created_at": [],
            "order": "descending",
        }
        return self.request("获取视频标签列表", "POST", "admin/video/getVideoLabelList", body=body)

    def get_video_category_list(self):
        logging.info("==========获取视频分类列表==========")
        body = {
            "page": 1,
            "limit": 10,
            "sort": "id",
            "category_name": "",
            "order": "descending",
        }
        return self.request("获取视频分类列表", "POST", "admin/video/getVideoCategoryList", body=body)

    def get_exchange_record_list(self):
        logging.info("==========兑换记录列表==========")
        body = {
            "page": 1,
            "limit": 10,
            "status": "",
            "goods_type": "",
            "created_at": [],
        }
        return self.request("兑换记录列表", "POST", "admin/exchange/recordList", body=body)

    def get_app_feedback_list(self):
        logging.info("==========app反馈意见列表==========")
        body = {
            "page": 1,
            "limit": 10,
            "status": "",
            "keyword": "",
        }
        return self.request("app反馈意见列表", "POST", "admin/feedback/list", body=body)

    def get_sensitive_word_list(self):
        logging.info("==========敏感词列表==========")
        body = {
            "page": 1,
            "limit": 10,
            "keyword": "",
        }
        return self.request("敏感词列表", "POST", "admin/sensitiveWord/list", body=body)
