Commit 367a8be4 authored by 朱允伟's avatar 朱允伟
parents 955e418e 9fe5c751
...@@ -9,7 +9,6 @@ import com.zorkdata.apiservice.domain.dto.ApiGroupDTO; ...@@ -9,7 +9,6 @@ import com.zorkdata.apiservice.domain.dto.ApiGroupDTO;
import com.zorkdata.dddlib.core.sdk.InvokeResult; import com.zorkdata.dddlib.core.sdk.InvokeResult;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import java.util.Date;
import java.util.Map; import java.util.Map;
/** /**
...@@ -22,6 +21,7 @@ public interface ApiApplication { ...@@ -22,6 +21,7 @@ public interface ApiApplication {
* 添加接口分组 * 添加接口分组
* *
* @param apiGroupDTO * @param apiGroupDTO
* @param username
* @return * @return
*/ */
InvokeResult addGroup(ApiGroupDTO apiGroupDTO, String username); InvokeResult addGroup(ApiGroupDTO apiGroupDTO, String username);
...@@ -58,6 +58,8 @@ public interface ApiApplication { ...@@ -58,6 +58,8 @@ public interface ApiApplication {
* 保存Api接口 * 保存Api接口
* *
* @param apiDTO * @param apiDTO
* @param username
* @param userid
* @return * @return
*/ */
Api addApi(ApiDTO apiDTO, String username, Integer userid); Api addApi(ApiDTO apiDTO, String username, Integer userid);
...@@ -74,6 +76,7 @@ public interface ApiApplication { ...@@ -74,6 +76,7 @@ public interface ApiApplication {
* 添加接口授权 * 添加接口授权
* *
* @param apiAuthDTO * @param apiAuthDTO
* @param username
* @return * @return
*/ */
ApiAuth addAuth(ApiAuthDTO apiAuthDTO, String username); ApiAuth addAuth(ApiAuthDTO apiAuthDTO, String username);
...@@ -81,6 +84,7 @@ public interface ApiApplication { ...@@ -81,6 +84,7 @@ public interface ApiApplication {
/** /**
* 判断接口是否授权 * 判断接口是否授权
* *
* @param apiAuthDTO
* @return * @return
*/ */
Integer selectUserId(ApiAuthDTO apiAuthDTO); Integer selectUserId(ApiAuthDTO apiAuthDTO);
...@@ -121,15 +125,23 @@ public interface ApiApplication { ...@@ -121,15 +125,23 @@ public interface ApiApplication {
* 新增注册Api * 新增注册Api
* *
* @param apiDTO * @param apiDTO
* @param username
* @param userid
* @return * @return
*/ */
Api registApi(ApiDTO apiDTO, String username, Integer userid); Api registApi(ApiDTO apiDTO, String username, Integer userid);
/** /**
* 查询我创建的Api * 查询我创建的Api
*
* @param userId * @param userId
* @param groupId * @param groupId
* @param keyword
* @param pageNo
* @param pageSize
* @param sortField
* @param sortType
* @param sourceWay
* @param datasource
* @return * @return
*/ */
InvokeResult getMyApi(Integer userId, String groupId, String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, String sourceWay, String datasource); InvokeResult getMyApi(Integer userId, String groupId, String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, String sourceWay, String datasource);
...@@ -137,23 +149,28 @@ public interface ApiApplication { ...@@ -137,23 +149,28 @@ public interface ApiApplication {
/** /**
* 查询市场api * 查询市场api
*
* @param keyword * @param keyword
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param sortField * @param sortField
* @param sortType * @param sortType
* @param startTime
* @param endTime
* @return * @return
*/ */
InvokeResult listMarketApi(String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime); InvokeResult listMarketApi(String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime);
/** /**
* 查看我授权的Api * 查看我授权的Api
* * @param username
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param sortField * @param sortField
* @param sortType * @param sortType
* @param startTime
* @param endTime
* @param keyword
* @param userid
* @return * @return
*/ */
InvokeResult listMyAuth(String username, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime, String keyword, Integer userid); InvokeResult listMyAuth(String username, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime, String keyword, Integer userid);
...@@ -170,9 +187,9 @@ public interface ApiApplication { ...@@ -170,9 +187,9 @@ public interface ApiApplication {
/** /**
* 接口执行的通用方法 * 接口执行的通用方法
*
* @param apiName * @param apiName
* @param inParam * @param inParam
* @param username
* @return * @return
*/ */
InvokeResult executeApi(String apiName, Map<String, String> inParam, String username); InvokeResult executeApi(String apiName, Map<String, String> inParam, String username);
......
...@@ -94,7 +94,7 @@ public class FetchAllUserFromAuthSchedule { ...@@ -94,7 +94,7 @@ public class FetchAllUserFromAuthSchedule {
//解析 //解析
LinkedHashMap map = (LinkedHashMap) invokeResult.getData(); LinkedHashMap map = (LinkedHashMap) invokeResult.getData();
ArrayList dataSourceList = (ArrayList) map.get(CONTENT); ArrayList dataSourceList = (ArrayList) map.get(CONTENT);
Map<String, DataSource> dataSourceMap = new HashMap<>(); Map<String, DataSource> dataSourceMap = new HashMap<>(16);
for (int i = 0; i < dataSourceList.size(); i++) { for (int i = 0; i < dataSourceList.size(); i++) {
LinkedHashMap dasourceMap = (LinkedHashMap) dataSourceList.get(i); LinkedHashMap dasourceMap = (LinkedHashMap) dataSourceList.get(i);
......
...@@ -101,16 +101,16 @@ public class ApiAssembler { ...@@ -101,16 +101,16 @@ public class ApiAssembler {
String constParams = api.getConstParams(); String constParams = api.getConstParams();
List<ConstParamDTO> constParamDTOS = JSON.parseArray(constParams, ConstParamDTO.class); List<ConstParamDTO> constParamDTO = JSON.parseArray(constParams, ConstParamDTO.class);
apiDTO.setConstParams(constParamDTOS); apiDTO.setConstParams(constParamDTO);
String requestParam = api.getRequestParam(); String requestParam = api.getRequestParam();
List<RequestParamDTO> requestParamDTOS = JSON.parseArray(requestParam, RequestParamDTO.class); List<RequestParamDTO> requestParamDTO = JSON.parseArray(requestParam, RequestParamDTO.class);
apiDTO.setRequestParam(requestParamDTOS); apiDTO.setRequestParam(requestParamDTO);
String returnParam = api.getReturnParam(); String returnParam = api.getReturnParam();
List<ReturnParamDTO> returnParamDTOS = JSON.parseArray(returnParam, ReturnParamDTO.class); List<ReturnParamDTO> returnParamDTO = JSON.parseArray(returnParam, ReturnParamDTO.class);
apiDTO.setReturnParam(returnParamDTOS); apiDTO.setReturnParam(returnParamDTO);
apiDTO.setId(api.getId()); apiDTO.setId(api.getId());
return apiDTO; return apiDTO;
......
...@@ -204,7 +204,6 @@ public class Api extends AbstractEntity<Api, Integer, ApiRepository> { ...@@ -204,7 +204,6 @@ public class Api extends AbstractEntity<Api, Integer, ApiRepository> {
private String constParams; private String constParams;
@Column(name = "request_param") @Column(name = "request_param")
// @Convert(converter = MetricFilterConverter.class)
private String requestParam; private String requestParam;
@Column(name = "return_param") @Column(name = "return_param")
......
package com.zorkdata.apiservice.domain.repository; package com.zorkdata.apiservice.domain.repository;
import com.zorkdata.apiservice.domain.domain.Api;
import com.zorkdata.apiservice.domain.domain.ApiAuth; import com.zorkdata.apiservice.domain.domain.ApiAuth;
import com.zorkdata.dddlib.core.sdk.InvokeResult;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import javax.transaction.Transactional;
import java.util.List; import java.util.List;
/** /**
...@@ -19,12 +15,12 @@ import java.util.List; ...@@ -19,12 +15,12 @@ import java.util.List;
public interface ApiAuthRepository extends JpaRepository<ApiAuth, Integer>, JpaSpecificationExecutor<ApiAuth> { public interface ApiAuthRepository extends JpaRepository<ApiAuth, Integer>, JpaSpecificationExecutor<ApiAuth> {
/** /**
* 非空判断,查询该id是否存在 * 非空判断,查询该id是否存在
*
* @param userId * @param userId
* @param apiId
* @return * @return
*/ */
@Query(value = "select count(*) from api_auth where user_id= ?1 and api_id = ?2", nativeQuery = true) @Query(value = "select count(*) from api_auth where user_id= ?1 and api_id = ?2", nativeQuery = true)
Integer selectUserId(Integer userId ,Integer apiId); Integer selectUserId(Integer userId, Integer apiId);
/** /**
* 查看api发布状态 * 查看api发布状态
......
package com.zorkdata.apiservice.domain.repository; package com.zorkdata.apiservice.domain.repository;
import cn.hutool.core.date.DateTime;
import com.zorkdata.apiservice.domain.domain.Api; import com.zorkdata.apiservice.domain.domain.Api;
import com.zorkdata.apiservice.domain.domain.ApiAuth;
import com.zorkdata.apiservice.domain.domain.User;
import com.zorkdata.apiservice.domain.dto.ApiDTO;
import com.zorkdata.dddlib.domain.EntityRepository; import com.zorkdata.dddlib.domain.EntityRepository;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional;
/** /**
* @title: ApiServiceRepositoryB * @title: ApiServiceRepositoryB
...@@ -75,6 +69,7 @@ public interface ApiRepository extends EntityRepository<Api, Integer> { ...@@ -75,6 +69,7 @@ public interface ApiRepository extends EntityRepository<Api, Integer> {
* @param keyword * @param keyword
* @param sortType * @param sortType
* @param sortField * @param sortField
* @param pageNo
* @param pageSize * @param pageSize
* @param userid * @param userid
* @return * @return
...@@ -164,6 +159,14 @@ public interface ApiRepository extends EntityRepository<Api, Integer> { ...@@ -164,6 +159,14 @@ public interface ApiRepository extends EntityRepository<Api, Integer> {
@Query(value = "select count(*) from api_call where api_id = ?1 ", nativeQuery = true) @Query(value = "select count(*) from api_call where api_id = ?1 ", nativeQuery = true)
Integer findCountByApiCall(Integer id); Integer findCountByApiCall(Integer id);
/**
* 查询24小时调用次数
*
* @param apiId
* @param startTime
* @param endTime
* @return
*/
@Query(value = "select count(*) from api_call where api_id = ?1 and call_time >= ?2 and call_time <= ?3", nativeQuery = true) @Query(value = "select count(*) from api_call where api_id = ?1 and call_time >= ?2 and call_time <= ?3", nativeQuery = true)
Integer findLastCall24ByApiCall(Integer apiId, Date startTime, Date endTime); Integer findLastCall24ByApiCall(Integer apiId, Date startTime, Date endTime);
......
...@@ -6,7 +6,6 @@ import com.zorkdata.apiservice.domain.dto.ApiDTO; ...@@ -6,7 +6,6 @@ import com.zorkdata.apiservice.domain.dto.ApiDTO;
import com.zorkdata.apiservice.domain.dto.ApiGroupDTO; import com.zorkdata.apiservice.domain.dto.ApiGroupDTO;
import com.zorkdata.dddlib.core.sdk.InvokeResult; import com.zorkdata.dddlib.core.sdk.InvokeResult;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -33,8 +32,8 @@ public interface ApiFacade { ...@@ -33,8 +32,8 @@ public interface ApiFacade {
/** /**
* 添加接口分组 * 添加接口分组
*
* @param apiGroupDTO * @param apiGroupDTO
* @param username
* @return * @return
*/ */
InvokeResult addGroup(ApiGroupDTO apiGroupDTO, String username); InvokeResult addGroup(ApiGroupDTO apiGroupDTO, String username);
...@@ -70,8 +69,9 @@ public interface ApiFacade { ...@@ -70,8 +69,9 @@ public interface ApiFacade {
/** /**
* 新增Api接口 * 新增Api接口
*
* @param apiDTO * @param apiDTO
* @param username
* @param userid
* @return * @return
*/ */
InvokeResult addApi(ApiDTO apiDTO, String username, Integer userid); InvokeResult addApi(ApiDTO apiDTO, String username, Integer userid);
...@@ -86,8 +86,8 @@ public interface ApiFacade { ...@@ -86,8 +86,8 @@ public interface ApiFacade {
/** /**
* 添加接口授权 * 添加接口授权
*
* @param apiAuthDTO * @param apiAuthDTO
* @param username
* @return * @return
*/ */
InvokeResult addAuth(ApiAuthDTO apiAuthDTO, String username); InvokeResult addAuth(ApiAuthDTO apiAuthDTO, String username);
...@@ -118,8 +118,9 @@ public interface ApiFacade { ...@@ -118,8 +118,9 @@ public interface ApiFacade {
/** /**
* 生成注册Api * 生成注册Api
*
* @param apiDTO * @param apiDTO
* @param username
* @param userid
* @return * @return
*/ */
InvokeResult registApi(ApiDTO apiDTO, String username, Integer userid); InvokeResult registApi(ApiDTO apiDTO, String username, Integer userid);
...@@ -127,41 +128,52 @@ public interface ApiFacade { ...@@ -127,41 +128,52 @@ public interface ApiFacade {
/** /**
* 查询我创建的Api * 查询我创建的Api
*
* @param userId * @param userId
* @param groupId * @param groupId
* @param keyword
* @param pageNo
* @param pageSize
* @param sortField
* @param sortType
* @param sourceWay
* @param datasource
* @return * @return
*/ */
InvokeResult getMyApi(Integer userId, String groupId, String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, String sourceWay, String datasource); InvokeResult getMyApi(Integer userId, String groupId, String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, String sourceWay, String datasource);
/** /**
* 查看API市场 * 查看API市场
*
* @param keyword * @param keyword
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param sortField * @param sortField
* @param sortType * @param sortType
* @param startTime
* @param endTime
* @return * @return
*/ */
InvokeResult listMarketApi(String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime); InvokeResult listMarketApi(String keyword, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime);
/** /**
* 查看我授权的api * 查看我授权的api
* * @param username
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param sortField * @param sortField
* @param sortType * @param sortType
* @param startTime
* @param endTime
* @param keyword
* @param userid
* @return * @return
*/ */
InvokeResult listMyAuth(String username, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime, String keyword, Integer userid); InvokeResult listMyAuth(String username, Integer pageNo, Integer pageSize, String sortField, String sortType, Long startTime, Long endTime, String keyword, Integer userid);
/** /**
* 数据预览 * 数据预览
*
* @param userId * @param userId
* @param apiId * @param apiId
* @param username
* @return * @return
*/ */
InvokeResult dataView(Integer userId, Integer apiId, String username); InvokeResult dataView(Integer userId, Integer apiId, String username);
...@@ -169,9 +181,9 @@ public interface ApiFacade { ...@@ -169,9 +181,9 @@ public interface ApiFacade {
/** /**
* ll * ll
*
* @param apiName * @param apiName
* @param inParam * @param inParam
* @param username
* @return * @return
*/ */
InvokeResult<Void> executeApi(String apiName, Map<String, String> inParam,String username); InvokeResult<Void> executeApi(String apiName, Map<String, String> inParam,String username);
...@@ -185,7 +197,6 @@ public interface ApiFacade { ...@@ -185,7 +197,6 @@ public interface ApiFacade {
/** /**
* 获取SqlServer数据类型 * 获取SqlServer数据类型
*
* @return * @return
*/ */
List<String> getSqlServerDataType(); List<String> getSqlServerDataType();
......
...@@ -6,11 +6,8 @@ import org.springframework.boot.SpringApplication; ...@@ -6,11 +6,8 @@ import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication; import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
//import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import java.util.Map;
/** /**
* 启动嵌入式的Tomcat并初始化Spring环境. * 启动嵌入式的Tomcat并初始化Spring环境.
* <p> * <p>
......
///*
// * Copyright (c) 2019. ZorkData ICube
// */
//
//package com.zorkdata.apiservice.config.bean;
//
//
//import com.zorkdata.dataapi.colddata.ESColdDataApi;
//import com.zorkdata.dataapi.collector.CollectorApi;
//import com.zorkdata.dataapi.colllectrule.CollectionRuleApi;
//import com.zorkdata.dataapi.logsearch.ESApi;
//import com.zorkdata.dataapi.logstruct.LogStructApi;
//import com.zorkdata.dataapi.metricset.MetricApi;
//import com.zorkdata.dataapi.opentsdb.OpenTSdbApi;
//import com.zorkdata.dddlib.api.cc.CCApi;
//import com.zorkdata.dddlib.api.gse.GseApi;
//import com.zorkdata.dddlib.api.job.JobApi;
//import com.zorkdata.dddlib.api.login.BKLoginApi;
//import com.zorkdata.dddlib.api.paas.BKPaaSApi;
//import com.zorkdata.dddlib.api.sdk.cmdb.CMDBClient;
//import com.zorkdata.dddlib.api.sdk.paas.PAASClient;
//import com.zorkdata.dddlib.core.init.BkCoreProperties;
//import com.zorkdata.dddlib.core.init.DataCoreProperties;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author: googe (<a href="mailto:gujunling@zorkdata.com.cn">gujunling@zorkdata.com.cn</a>)
// * @date: 2020/2/26
// */
//@Configuration
//public class ServiceBeanConfiguration {
//
// @Bean
// public OpenTSdbApi opentsdbApi(@Autowired DataCoreProperties dataCoreProperties) {
// return new OpenTSdbApi(dataCoreProperties);
// }
//
// @Bean
// public MetricApi metricApi(@Autowired DataCoreProperties dataCoreProperties) {
// return new MetricApi(dataCoreProperties);
// }
//
// @Bean
// public LogStructApi logStructApi(@Autowired DataCoreProperties dataCoreProperties) {
// return new LogStructApi(dataCoreProperties);
// }
//
// @Bean
// public CollectorApi collectorApi(@Autowired DataCoreProperties dataCoreProperties) {
// return new CollectorApi(dataCoreProperties);
// }
//
//
// @Bean
// public CMDBClient getcmdbClient(@Autowired BkCoreProperties bkCoreProperties) {
// return new CMDBClient(bkCoreProperties);
// }
//
// @Bean
// public PAASClient getPaasClient(@Autowired BkCoreProperties bkCoreProperties) {
// return new PAASClient(bkCoreProperties);
// }
//
// @Bean
// public BKPaaSApi getBkPaasApi(@Autowired BkCoreProperties bkCoreProperties) {
// return new BKPaaSApi(bkCoreProperties);
// }
//
// @Bean
// public JobApi getJobApi(@Autowired BkCoreProperties bkCoreProperties) {
// return new JobApi(bkCoreProperties);
// }
//
// @Bean
// public CCApi getCcApi(@Autowired BkCoreProperties bkCoreProperties) {
// return new CCApi(bkCoreProperties);
// }
//
// @Bean
// public ESApi getEsApi(@Autowired DataCoreProperties bkCoreProperties) {
// return new ESApi(bkCoreProperties);
// }
//
//
// /**
// * 蓝鲸Api--gse注入
// *
// * @param bkCoreProperties
// * @return
// */
// @Bean
// public GseApi gseApi(@Autowired BkCoreProperties bkCoreProperties) {
// return new GseApi(bkCoreProperties);
// }
//
// @Bean
// public CollectionRuleApi collectionRuleApi(@Autowired DataCoreProperties dataCoreProperties) {
// return new CollectionRuleApi(dataCoreProperties);
// }
//
// /**
// * 冷数据Api--getESColdDataApi注入
// *
// * @param bkCoreProperties
// * @return
// */
// @Bean
// public ESColdDataApi getESColdDataApi(@Autowired DataCoreProperties bkCoreProperties) {
// return new ESColdDataApi(bkCoreProperties);
// }
//
// @Bean
// public BKLoginApi getBKLoginApi(@Autowired BkCoreProperties bkCoreProperties) {
// return new BKLoginApi(bkCoreProperties);
// }
//
//}
...@@ -4,8 +4,6 @@ import com.onlyone.paas.common.security.annotation.Inner; ...@@ -4,8 +4,6 @@ import com.onlyone.paas.common.security.annotation.Inner;
import com.zorkdata.apiservice.BaseController; import com.zorkdata.apiservice.BaseController;
import com.zorkdata.apiservice.application.cache.DataSourceCache; import com.zorkdata.apiservice.application.cache.DataSourceCache;
import com.zorkdata.apiservice.application.dbutils.MysqlDataType; import com.zorkdata.apiservice.application.dbutils.MysqlDataType;
import com.zorkdata.apiservice.application.dbutils.SqlServerDataType;
import com.zorkdata.apiservice.domain.domain.ApiGroup;
import com.zorkdata.apiservice.domain.domain.DataSource; import com.zorkdata.apiservice.domain.domain.DataSource;
import com.zorkdata.apiservice.domain.dto.ApiAuthDTO; import com.zorkdata.apiservice.domain.dto.ApiAuthDTO;
import com.zorkdata.apiservice.domain.dto.ApiDTO; import com.zorkdata.apiservice.domain.dto.ApiDTO;
...@@ -17,7 +15,10 @@ import io.swagger.annotations.Api; ...@@ -17,7 +15,10 @@ import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.*; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
...@@ -69,9 +70,8 @@ public class ApiServicueController extends BaseController { ...@@ -69,9 +70,8 @@ public class ApiServicueController extends BaseController {
@GetMapping("/listDataSource") @GetMapping("/listDataSource")
public InvokeResult listDataSource() { public InvokeResult listDataSource() {
Map<String, DataSource> dataSources = DataSourceCache.getDataSources(); Map<String, DataSource> dataSources = DataSourceCache.getDataSources();
Map<String, List<DataSource>> dasourceMap = new HashMap<>(); Map<String, List<DataSource>> dasourceMap = new HashMap<>(16);
for (Map.Entry<String, DataSource> entry : dataSources.entrySet()) { for (Map.Entry<String, DataSource> entry : dataSources.entrySet()) {
String name = entry.getKey();
DataSource dataSource = entry.getValue(); DataSource dataSource = entry.getValue();
if (dataSource.getType() == 2) { if (dataSource.getType() == 2) {
List<DataSource> mysql = dasourceMap.get("mysql"); List<DataSource> mysql = dasourceMap.get("mysql");
...@@ -217,13 +217,6 @@ public class ApiServicueController extends BaseController { ...@@ -217,13 +217,6 @@ public class ApiServicueController extends BaseController {
return InvokeResult.success(dataTypes, "获取msql数据类型成功"); return InvokeResult.success(dataTypes, "获取msql数据类型成功");
} }
@Inner(value = false)
@GetMapping("/SqlServerDataType")
public InvokeResult SqlServerDataType() {
List<String> dataTypes = SqlServerDataType.getDataTypes();
return InvokeResult.success(dataTypes, "获取sqlserver数据类型成功");
}
@Inner(value = false) @Inner(value = false)
@GetMapping("/listMyAuth") @GetMapping("/listMyAuth")
public InvokeResult listMyAuth( public InvokeResult listMyAuth(
...@@ -266,7 +259,6 @@ public class ApiServicueController extends BaseController { ...@@ -266,7 +259,6 @@ public class ApiServicueController extends BaseController {
return InvokeResult.success(dataTypes, "获取SqlServer数据类型成功!"); return InvokeResult.success(dataTypes, "获取SqlServer数据类型成功!");
} }
@Inner(value = false) @Inner(value = false)
@PostMapping("/executeApi/{apiName}") @PostMapping("/executeApi/{apiName}")
public InvokeResult executeApi(@PathVariable String apiName, @RequestBody(required = false) Map<String, String> inParam) { public InvokeResult executeApi(@PathVariable String apiName, @RequestBody(required = false) Map<String, String> inParam) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment