Pu Zhibing
2025-04-16 7cb8a6506062d0489dcd601a375f9dc89cbf6b4a
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
package com.ruoyi.chargingPile.api.feignClient;
 
import com.ruoyi.chargingPile.api.factory.ChargingGunFallbackFactory;
import com.ruoyi.chargingPile.api.factory.FaultMessageFallbackFactory;
import com.ruoyi.chargingPile.api.model.TChargingGun;
import com.ruoyi.chargingPile.api.model.TFaultMessage;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
/**
 * @author zhibing.pu
 * @Date 2024/8/15 19:36
 */
@FeignClient(contextId = "FaultMessageClient", value = ServiceNameConstants.CHARGINGPILE_SERVICE, fallbackFactory = FaultMessageFallbackFactory.class)
public interface FaultMessageClient {
    
    /**
     * 添加离线故障记录
     * @param faultMessage
     * @return
     */
    @PostMapping("/t-fault-message/createFaultMessage")
    R<String> createFaultMessage(@RequestBody TFaultMessage faultMessage);
    /**
     * 修改离线故障记录
     * @param faultMessage
     * @return
     */
    @PostMapping("/t-fault-message/updateFaultMessage")
    R<String> updateFaultMessage(@RequestBody TFaultMessage faultMessage);
 
    /**
     * 查询枪是否有离线或故障记录
     * @param gunId
     * @return
     */
    @PostMapping("/t-fault-message/getFaultMessageByGunId/{gunId}")
    R<TFaultMessage> getFaultMessageByGunId(@PathVariable("gunId") Integer gunId);
}