package com.yuchen.saas.manage.system.api.feign;


import com.yuchen.saas.manage.system.api.entity.NestApplyManage;
import com.yuchen.saas.manage.system.api.entity.applet.SaasApplyPushMessageConfig;
import com.yuchen.saas.manage.system.api.vo.applet.PushTempDataVO;
import com.yuchen.saas.manage.system.api.vo.applet.SaasApplyInfoDataVO;
import com.yuchen.saas.payment.api.dto.setting.req.ApplyWalletSettingReqDTO;
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.*;

import java.util.List;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/11/25 13:37
 * @Description: TODO
 * @Version: 1.0
 */
@FeignClient(
        value = AppNameConstant.SAAS_SYSTEM,
        fallbackFactory = ApplyManageFeignFallback.class
)
public interface ApplyManageFeignServer {

    @GetMapping("/nestApplyManage/listByIds")
    R<List<NestApplyManage>> listByIds(@RequestParam List<Long> ids);

    @PostMapping("/nestApplyManage/listInfoByPayment")
    R<List<NestApplyManage>> listInfoByPayment(@RequestBody ApplyWalletSettingReqDTO reqDTO);

    @GetMapping("/nestApplyManage/getDetail")
    R<NestApplyManage> getDetail(@RequestParam Long id);


    @GetMapping("/applyInfoData/getApplyBindDataByApplyId/{applyId}}")
    R<SaasApplyPushMessageConfig> getApplyBindDataByApplyId(@PathVariable Long applyId);

    /**
     *
     * @param type  BusinessScopeEnum   PARK(1, "园区"),PARKING(2, "停车场"),CHARGE(3, "充电"),
     * @param siteId
     * @return
     */
    @PostMapping("/applyInfoData/findApplyInfoDataList")
    R<List<SaasApplyInfoDataVO>> findApplyInfoDataList(@RequestParam(required = false) Integer type,@RequestParam(required = false)Long siteId);

    @PostMapping("/applyInfoData/getApplyInfoDataList")
    R<List<SaasApplyInfoDataVO>> getApplyInfoDataList();

    @GetMapping("/applyInfoData/getPushTempDataVOByApplyId/{applyId}")
    R<PushTempDataVO> getPushTempDataVOByApplyId(@PathVariable Long applyId);

    @GetMapping("/nestApplyManage/getApplyByAppId/{appId}")
    R<NestApplyManage> getApplyByAppId(@PathVariable String appId) ;
}
