master #1
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:Dictionary
|
||||
* @Date:2024/8/21 10:31
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class Dictionary {
|
||||
private Integer createBy;
|
||||
private Date createTime;
|
||||
private Integer updateBy;
|
||||
private Date updateTime;
|
||||
private String remark;
|
||||
private Long id;
|
||||
private String code;
|
||||
private String descriotion;
|
||||
private Integer typeId;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import jdk.jfr.DataAmount;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:DictionaryTYpe
|
||||
* @Date:2024/8/21 10:32
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DictionaryTYpe {
|
||||
private Long id;
|
||||
private String typeName;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.domain.Req;
|
||||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.cloud.etl.controller;
|
||||
|
||||
import com.muyu.cloud.etl.service.DictionaryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.cloud.etl.controller
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:DictionaryController
|
||||
* @Date:2024/8/21 10:34
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/etl")
|
||||
public class DictionaryController {
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
@PostMapping("/open/{id}")
|
||||
public Result open(@PathVariable Long id){
|
||||
return dictionaryService.open(id);
|
||||
}
|
||||
|
||||
@PostMapping("/close/{id}")
|
||||
public Result close(@PathVariable Long id){
|
||||
return dictionaryService.close(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.cloud.etl.mapper;
|
||||
|
||||
import feign.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.cloud.etl.mapper
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:DictionaryMapper
|
||||
* @Date:2024/8/21 10:39
|
||||
*/
|
||||
@Mapper
|
||||
public interface DictionaryMapper {
|
||||
Result open(@Param("id") Long id);
|
||||
|
||||
Result close(@Param("id") Long id);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.cloud.etl.service;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.cloud.etl.service
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:DictionaryService
|
||||
* @Date:2024/8/21 10:35
|
||||
*/
|
||||
public interface DictionaryService {
|
||||
Result open(Long id);
|
||||
|
||||
Result close(Long id);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.cloud.etl.service.impl;
|
||||
|
||||
import com.muyu.cloud.etl.mapper.DictionaryMapper;
|
||||
import com.muyu.cloud.etl.service.DictionaryService;
|
||||
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.cloud.etl.service.impl
|
||||
* @Project:cloud-etlsdadawd
|
||||
* @name:DictionaryServiceImpl
|
||||
* @Date:2024/8/21 10:35
|
||||
*/
|
||||
@Service
|
||||
public class DictionaryServiceImpl implements DictionaryService {
|
||||
@Autowired
|
||||
private DictionaryMapper dictionaryMapper;
|
||||
|
||||
@Override
|
||||
public Result open(Long id) {
|
||||
return dictionaryMapper.open(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result close(Long id) {
|
||||
return dictionaryMapper.close(id);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 10005
|
||||
|
||||
# nacos线上地址
|
||||
nacos:
|
||||
addr: 47.116.184.54:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: cloud-2112
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
|
@ -13,9 +20,28 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${nacos.addr}
|
||||
# nacos用户名
|
||||
username: ${nacos.user-name}
|
||||
# nacos密码
|
||||
password: ${nacos.password}
|
||||
# 命名空间
|
||||
namespace: ${nacos.namespace}
|
||||
config:
|
||||
# 服务注册地址
|
||||
server-addr: ${nacos.addr}
|
||||
# nacos用户名
|
||||
username: ${nacos.user-name}
|
||||
# nacos密码
|
||||
password: ${nacos.password}
|
||||
# 命名空间
|
||||
namespace: ${nacos.namespace}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
# 系统共享配置
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# 系统环境Config共享配置
|
||||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?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.DictionaryMapper">
|
||||
<update id="open">
|
||||
update dictionary set status = 1 where id = #{id}
|
||||
</update>
|
||||
<update id="close">
|
||||
update dictionary set status = 2 where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
|
@ -87,3 +87,10 @@
|
|||
21:58:12.219 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited
|
||||
21:58:12.222 [Druid-ConnectionPool-Create-136289025] INFO c.a.d.p.DruidAbstractDataSource - [setFailContinuous,1900] - {dataSource-1} failContinuous is true
|
||||
21:58:12.223 [main] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat]
|
||||
11:33:52.158 [main] INFO c.m.c.e.MuYuEtlApplication - [logStartupProfileInfo,660] - The following 1 profile is active: "dev"
|
||||
11:33:54.779 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
11:33:54.779 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.24]
|
||||
11:33:54.858 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
11:33:55.452 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited
|
||||
11:33:55.453 [Druid-ConnectionPool-Create-1932244125] INFO c.a.d.p.DruidAbstractDataSource - [setFailContinuous,1900] - {dataSource-1} failContinuous is true
|
||||
11:33:55.454 [main] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat]
|
||||
|
|
Loading…
Reference in New Issue