package com.ruoyi.business.api;

import com.ruoyi.business.api.factory.RemoteBusinessFallbackFactory;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(contextId = "remoteBusinessService", value = ServiceNameConstants.BUSINESS_SERVICE, fallbackFactory = RemoteBusinessFallbackFactory.class)
public interface RemoteBusinessService {

    /**
     * 通过用户名查询用户信息
     *
     * @param days 几天前的
     * @return 结果
     */
    @GetMapping("/device/computeOnlineDevicecCount/{days}")
    public R<?> computeOnlineDevicecCount(@PathVariable("days") int days);
}
