feat():数据集市列表

master
86191 2024-08-23 11:52:40 +08:00
parent 4419a7bf72
commit 037b129823
4 changed files with 67 additions and 2 deletions

View File

@ -6,12 +6,11 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @Author YuPing
* @Description
* @Description
* @Version 1.0
* @Data 2024-08-20 10:25:50
*/
@SpringBootApplication
@MapperScan("com.muyu.server.mapper")
public class DataApplication {
public static void main(String[] args) {
SpringApplication.run(DataApplication.class, args);

View File

@ -0,0 +1,9 @@
package com.muyu.server.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.domain.ThirdPartyInterface;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ThirdPartyInterfaceMapper extends BaseMapper<ThirdPartyInterface> {
}

View File

@ -0,0 +1,13 @@
package com.muyu.server.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.ThirdPartyInterface;
import com.muyu.domain.request.ThirdPartyInterfaceRequest;
import com.muyu.domain.response.ThirdPartyInterfaceResponse;
import java.util.List;
public interface ThirdPartyInterfaceService extends IService<ThirdPartyInterface> {
// 查询第三方接口列表
List<ThirdPartyInterfaceResponse> getThirdPartyInterfaceList(ThirdPartyInterfaceRequest request);
}

View File

@ -0,0 +1,44 @@
package com.muyu.server.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.utils.StringUtils;
import com.muyu.domain.ThirdPartyInterface;
import com.muyu.domain.request.ThirdPartyInterfaceRequest;
import com.muyu.domain.response.ThirdPartyInterfaceResponse;
import com.muyu.server.mapper.ThirdPartyInterfaceMapper;
import com.muyu.server.service.ThirdPartyInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author YuPing
* @Description
* @Version 1.0
* @Data 2024-08-22 20:58:30
*/
@Service
public class ThirdPartyInterfaceServiceImpl
extends ServiceImpl<ThirdPartyInterfaceMapper, ThirdPartyInterface>
implements ThirdPartyInterfaceService {
/**
*
* @param request
* @return
*/
@Override
public List<ThirdPartyInterfaceResponse> getThirdPartyInterfaceList(ThirdPartyInterfaceRequest request) {
LambdaQueryWrapper<ThirdPartyInterface> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(
StringUtils.isNotEmpty(request.getApiName()),
ThirdPartyInterface::getApiName, request.getApiName()
);
List<ThirdPartyInterface> thirdPartyInterfaceList = this.list(queryWrapper);
return thirdPartyInterfaceList.stream()
.map(ThirdPartyInterfaceResponse::build)
.toList();
}
}