package com.xueyi.system.api.digitalmans.feign;

import com.xueyi.common.core.constant.basic.SecurityConstants;
import com.xueyi.common.core.constant.basic.ServiceConstants;
import com.xueyi.common.core.web.result.R;
import com.xueyi.message.api.transfer.domain.vo.DmActiveVo;
import com.xueyi.system.api.digitalmans.domain.dto.DmManDeviceDto;
import com.xueyi.system.api.digitalmans.domain.dto.DmSkillDto;
import com.xueyi.system.api.digitalmans.domain.po.DmManDevicePo;
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 *
 * @author yrx
 */
@FeignClient(contextId = "remoteManDeviceService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteManDeviceService {

    /**
     * 新增用户
     * @param devId         设备id
     * @return 结果
     */
    @GetMapping("/manDevice/inner/info/{devId}")
    R<DmManDeviceDto> manDeviceInfoInner(@RequestParam(value = "devId") String devId);

    @PostMapping(value = "/manDevice/inner/sync")
    R<Integer> manDeviceListInnerSync(@RequestParam(value = "tenantId") Long tenantId);

    @PutMapping(value = "/manDevice/inner/info")
    R<Integer> manDeviceInfoInnerUpdate(@RequestBody DmActiveVo vo);

    @PostMapping(value = "/manDevice/inner/sync_numbers_of_online")
    R<Integer> syncNumbersOfOnline();

}