package com.xunmei.system.api;

import com.xunmei.common.core.constant.SecurityConstants;
import com.xunmei.common.core.constant.ServiceNameConstants;
import com.xunmei.common.core.domain.R;
import com.xunmei.common.core.utils.Ymd;
import com.xunmei.system.api.domain.SysWorkTime;
import com.xunmei.system.api.factory.RemoteLogFallbackFactory;
import com.xunmei.system.api.factory.RemoteUserFallbackFactory;
import com.xunmei.system.api.factory.RemoteWorkTimesFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteWorkTimeService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteWorkTimesFallbackFactory.class)
public interface RemoteWorkTimeService {
    @GetMapping("/work/time/findOrgIdsByYmd")
    R<List<Long>> findOrgIdsByYmd(@RequestParam("toYmd") String toYmd, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/work/time/findWorkTimeByYmd")
    R<SysWorkTime> findWorkTimeByYmd(@RequestBody Ymd ymd);
    @PostMapping("/work/time/existByYmd")
    R<Boolean> existByYmd(@RequestBody Ymd ymd);

}
