/**
 * @description: 商家中心
 * @return {*}
 * @param {}-
 */
import request from "../request";


const merchant = {
    /**
     * 获取门店营业状态
     */
    get_stores: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/GetStores', 'GET', params)
    },


    /**
     * @desc 多用型接口
     * 设置门店营业 休息
     * 切换未拣货提醒方式
     * 修改印业资质
     */
    update_store: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/UpdateStore', 'PUT', params)
    },


    // /**
    //  * 修改线上淘鲜达时间
    //  */
    // update_txd_store: async (params: AnyObject): Promise<AnyObject> => {
    //     return await request.api('/v2/store/UpdateTxdStore', 'POST', params)
    // },


    /**
     * 更新平台营业状态 线上
     */
    update_vendors_store_states: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/UpdateVendorStoreBussinessStatus', 'POST', params)
    },


    /**
     * @desc 修改门店映射信息
     * @param {object} params 请求参数  storeID int 门店ID  vendorID  int 厂商ID 
     */
     update_store_vendor_map: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/UpdateStoreVendorMap','PUT',params)
    },


    /**
     * 查询是否有新账单
     */
    get_store_bills: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/financial/GetStoreBills', 'GET', params)
    },


    /**
     * 获取门店今日完成实时数据
     */
    get_store_order_sale_info: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/order/GetStoresOrderSaleInfo', 'GET', params, 30000)
    },


    /**
     * 获取用户注册时间
     */
    get_self_info: async (params?: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/user2/GetSelfInfo', 'GET', params)
    },


    /**
     * 获取调价包
     */
    query_configs: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/cms/QueryConfigs', "GET", params)
    },


    /**
     * 修改调价包
     */
    update_store_price_pack: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/UpdateStorePricePack', "PUT", params)
    },


    /**
     * 获取差评数量
     */
    tmp_get_jx_bad_comments_no: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/TmpGetJxBadCommentsNo', 'GET', params)
    },


    /**
     * 获取评论
     */
    Tmp_get_jx_bad_comments_by_storeId: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/TmpGetJxBadCommentsByStoreId', 'GET', params)
    },


    /**
     * 获取店铺评分
     */
    get_weekly_store_score: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/GetWeeklyStoreScore', 'GET', params)
    },


    /**
     * 获取待配商品
     */
    get_order_ders_accept: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/order/GetOrdersAccept', 'GET', params)
    },


    /**
     * 通过skuID skuName 获取商品
     */
    get_stores_skus: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/sku/GetStoresSkus', "GET", params)
    },


    /**
     * 获取信息通知
     */
    Get_store_message_statuses: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/msg/GetStoreMessageStatuses', 'GET', params)
    },


    /**
     * 获取信息详情
     */
    get_store_messages: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/msg/GetStoreMessages', 'GET', params)
    },


    /**
     * 修改信息为已读
     */
    read_store_message: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/msg/ReadStoreMessage', 'PUT', params)
    },


    /**
     * 获取门店活动信息
     */
    query_acts: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/act/QueryActs', 'GET', params)
    },


    /**
    * 获取打印机能识别的数据
    */
    get_order_sku_info: async (params: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/order/GetOrderSkuInfo', 'GET', params)
    },


    /**
     * 判断蓝牙打印机是否需要打印标题
     */
    get_brands: async (prams: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/store/GetBrands', 'GET', prams)
    },


    /**
     * 修改打印状态为 true
     */
    set_order_print_status: async (prams: AnyObject): Promise<AnyObject> => {
        return await request.api('/v2/order/SetOrderPrintStatus', 'PUT', prams)
    },


    /**
     * 清空打印队列
     */
    delete_printer_seq: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/DeletePrinterSeq', 'POST', params)
    },


    /**
     * 扫码绑定易联云
     */
    bind_net_printer: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/BindPrinter', 'POST', params)
    },


    /**
     * 获取七牛云TOKEN
     */
    get_qiniu_upload_token: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/cms/GetQiniuUploadToken', 'GET', params)
    },


    /**
     * 扫码进店，获取当前门店的二维码
     */
    get_weixin_unlimited: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/event/GetWeixinUnlimited', 'POST', params)
    },


    /**
     * 获取app版本号
     */
    get_app_varsion: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/version/GetVersionController', 'GET', params)
    },


    /**
     * 获取门店信息
     */
    get_store_vendor_maps: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/store/GetStoreVendorMaps', 'GET', params)
    },

    /**
     * 查询美团门店IM单聊开关状态
     * @return {string} appPoiCode:美团门店id
     */
    get_mt_store_im_status: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/GetPoiIMStatus', 'GET', params)
    },


    /**
     * 设置美团门店IM线上状态
     * @param {object} params 请求参数
     * @return {object} appPoiCode:美团门店id  imStatus:状态 0-关闭 1-开启
     */
    set_mt_store_im_status: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/SetPoiIMStatus', 'POST', params)
    },


    /**
     * 查询远端门店的营业状态
     * @param {object} params 请求参数
     */
    get_vendor_store:async(params:AnyObject): Promise<AnyObject> =>{
        return request.api('/v2/store/GetVendorStore', 'GET', params)
    }
}


export default merchant