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

import com.yuchen.saas.park.api.dto.repair.PmgBatRepairRecordDTO;
import com.yuchen.saas.park.api.vo.repair.PmgBatRepairRecordAppVO;
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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author 蔡文强
 * @Date 2023/6/25 15:56
 * @Description 用户提交报修记录远程调用
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARK,
        fallbackFactory = PmgBatRepairRecordFeignServiceFallback.class
)
public interface PmgBatRepairRecordFeignService {

    /**
     * 小程序->提交报修
     */
    @PostMapping("/repair/record/save")
    R<Boolean> saveRepairRecord(@RequestBody @Validated PmgBatRepairRecordDTO repairRecordDTO);

    /**
     * 小程序->我提交的报修记录
     */
    @GetMapping("/repair/record/mylist")
    R<List<PmgBatRepairRecordAppVO>> getMyRepairRecordList();

}
