无关风月
2025-02-07 8a038cf6f0792cfe260a94e86d954b50f068e758
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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.TChargingPile;
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.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
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 {
    /**
     * 获取所有枪
     * @return
     */
    @PostMapping("/t-charging-gun/getAllGun")
    R<List<TChargingGun>> getAllGun();
    /**
     * 获取所有桩
     * @return
     */
    @PostMapping("/t-charging-gun/getAllPile")
    R<List<TChargingPile>> getAllPile();
    
    /**
     * 根据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);
 
}