初始化
parent
ca243b4f52
commit
a0d4a53459
|
@ -0,0 +1,7 @@
|
|||
package com.muyu;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.muyu;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.muyu.cloud.etl.service;
|
||||
|
||||
import com.muyu.domain.AssetImpower;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.service
|
||||
* @Project:cloud-etl
|
||||
* @name:EtlService
|
||||
* @Date:2024/8/20 20:46
|
||||
*/
|
||||
public interface EtlService {
|
||||
List<AssetImpower> selectAssetImpowerList(AssetImpower assetImpower);
|
||||
|
||||
Result deleteAssetImpowerByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.cloud.etl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.Source;
|
||||
import com.muyu.domain.req.SourceReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SourceService extends IService<Source> {
|
||||
List<Source> selectSourceList(SourceReq sourceReq);
|
||||
|
||||
Source getInfo(Long id);
|
||||
|
||||
int insertBasicConfigInfo(Source sourceReq);
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.muyu.cloud.etl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.SourceType;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface SourceTypeService extends IService<SourceType> {
|
||||
|
||||
List<SourceType> findSourceType();
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.cloud.etl.service.impl;
|
||||
|
||||
import com.muyu.domain.AssetImpower;
|
||||
import com.muyu.cloud.etl.mapper.EtlMapper;
|
||||
import com.muyu.cloud.etl.service.EtlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.service.serviceImpl
|
||||
* @Project:cloud-etl
|
||||
* @name:EtlService
|
||||
* @Date:2024/8/20 20:46
|
||||
*/
|
||||
@Service
|
||||
public class EtlServiceImpl implements EtlService {
|
||||
|
||||
@Autowired
|
||||
private EtlMapper etlMapper;
|
||||
|
||||
@Override
|
||||
public List<AssetImpower> selectAssetImpowerList(AssetImpower assetImpower) {
|
||||
List<AssetImpower> assetImpowers = etlMapper.list(assetImpower);
|
||||
return assetImpowers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteAssetImpowerByIds(Long[] ids) {
|
||||
return etlMapper.deleteAssetImpowerByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.cloud.etl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.cloud.etl.service.SourceService;
|
||||
import com.muyu.domain.Source;
|
||||
import com.muyu.domain.req.SourceReq;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SourceServiceImpl extends ServiceImpl<SourceMapper, Source> implements SourceService {
|
||||
@Autowired
|
||||
private SourceMapper sourceMapper;
|
||||
|
||||
@Override
|
||||
public List<Source> selectSourceList(SourceReq sourceReq) {
|
||||
return sourceMapper.selectSourceList(sourceReq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Source getInfo(Long id) {
|
||||
LambdaQueryWrapper<Source> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(Source::getId, id);
|
||||
return this.sourceMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
//新增
|
||||
@Override
|
||||
public int insertBasicConfigInfo(Source sourceReq) {
|
||||
int insert = sourceMapper.insert(sourceReq);
|
||||
return insert;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.muyu.cloud.etl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.cloud.etl.service.SourceTypeService;
|
||||
import com.muyu.domain.SourceType;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SourceTypeServiceImpl extends ServiceImpl<SourceTypeMapper, SourceType> implements SourceTypeService {
|
||||
|
||||
@Override
|
||||
public List<SourceType> findSourceType() {
|
||||
LambdaQueryWrapper<SourceType> sourceTypeLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
return this.list(sourceTypeLambdaQueryWrapper);
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package com.muyu.cloud.mart;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @Author: wangxinyuan
|
||||
* @Date: 2024/8/20 上午9:55
|
||||
*/
|
||||
@Log4j2
|
||||
@EnableCustomConfig
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication
|
||||
public class MuYuMartApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MuYuMartApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -1,18 +1,2 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
|
||||
|
||||
_,--._.-,
|
||||
/\_r-,\_ )
|
||||
.-.) _;='_/ (.;
|
||||
\ \' \/S )
|
||||
L.'-. _.'|-'
|
||||
<_`-'\'_.'/
|
||||
`'-._( \ Shanaka Dias
|
||||
___ \\, ___
|
||||
\ .'-. \\ .-'_. /
|
||||
'._' '.\\/.-'_.'
|
||||
'--``\('--'
|
||||
snd \\
|
||||
`\\,
|
||||
\|
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9798
|
||||
port: 10005
|
||||
|
||||
# nacos线上地址
|
||||
nacos:
|
||||
addr: 47.116.184.54:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: cloud-2112
|
||||
|
||||
|
||||
namespace: text
|
||||
# Spring
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
application:
|
||||
# 应用名称
|
||||
name: cloud-mart
|
||||
name: cloud-datamart
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
|
@ -49,8 +45,17 @@ spring:
|
|||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# 系统环境Config共享配置
|
||||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# xxl-job 配置文件
|
||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# rabbit 配置文件
|
||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# rabbit 配置文件
|
||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 配置 MyBatis 的日志输出实现类,这里是输出到控制台
|
||||
mapper-locations: classpath:/mapper/*.xml # MyBatis Mapper 文件的位置,这里假设是 XML 形式的 Mapper
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto # 主键生成策略,这里设置为自动增长
|
||||
logic-delete-value: 1 # 逻辑删除标记值,例如设置为 1 表示已删除
|
||||
logic-not-delete-value: 0 # 逻辑未删除标记值,例如设置为 0 表示未删除
|
||||
banner: false # 关闭控制台打印的 MyBatis-Plus Banner
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-mart"/>
|
||||
<property name="log.path" value="logs/cloud-etl"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-mart"/>
|
||||
<property name="log.path" value="logs/cloud-etl"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/cloud-test"/>
|
||||
<property name="log.path" value="logs/cloud-text"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.cloud.etl.mapper.EtlMapper">
|
||||
<sql id="selectAssetDataDictVo">
|
||||
select id, basic_id, dict_name, dict_type, remark, create_by, create_time, update_by, update_time from asset_data_dict
|
||||
</sql>
|
||||
<sql id="list">
|
||||
select id, basic_id, dict_name, dict_type, remark, create_by, create_time, update_by, update_time from asset_data_dict
|
||||
</sql>
|
||||
<delete id="deleteAssetImpowerByIds">
|
||||
<include refid="selectAssetDataDictVo"/>
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.muyu.domain.AssetImpower">
|
||||
<include refid="list"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.cloud.etl.mapper.SourceMapper">
|
||||
<resultMap type="com.muyu.domain.Source" id="SourceMapper">
|
||||
<result property="id" column="id" />
|
||||
<result property="dataResourceName" column="data_resource_name" />
|
||||
<result property="dataSourcesSystemName" column="data_sources_system_name" />
|
||||
<result property="host" column="host" />
|
||||
<result property="port" column="port" />
|
||||
<result property="databaseType" column="database_type" />
|
||||
<result property="databaseName" column="database_name" />
|
||||
<result property="initLinkNum" column="init_link_num" />
|
||||
<result property="maxLinkNum" column="max_link_num" />
|
||||
<result property="maxWaitTime" column="max_wait_time" />
|
||||
<result property="maxWaitTimes" column="max_wait_times" />
|
||||
<result property="connectionParams" column="connection_params" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
<sql id="selectSourceList">
|
||||
select id, data_resource_name,username,password, data_sources_system_name, host, port, database_type, database_name, init_link_num, max_link_num, max_wait_time, max_wait_times,connection_params, remark from source
|
||||
</sql>
|
||||
<!-- <select id="selectSourceList" resultType="com.muyu.domain.Source">-->
|
||||
<!-- -->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectSourceList" parameterType="com.muyu.domain.Source" resultMap="SourceMapper">
|
||||
<include refid="selectSourceList"/>
|
||||
<where>
|
||||
<if test="dataResourceName != null and dataResourceName != ''"> and data_resource_name like concat('%', #{dataResourceName}, '%')</if>
|
||||
<if test="dataSourcesSystemName != null and dataSourcesSystemName != ''"> and data_sources_system_name like concat('%', #{dataSourcesSystemName}, '%')</if>
|
||||
<if test="host != null and host != ''"> and host = #{host}</if>
|
||||
<if test="port != null and port != ''"> and port = #{port}</if>
|
||||
<if test="databaseType != null and databaseType != ''"> and database_type = #{databaseType}</if>
|
||||
<if test="databaseName != null and databaseName != ''"> and database_name like concat('%', #{databaseName}, '%')</if>
|
||||
<if test="username != null "> and username = #{username}</if>
|
||||
<if test="password != null "> and password = #{password}</if>
|
||||
<if test="initLinkNum != null "> and init_link_num = #{initLinkNum}</if>
|
||||
<if test="maxLinkNum != null "> and max_link_num = #{maxLinkNum}</if>
|
||||
<if test="maxWaitTime != null "> and max_wait_time = #{maxWaitTime}</if>
|
||||
<if test="maxWaitTimes != null "> and max_wait_times = #{maxWaitTimes}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue