feat():数据集市列表
parent
4419a7bf72
commit
037b129823
|
@ -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);
|
||||
|
|
|
@ -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> {
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue