Pu Zhibing
2025-01-26 1266ed302b259f09a9370bc4315316b8a212b5d0
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
package com.ruoyi.other.api.feignClient;
 
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.Operator;
import com.ruoyi.other.api.factory.OperatorFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.util.List;
 
/**
 * @author zhibing.pu
 * @Date 2025/1/22 15:15
 */
@FeignClient(contextId = "OperatorClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = OperatorFallbackFactory.class)
public interface OperatorClient {
    
    
    /**
     * 获取运营商数据
     * @param id
     * @return
     */
    @PostMapping("/operator/getOperatorById")
    R<Operator> getOperatorById(@RequestParam("id") Integer id);
    
    
    /**
     * 获取运营商数据
     * @param name
     * @return
     */
    @PostMapping("/operator/getOperatorByName")
    R<Operator> getOperatorByName(@RequestParam("name") String name);
    
    
    
    /**
     * 获取运营商数据
     * @param operatorId
     * @return
     */
    @PostMapping("/operator/getOperator")
    R<Operator> getOperator(@RequestParam("operatorId") String operatorId);
    
    
    /**
     * 获取所有运营商
     * @return
     */
    @PostMapping("/operator/getAllOperator")
    R<List<Operator>> getAllOperator();
    
    /**
     * 更新运营商数据
     * @return
     */
    @PostMapping("/operator/editOperator")
    R editOperator(@RequestBody Operator operator);
}