package com.yida.data.server.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.server.dto.DisturbDTO;
import com.yida.data.server.dto.WhiteListDTO;
import com.yida.data.server.fallback.RemoteCardOperationServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = FebsServerConstant.EDU_CARD_SERVER, contextId = "operationServiceClient",
        fallbackFactory = RemoteCardOperationServiceFallback.class)
public interface RemoteCardOperationService {

    /**
     * 更新白名单
     *
     * @param dto
     * @return
     */
    @PostMapping("/in/operation/whiteList")
    ResultBean whiteList(@RequestBody WhiteListDTO dto);

    /**
     * 更新免打扰设置
     *
     * @param dto
     * @return
     */
    @PostMapping("/in/operation/disturbTime")
    ResultBean disturbTime(@RequestBody DisturbDTO dto);

    /**
     * 立即定位
     *
     * @param imei
     * @return
     */
    @PostMapping("/in/operation/nowLocation")
    ResultBean nowLocation(@RequestParam("imei") String imei);
}
