package com.yuchen.saas.visitor.api.feign;

import com.yuchen.saas.visitor.api.entity.NewPmgBatParkVisitor;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName VisitorClient
 * @Description 访客 feign 接口
 * @Author 张逸飞
 * @Date 2022/6/16 15:50
 */
@FeignClient(
		value = AppNameConstant.SAAS_VISITOR,
		fallback = NewVisitorClientFallback.class
)
public interface NewVisitorClient {

	/**
	 * 访客申请
	 * @param newPmgBatParkVisitor 访客申请
	 * @return
	 */
	@PostMapping("/visitor/visitorRequest")
	R visitorRequest(NewPmgBatParkVisitor newPmgBatParkVisitor);

	/**
	 * 获取访客提交的信息
	 * @param id 访客提交的信息ID
	 * @return
	 */
	@GetMapping("/visitor/getById")
	R getVisitor(@RequestParam("id") Long id);

	/**
	 * 访客申请分页
	 * @param payUserId 移动端用户ID
	 * @param current 当前页
	 * @param size 分页数量
	 * @return
	 */
	@GetMapping("/visitor/getPageVisitor")
    R getPageVisitor(@RequestParam String payUserId,
					 @RequestParam Integer current,
					 @RequestParam Integer size);
}
