import { RootObject, RootWeatherObject } from '@/model/rootObject'
import { Users, CompanyModel, OutherWeather, SpaceModel } from '@/model/userModel'
import { https } from '@/utils/https'
import { RequestParams, ContentType, Method } from 'axios-mapper'
import { setQueryConfig, getUserInfo } from '@/utils'

import { duoduoenvService } from '@/config'

// const comInfo: any = {}
// comInfo.userId = getUserInfo().userId
// comInfo.projectId = getUserInfo().projectId
// const comParams: string = ''

//查询 今日新增 排名
export const queryTotalIntegral = (params: any) => {
  return https().request<any>(`${duoduoenvService}userIntegral/queryUserMessage?${params}`, Method.GET, undefined, ContentType.json)
}

// 查询空调使用统计
export const queryPortraitTempUserTotal = () => {
  return https().request<any>(`${duoduoenvService}userPortrait/portraitTemp/queryPortraitTempUserTotal`, Method.GET, undefined, ContentType.json)
}

// 灯的使用统计
export const queryTotalPortraitLight = () => {
  return https().request<any>(`${duoduoenvService}userPortrait/portraitLight/queryTotalPortraitLight`, Method.GET, undefined, ContentType.json)
}
/**
 * 空调统计数据 chart详情
 */
export const queryPortraitTempUserDetail = (params: any) => {
  return https().request<any>(`${duoduoenvService}userPortrait/portraitTemp/queryPortraitTempUserDetail`, Method.POST, params, ContentType.json)
}

/**
 * 获取季节类型
 * @param params
 */
export const getSeasonBySeasonDate = (params: any) => {
  return https().request<any>(`${duoduoenvService}custom/getSeasonBySeasonDate?${params}`, Method.GET, undefined, ContentType.json)
}

/**
 * 开灯使用统计图
 */
export const queryPortraitLightUser = (params: any) => {
  return https().request<any>(`${duoduoenvService}userPortrait/portraitLight/queryPortraitLightUser`, Method.POST
    , params, ContentType.json)
}

/**
 * 获取用户积分&获取用户的节能排名
 */
export const queryAllIntegral = (params: any) => {
  return https().request<any>(`${duoduoenvService}userIntegral/query`, Method.POST, params, ContentType.json)
}

/**
 * 获取用户的节能排名
 */
export const queryIntegralRank = (params: any) => {
  return https().request<any>(`${duoduoenvService}userIntegral/query`, Method.POST, params, ContentType.json)
}

/**
 * 开关调节记录
 * @param params
 */
export const lightFeedbackQuery = (params: any) => {
  return https().request<any>(`${duoduoenvService}custom/feedback/light/query`, Method.POST, params, ContentType.json)
}

/**
 *
 *空调调节记录
 * @param params
 */
export const tempFeedbackQuery = (params: any) => {
  return https().request<any>(`${duoduoenvService}custom/feedbackQuery`, Method.POST, params, ContentType.json)
}

/**
 * 判断模块的显示和隐藏
 */
export const queryPortraitModule = () => {
  return https().request<any>(`${duoduoenvService}userPortrait/queryPortraitModuleList`, Method.GET, undefined, ContentType.json)
}





