package com.xunmei.system.api;

import com.xunmei.common.core.constant.ServiceNameConstants;
import com.xunmei.common.core.domain.R;
import com.xunmei.common.core.web.domain.AjaxResult;
import com.xunmei.system.api.factory.RemoteTaskFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

@FeignClient(contextId = "remoteTaskService", value = ServiceNameConstants.CORE_SERVICE, fallbackFactory = RemoteTaskFallbackFactory.class)
public interface RemoteTaskService {
    /**
     * 执行每日每小时履职任务生成任务
     *
     * @return
     */
    @GetMapping("/task/dayTask")
    R<AjaxResult> dayTask();

    /**
     * 每周履职任务生成任务
     *
     * @return
     */
    @GetMapping("/task/weekTask")
    R<AjaxResult> weekTask();

    /**
     * 每月，每季，每半年，每年履职任务生成任务
     *
     * @return
     */
    @GetMapping("/task/monthTask")
    R<AjaxResult> monthTask();
}
