diff --git a/src/main/java/neatlogic/module/tenant/api/file/DeleteFilePublicApi.java b/src/main/java/neatlogic/module/tenant/api/file/DeleteFilePublicApi.java deleted file mode 100644 index 503187e3ac9f3be87aa0d34c5b22a75fc7c44b30..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/file/DeleteFilePublicApi.java +++ /dev/null @@ -1,92 +0,0 @@ -/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.file; - -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.asynchronization.threadlocal.TenantContext; -import neatlogic.framework.asynchronization.threadlocal.UserContext; -import neatlogic.framework.common.constvalue.ApiParamType; -import neatlogic.framework.common.util.FileUtil; -import neatlogic.framework.exception.file.FileAccessDeniedException; -import neatlogic.framework.exception.file.FileNotFoundException; -import neatlogic.framework.exception.file.FileTypeHandlerNotFoundException; -import neatlogic.framework.exception.user.NoTenantException; -import neatlogic.framework.file.core.FileOperationType; -import neatlogic.framework.file.core.FileTypeHandlerFactory; -import neatlogic.framework.file.core.IFileTypeHandler; -import neatlogic.framework.file.dao.mapper.FileMapper; -import neatlogic.framework.file.dto.FileVo; -import neatlogic.framework.restful.annotation.Description; -import neatlogic.framework.restful.annotation.Input; -import neatlogic.framework.restful.annotation.OperationType; -import neatlogic.framework.restful.annotation.Param; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicApiComponentBase; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; - -@Service -@Transactional - -@OperationType(type = OperationTypeEnum.DELETE) -public class DeleteFilePublicApi extends PublicApiComponentBase { - - @Resource - private FileMapper fileMapper; - - @Override - public String getName() { - return "删除附件(供第三方使用)"; - } - - @Override - public String getConfig() { - return null; - } - - @Input({ - @Param(name = "fileId", type = ApiParamType.LONG, desc = "附件id", isRequired = true) - }) - @Description(desc = "删除附件(供第三方使用)") - @Override - public Object myDoService(JSONObject paramObj) throws Exception { - Long fileId = paramObj.getLong("fileId"); - FileVo fileVo = fileMapper.getFileById(fileId); - String tenantUuid = TenantContext.get().getTenantUuid(); - if (StringUtils.isBlank(tenantUuid)) { - throw new NoTenantException(); - } - if (fileVo != null) { - IFileTypeHandler fileTypeHandler = FileTypeHandlerFactory.getHandler(fileVo.getType()); - if (fileTypeHandler != null) { - if (fileTypeHandler.valid(UserContext.get().getUserUuid(), fileVo, paramObj)) { - fileMapper.deleteFile(fileVo.getId()); - FileUtil.deleteData(fileVo.getPath()); - } else { - throw new FileAccessDeniedException(fileVo.getName(), FileOperationType.DELETE.getText()); - } - } else { - throw new FileTypeHandlerNotFoundException(fileVo.getType()); - } - } else { - throw new FileNotFoundException(fileId); - } - return null; - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/file/DownloadFilePublicApi.java b/src/main/java/neatlogic/module/tenant/api/file/DownloadFilePublicApi.java deleted file mode 100644 index b35c9b7ff17c9a7b37976fd3b759c8286df74a66..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/file/DownloadFilePublicApi.java +++ /dev/null @@ -1,60 +0,0 @@ -/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.file; - -import neatlogic.framework.common.constvalue.ApiParamType; -import neatlogic.framework.common.constvalue.CacheControlType; -import neatlogic.framework.crossover.CrossoverServiceFactory; -import neatlogic.framework.crossover.IFileCrossoverService; -import neatlogic.framework.restful.annotation.*; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicBinaryStreamApiComponentBase; -import com.alibaba.fastjson.JSONObject; -import org.springframework.stereotype.Service; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -@Service - -@OperationType(type = OperationTypeEnum.SEARCH) -public class DownloadFilePublicApi extends PublicBinaryStreamApiComponentBase { - - @Override - public String getName() { - return "附件下载接口(供第三方使用)"; - } - - @Override - public String getConfig() { - return null; - } - - @CacheControl(cacheControlType = CacheControlType.MAXAGE, maxAge = 30000) - @Input({@Param(name = "id", type = ApiParamType.LONG, desc = "附件id", isRequired = true)}) - @Description(desc = "附件下载接口(供第三方使用)") - @Override - public Object myDoService(JSONObject paramObj, HttpServletRequest request, HttpServletResponse response) throws Exception { - IFileCrossoverService fileCrossoverService = CrossoverServiceFactory.getApi(IFileCrossoverService.class); - fileCrossoverService.downloadFile(paramObj, request, response); - return null; - } - - @Override - public String getToken() { - return "/public/file/download"; - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/file/DownloadImagePublicApi.java b/src/main/java/neatlogic/module/tenant/api/file/DownloadImagePublicApi.java deleted file mode 100644 index 507e01e769a220ba7c8b489b6088ac3082ec619d..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/file/DownloadImagePublicApi.java +++ /dev/null @@ -1,90 +0,0 @@ -/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.file; - -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.asynchronization.threadlocal.TenantContext; -import neatlogic.framework.common.constvalue.ApiParamType; -import neatlogic.framework.common.constvalue.CacheControlType; -import neatlogic.framework.common.util.FileUtil; -import neatlogic.framework.exception.file.FileNotFoundException; -import neatlogic.framework.exception.user.NoTenantException; -import neatlogic.framework.file.dao.mapper.FileMapper; -import neatlogic.framework.file.dto.FileVo; -import neatlogic.framework.restful.annotation.*; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicBinaryStreamApiComponentBase; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; - -@Service - -@OperationType(type = OperationTypeEnum.SEARCH) -public class DownloadImagePublicApi extends PublicBinaryStreamApiComponentBase { - - @Resource - private FileMapper fileMapper; - - @Override - public String getName() { - return "图片下载接口(供第三方使用)"; - } - - @Override - public String getConfig() { - return null; - } - - @CacheControl(cacheControlType = CacheControlType.MAXAGE, maxAge = 30000) - @Input({ @Param(name = "id", type = ApiParamType.LONG, desc = "图片id", isRequired = true) }) - @Description(desc = "图片下载接口(供第三方使用)") - @Override - public Object myDoService(JSONObject paramObj, HttpServletRequest request, HttpServletResponse response) throws Exception { - Long id = paramObj.getLong("id"); - FileVo fileVo = fileMapper.getFileById(id); - String tenantUuid = TenantContext.get().getTenantUuid(); - if (StringUtils.isBlank(tenantUuid)) { - throw new NoTenantException(); - } - if (fileVo != null && fileVo.getType().equals("image")) { - ServletOutputStream os = null; - InputStream in = null; - in = FileUtil.getData(fileVo.getPath()); - if (in != null) { - response.setContentType(fileVo.getContentType()); - os = response.getOutputStream(); - IOUtils.copyLarge(in, os); - if (os != null) { - os.flush(); - os.close(); - } - if (in != null) { - in.close(); - } - } - } else { - throw new FileNotFoundException(id); - } - return null; - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/file/UploadFilePublicApi.java b/src/main/java/neatlogic/module/tenant/api/file/UploadFilePublicApi.java deleted file mode 100644 index 82ffd1f51009e0f65cb5a96de3ff4519331898aa..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/file/UploadFilePublicApi.java +++ /dev/null @@ -1,162 +0,0 @@ -/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.file; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.asynchronization.threadlocal.TenantContext; -import neatlogic.framework.asynchronization.threadlocal.UserContext; -import neatlogic.framework.common.constvalue.ApiParamType; -import neatlogic.framework.common.util.FileUtil; -import neatlogic.framework.exception.file.EmptyFileException; -import neatlogic.framework.exception.file.FileExtNotAllowedException; -import neatlogic.framework.exception.file.FileTooLargeException; -import neatlogic.framework.exception.file.FileTypeHandlerNotFoundException; -import neatlogic.framework.exception.user.NoTenantException; -import neatlogic.framework.file.core.FileTypeHandlerFactory; -import neatlogic.framework.file.core.IFileTypeHandler; -import neatlogic.framework.file.dao.mapper.FileMapper; -import neatlogic.framework.file.dto.FileTypeVo; -import neatlogic.framework.file.dto.FileVo; -import neatlogic.framework.restful.annotation.*; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicBinaryStreamApiComponentBase; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -@Service -@Deprecated -@OperationType(type = OperationTypeEnum.CREATE) -public class UploadFilePublicApi extends PublicBinaryStreamApiComponentBase { - // static Logger logger = LoggerFactory.getLogger(UploadFilePublicApi.class); - - @Resource - private FileMapper fileMapper; - - @Override - public String getName() { - return "附件上传接口(供第三方使用)"; - } - - @Override - public String getConfig() { - return null; - } - - @Input({@Param(name = "param", type = ApiParamType.STRING, desc = "附件参数名称", isRequired = true), - @Param(name = "type", type = ApiParamType.STRING, desc = "附件类型", isRequired = true)}) - @Output({@Param(explode = FileVo.class)}) - @Description(desc = "附件上传接口(供第三方使用)") - @Override - public Object myDoService(JSONObject paramObj, HttpServletRequest request, HttpServletResponse response) throws Exception { - String tenantUuid = TenantContext.get().getTenantUuid(); - if (StringUtils.isBlank(tenantUuid)) { - throw new NoTenantException(); - } - MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; - String paramName = paramObj.getString("param"); - String type = paramObj.getString("type"); - List fileTypeList = FileTypeHandlerFactory.getActiveFileTypeHandler(); - FileTypeVo fileTypeVo = null; - for (FileTypeVo f : fileTypeList) { - if (f.getName().equalsIgnoreCase(type)) { - fileTypeVo = f; - break; - } - } - if (fileTypeVo == null) { - throw new FileTypeHandlerNotFoundException(type); - } - FileTypeVo fileTypeConfigVo = fileMapper.getFileTypeConfigByType(fileTypeVo.getName()); - - MultipartFile multipartFile = multipartRequest.getFile(paramName); - - if (multipartFile != null && multipartFile.getName() != null) { - String userUuid = UserContext.get().getUserUuid(true); - String oldFileName = multipartFile.getOriginalFilename(); - long size = multipartFile.getSize(); - // 如果配置为空代表不受任何限制 - if (fileTypeConfigVo != null) { - boolean isAllowed = false; - long maxSize = 0L; - String fileExt = null; - if (oldFileName != null) { - fileExt = oldFileName.substring(oldFileName.lastIndexOf(".") + 1).toLowerCase(); - } - JSONObject configObj = fileTypeConfigVo.getConfigObj(); - JSONArray whiteList = new JSONArray(); - JSONArray blackList = new JSONArray(); - if (size == 0) { - throw new EmptyFileException(); - } - if (configObj != null) { - whiteList = configObj.getJSONArray("whiteList"); - blackList = configObj.getJSONArray("blackList"); - maxSize = configObj.getLongValue("maxSize"); - } - if (whiteList != null && !whiteList.isEmpty()) { - for (int i = 0; i < whiteList.size(); i++) { - if (fileExt != null && fileExt.equalsIgnoreCase(whiteList.getString(i))) { - isAllowed = true; - break; - } - } - } else if (blackList != null && !blackList.isEmpty()) { - isAllowed = true; - for (int i = 0; i < blackList.size(); i++) { - if (fileExt != null && fileExt.equalsIgnoreCase(blackList.getString(i))) { - isAllowed = false; - break; - } - } - } else { - isAllowed = true; - } - if (!isAllowed) { - throw new FileExtNotAllowedException(fileExt); - } - if (maxSize > 0 && size > maxSize) { - throw new FileTooLargeException(size, maxSize); - } - } - - IFileTypeHandler fileTypeHandler = FileTypeHandlerFactory.getHandler(type); - if (fileTypeHandler == null) { - throw new FileTypeHandlerNotFoundException(type); - } - - FileVo fileVo = new FileVo(); - fileVo.setName(oldFileName); - fileVo.setSize(size); - fileVo.setUserUuid(userUuid); - fileVo.setType(type); - fileVo.setContentType(multipartFile.getContentType()); - String filePath = FileUtil.saveData(tenantUuid, multipartFile.getInputStream(), fileVo); - fileVo.setPath(filePath); - fileMapper.insertFile(fileVo); - fileTypeHandler.afterUpload(fileVo, paramObj); - return fileMapper.getFileById(fileVo.getId()); - } - return null; - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/file/UploadImagePublicApi.java b/src/main/java/neatlogic/module/tenant/api/file/UploadImagePublicApi.java deleted file mode 100644 index de02319c7dbecd20508602e9ee5e9a6d9e25ace4..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/file/UploadImagePublicApi.java +++ /dev/null @@ -1,103 +0,0 @@ -/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.file; - -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.asynchronization.threadlocal.TenantContext; -import neatlogic.framework.asynchronization.threadlocal.UserContext; -import neatlogic.framework.common.util.FileUtil; -import neatlogic.framework.exception.user.NoTenantException; -import neatlogic.framework.file.dao.mapper.FileMapper; -import neatlogic.framework.file.dto.FileVo; -import neatlogic.framework.restful.annotation.*; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicBinaryStreamApiComponentBase; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -@Service -@Deprecated -@OperationType(type = OperationTypeEnum.CREATE) -public class UploadImagePublicApi extends PublicBinaryStreamApiComponentBase { - //static Logger logger = LoggerFactory.getLogger(UploadImagePublicApi.class); - - @Resource - private FileMapper fileMapper; - - @Override - public String getName() { - return "图片上传接口(供第三方使用)"; - } - - @Override - public String getConfig() { - return null; - } - - @Override - public boolean isRaw() { - return true; - } - - @Input({}) - @Output({@Param(explode = FileVo.class)}) - @Description(desc = "图片上传接口(供第三方使用)") - @Override - public Object myDoService(JSONObject paramObj, HttpServletRequest request, HttpServletResponse response) throws Exception { - String tenantUuid = TenantContext.get().getTenantUuid(); - if (StringUtils.isBlank(tenantUuid)) { - throw new NoTenantException(); - } - MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; - String paramName = "upload"; - JSONObject returnObj = new JSONObject(); - try { - MultipartFile multipartFile = multipartRequest.getFile(paramName); - if (multipartFile != null && multipartFile.getName() != null && multipartFile.getContentType().startsWith("image")) { - String userUuid = UserContext.get().getUserUuid(true); - String oldFileName = multipartFile.getOriginalFilename(); - Long size = multipartFile.getSize(); - - FileVo fileVo = new FileVo(); - fileVo.setName(oldFileName); - fileVo.setSize(size); - fileVo.setUserUuid(userUuid); - fileVo.setType("image"); - fileVo.setContentType(multipartFile.getContentType()); - String filePath = FileUtil.saveData(tenantUuid, multipartFile.getInputStream(), fileVo); - fileVo.setPath(filePath); - fileMapper.insertFile(fileVo); - - returnObj.put("uploaded", true); - returnObj.put("url", "api/binary/image/download?id=" + fileVo.getId()); - } else { - returnObj.put("uploaded", false); - returnObj.put("error", "请选择图片文件"); - } - } catch (Exception ex) { - returnObj.put("uploaded", false); - returnObj.put("error", ex.getMessage()); - } - return returnObj; - - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceGetPublicApi.java b/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceGetPublicApi.java deleted file mode 100755 index 786fecc4c2e238acbc15441564cf2c408146d851..0000000000000000000000000000000000000000 --- a/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceGetPublicApi.java +++ /dev/null @@ -1,64 +0,0 @@ -/*Copyright (C) $today.year 深圳极向量科技有限公司 All Rights Reserved. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see .*/ - -package neatlogic.module.tenant.api.mongodb; - -import neatlogic.framework.asynchronization.threadlocal.TenantContext; -import neatlogic.framework.dto.MongoDbVo; -import neatlogic.framework.restful.annotation.*; -import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicApiComponentBase; -import neatlogic.framework.restful.dao.mapper.NeatLogicMapper; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -@OperationType(type = OperationTypeEnum.SEARCH) -public class MongoDbDataSourceGetPublicApi extends PublicApiComponentBase { - @Autowired - NeatLogicMapper neatlogicMapper; - - @Override - public String getToken() { - return "/public/mongodb/datasource/get"; - } - - @Override - public String getName() { - return "获取对应租户的mongodb连接信息"; - } - - @Override - public String getConfig() { - return null; - } - - @Input({ - }) - @Output({ - @Param(name = "mongoVo", explode = MongoDbVo.class, desc = "mongodb数据库") - }) - @Description(desc = "获取对应租户的mongodb连接信息接口") - @Override - public Object myDoService(JSONObject jsonObj) throws Exception { - String tenant = TenantContext.get().getTenantUuid(); - TenantContext.get().setUseDefaultDatasource(true); - MongoDbVo mongodbVo = neatlogicMapper.getMongodbByTenant(tenant); - TenantContext.get().switchTenant(tenant); - TenantContext.get().setUseDefaultDatasource(false); - return mongodbVo; - } -} diff --git a/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListPublicApi.java b/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListApi.java old mode 100755 new mode 100644 similarity index 91% rename from src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListPublicApi.java rename to src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListApi.java index 52d728e0cb35d470472dad6007d1c13f31ae95d2..9e304dc062e896d22c69f82f9c5e842a415bb6c8 --- a/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListPublicApi.java +++ b/src/main/java/neatlogic/module/tenant/api/mongodb/MongoDbDataSourceListApi.java @@ -15,25 +15,25 @@ along with this program. If not, see .*/ package neatlogic.module.tenant.api.mongodb; +import com.alibaba.fastjson.JSONObject; import neatlogic.framework.asynchronization.threadlocal.TenantContext; import neatlogic.framework.dto.MongoDbVo; import neatlogic.framework.restful.annotation.*; import neatlogic.framework.restful.constvalue.OperationTypeEnum; -import neatlogic.framework.restful.core.publicapi.PublicApiComponentBase; +import neatlogic.framework.restful.core.privateapi.PrivateApiComponentBase; import neatlogic.framework.restful.dao.mapper.NeatLogicMapper; -import com.alibaba.fastjson.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service @OperationType(type = OperationTypeEnum.SEARCH) -public class MongoDbDataSourceListPublicApi extends PublicApiComponentBase { +public class MongoDbDataSourceListApi extends PrivateApiComponentBase { @Autowired NeatLogicMapper neatlogicMapper; @Override public String getToken() { - return "/public/mongodb/datasource/list"; + return "mongodb/datasource/list"; } @Override