package jnpf.exam;

import jnpf.base.ActionResult;
import jnpf.exam.fallback.V2CultivateTimingApiFallback;
import jnpf.util.NoDataSourceBind;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "jnpf-ftb", fallback = V2CultivateTimingApiFallback.class, path = "/v2/cultivate/timing")
public interface V2CultivateTimingApi {


    /**
     * 培训相关每分钟执行
     *
     * @return 响应
     */
    @NoDataSourceBind
    @GetMapping("/per-minute")
    ActionResult<Integer> perMinute(@RequestParam("tenantId") String tenantId);

    /**
     * 每小时执行
     *
     * @param tenantId 租户ID
     * @return 响应
     */

    @NoDataSourceBind
    @GetMapping("/per-hour")
    ActionResult<Integer> perHour(@RequestParam("tenantId") String tenantId);

    /**
     * 每半个小时执行
     *
     * @param tenantId 租户ID
     * @return 响应
     */
    @NoDataSourceBind
    @GetMapping("/per-half-hour")
    ActionResult<Integer> perHalfHour(@RequestParam("tenantId") String tenantId);
}
