package com.ruoyi.chargingPile.api.feignClient;
|
|
import com.ruoyi.chargingPile.api.factory.ChargingGunFallbackFactory;
|
import com.ruoyi.chargingPile.api.model.TChargingGun;
|
import com.ruoyi.chargingPile.api.model.TFaultMessage;
|
import com.ruoyi.chargingPile.api.vo.GetChargingGunByCode;
|
import com.ruoyi.chargingPile.api.vo.SiteNameVO;
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.domain.R;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2024/8/15 19:36
|
*/
|
@FeignClient(contextId = "ChargingGunClient", value = ServiceNameConstants.CHARGINGPILE_SERVICE, fallbackFactory = ChargingGunFallbackFactory.class)
|
public interface ChargingGunClient {
|
|
/**
|
* 根据id获取充电枪完整名称
|
* @param id
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getAllName/{id}")
|
R<String> getAllName(@PathVariable("id") Integer id);
|
|
|
/**
|
* 根据id获取充电枪
|
* @param id
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getChargingGunById/{id}")
|
R<TChargingGun> getChargingGunById(@PathVariable("id") Integer id);
|
|
/**
|
* 通过枪id获取站点、桩、枪的名称VO
|
* @param id
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getAllInfoById/{id}")
|
R<SiteNameVO> getAllInfoById(@PathVariable("id") Integer id);
|
/**
|
* 根据枪编号获取充电枪
|
* @param code
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getChargingGunByCode")
|
R<TChargingGun> getChargingGunByCode(@RequestBody GetChargingGunByCode code);
|
/**
|
* 编辑充电枪
|
* @param chargingGun
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/updateChargingGunById")
|
R<String> updateChargingGunById(@RequestBody TChargingGun chargingGun);
|
|
|
/**
|
* 根据充电桩id获取枪
|
* @param chargingPileId
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getChargingGunByChargingPileId")
|
R<List<TChargingGun>> getChargingGunByChargingPileId(@RequestParam("chargingPileId") Integer chargingPileId);
|
|
|
/**
|
* 根据充电桩ids获取枪
|
* @param chargingPileIds
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getChargingGunByChargingPileIds")
|
R<List<TChargingGun>> getChargingGunByChargingPileIds(@RequestParam("chargingPileIds") List<Integer> chargingPileIds);
|
|
|
|
/**
|
* 接口状态变化后推送给第三方
|
* @param id
|
* @param status
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/pushChargingGunStatus")
|
R pushChargingGunStatus(@RequestParam("id") Integer id, @RequestParam("status") Integer status);
|
|
|
|
/**
|
* 根据枪唯一码查询信息
|
* @return
|
*/
|
@PostMapping("/t-charging-gun/getChargingGunByFullNumber")
|
R<TChargingGun> getChargingGunByFullNumber(@RequestParam("fullNumber") String fullNumber);
|
}
|