package com.yuchen.saas.park.api.feign.service;

import com.yuchen.saas.park.api.entity.park.PmgBatParkPeople;
import com.yuchen.saas.park.api.entity.park.PmgBatPeopleType;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/11/15 15:18
 * @Description: 人员信息操作
 * @Version: 1.0
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARK,
        fallbackFactory = ParkPeopleFeignServiceFallback.class
)
public interface ParkPeopleFeignService {

    @PostMapping("/parkPeoples/savePeople")
    R savePeople(@RequestBody PmgBatParkPeople pmgBatParkPeople);


    @GetMapping("/parkPeoples/getByPhone")
    PmgBatParkPeople getByPhone(@RequestParam String phone);

    @GetMapping("/parkPeoples/getById")
    PmgBatParkPeople getById(@RequestParam("id") Long id);

    /**
     * 同步 hik isc 人员信息（火炬园区-旧ISC）
     *
     * @return
     */
    @GetMapping("/parkPeoples/syncPeopleInfo")
    R syncPeopleInfo();


    /**
     * 人员类型
     *
     * @return
     */
    @GetMapping("/peopleType/detail")
    R<PmgBatPeopleType> peopleTypeDetail(@SpringQueryMap PmgBatPeopleType pmgBatPeopleType);

}