package com.sckw.fleet.api.feign;

import com.sckw.core.web.response.HttpResult;
import com.sckw.fleet.api.model.dto.DriverScoreQuery;
import com.sckw.fleet.api.model.dto.UpdateDriverScoreDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "sckw-ng-fleet")
public interface DriverScoreFeignService {
    /**
     * 更新司机评分
     */
    @PostMapping("/driverScore/update")
    public HttpResult update(@Validated @RequestBody UpdateDriverScoreDto updateDriverScoreDto);

    /**
     * 统计司机数量
     */
    @PostMapping("/kwfDriver/countDriver")
    public HttpResult countDriver(@RequestParam("entId") Long entId);

    /**
     * 统计指定物流企业所有司机总分
     */
    @PostMapping("/driverScore/countDriverScore")
    public HttpResult countDriverScore(@Validated @RequestBody DriverScoreQuery query);
 }

