ny
昨天 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
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
package jnpf.base;
 
import jnpf.base.fallback.DataSourceApiFallback;
import jnpf.database.model.entity.DbLinkEntity;
import jnpf.utils.FeignName;
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.RequestParam;
 
/**
 * 数据连接Api
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
 * @date 2021-03-24
 */
@FeignClient(name = FeignName.SYSTEM_SERVER_NAME , fallback = DataSourceApiFallback.class, path = "/DataSource")
public interface DataSourceApi {
 
    /**
     * 数据连接
     * @param id 数据连接Id
     * @return 数据连接对象
     */
    @GetMapping("/{id}/info")
    DbLinkEntity getInfo(@PathVariable("id") String id);
 
    /**
     * 数据连接
     * @param id 数据连接Id
     * @return 数据连接对象
     */
    @GetMapping("/info/{id}/{tenantId}")
    Object getInfo(@PathVariable("id") String id, @PathVariable("tenantId") String tenantId);
 
    /**
     * 数据连接
     * @param fullName 数据连接名
     * @return 数据连接对象
     */
    @GetMapping("/infoByFullName")
    DbLinkEntity getInfoByFullName(@RequestParam("fullName") String fullName);
 
    /**
     * 数据连接
     * @param dbLinkId
     * @return 数据连接对象
     */
    @GetMapping("/getResource")
    DbLinkEntity getResource(@RequestParam("dbLinkId") String dbLinkId, @RequestParam(name = "tenantId", required = false) String tenantId) throws Exception;
 
}