Commit ec7a0a31 by xiaowei

修改了代码生成模块的报错,补充了业务微服务模块

parent 7372f5e4
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:dm://8.142.21.6:5236?schema=JZ_TEST
username: SYSDBA
password: Dameng1@34
driver-class-name: dm.jdbc.driver.DmDriver
redis:
host: localhost
port: 6379
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
mybatis:
mapper-locations: classpath*:mapper/**/*Mapper.xml
type-aliases-package: com.ruoyi.**.domain
pagehelper:
helper-dialect: dm
reasonable: true
support-methods-arguments: true
params: count=countSql
file:
prefix: /profile/upload
path: D:/profile/upload
domain: http://localhost:9300
referer:
enabled: false
allowed-domains: http://localhost
\ No newline at end of file
......@@ -27,9 +27,7 @@ spring:
- id: ruoyi-gen
uri: lb://ruoyi-gen
predicates:
- Path=/code/**
filters:
- StripPrefix=1
- Path=/gen/**
- id: ruoyi-job
uri: lb://ruoyi-job
predicates:
......@@ -42,6 +40,12 @@ spring:
- Path=/file/**
filters:
- StripPrefix=1
- id: ruoyi-busi
uri: lb://ruoyi-busi
predicates:
- Path=/busi/**
filters:
- StripPrefix=1
data:
redis:
host: localhost
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-modules</artifactId>
<version>3.6.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-modules-busi</artifactId>
<description>
ruoyi-modules-busi矫正业务子模块
</description>
<dependencies>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- DM Connector -->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>Dm8JdbcDriver18</artifactId>
</dependency>
<!-- RuoYi Common DataSource -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datasource</artifactId>
</dependency>
<!-- RuoYi Common DataScope -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datascope</artifactId>
</dependency>
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
<!-- RuoYi Common Swagger -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-swagger</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.ruoyi.busi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
/**
* 矫正业务子模块
*
* @author ruoyi
*/
@EnableCustomConfig
@EnableRyFeignClients
@SpringBootApplication
public class RuoYiBusiApplication
{
public static void main(String[] args)
{
SpringApplication.run(RuoYiBusiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 矫正业务子模块启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
}
}
package com.ruoyi.busi.controller;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.busi.domain.JzObject;
import com.ruoyi.busi.service.IJzObjectService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.page.TableDataInfo;
/**
* 社区矫正对象基础信息(标准7)Controller
*
* @author ruoyi
* @date 2026-07-23
*/
@RestController
@RequestMapping("/OBJECT")
public class JzObjectController extends BaseController
{
@Autowired
private IJzObjectService jzObjectService;
/**
* 查询社区矫正对象基础信息(标准7)列表
*/
@RequiresPermissions("busi:OBJECT:list")
@GetMapping("/list")
public TableDataInfo list(JzObject jzObject)
{
startPage();
List<JzObject> list = jzObjectService.selectJzObjectList(jzObject);
return getDataTable(list);
}
/**
* 导出社区矫正对象基础信息(标准7)列表
*/
@RequiresPermissions("busi:OBJECT:export")
@Log(title = "社区矫正对象基础信息(标准7)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, JzObject jzObject)
{
List<JzObject> list = jzObjectService.selectJzObjectList(jzObject);
ExcelUtil<JzObject> util = new ExcelUtil<JzObject>(JzObject.class);
util.exportExcel(response, list, "社区矫正对象基础信息(标准7)数据");
}
/**
* 获取社区矫正对象基础信息(标准7)详细信息
*/
@RequiresPermissions("busi:OBJECT:query")
@GetMapping(value = "/{SQJZDXBH}")
public AjaxResult getInfo(@PathVariable("SQJZDXBH") String SQJZDXBH)
{
return success(jzObjectService.selectJzObjectBySQJZDXBH(SQJZDXBH));
}
/**
* 新增社区矫正对象基础信息(标准7)
*/
@RequiresPermissions("busi:OBJECT:add")
@Log(title = "社区矫正对象基础信息(标准7)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody JzObject jzObject)
{
return toAjax(jzObjectService.insertJzObject(jzObject));
}
/**
* 修改社区矫正对象基础信息(标准7)
*/
@RequiresPermissions("busi:OBJECT:edit")
@Log(title = "社区矫正对象基础信息(标准7)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody JzObject jzObject)
{
return toAjax(jzObjectService.updateJzObject(jzObject));
}
/**
* 删除社区矫正对象基础信息(标准7)
*/
@RequiresPermissions("busi:OBJECT:remove")
@Log(title = "社区矫正对象基础信息(标准7)", businessType = BusinessType.DELETE)
@DeleteMapping("/{SQJZDXBHs}")
public AjaxResult remove(@PathVariable String[] SQJZDXBHs)
{
return toAjax(jzObjectService.deleteJzObjectBySQJZDXBHs(SQJZDXBHs));
}
}
package com.ruoyi.busi.domain.vo;
import com.ruoyi.common.core.utils.StringUtils;
/**
* 路由显示信息
*
* @author ruoyi
*/
public class MetaVo
{
/**
* 设置该路由在侧边栏和面包屑中展示的名字
*/
private String title;
/**
* 设置该路由的图标,对应路径src/assets/icons/svg
*/
private String icon;
/**
* 设置为true,则不会被 <keep-alive>缓存
*/
private boolean noCache;
/**
* 内链地址(http(s)://开头)
*/
private String link;
public MetaVo()
{
}
public MetaVo(String title, String icon)
{
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link)
{
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
if (StringUtils.ishttp(link))
{
this.link = link;
}
}
public boolean isNoCache()
{
return noCache;
}
public void setNoCache(boolean noCache)
{
this.noCache = noCache;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getLink()
{
return link;
}
public void setLink(String link)
{
this.link = link;
}
}
package com.ruoyi.busi.mapper;
import java.util.List;
import com.ruoyi.busi.domain.JzObject;
/**
* 社区矫正对象基础信息(标准7)Mapper接口
*
* @author ruoyi
* @date 2026-07-23
*/
public interface JzObjectMapper
{
/**
* 查询社区矫正对象基础信息(标准7)
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 社区矫正对象基础信息(标准7)
*/
public JzObject selectJzObjectBySQJZDXBH(String SQJZDXBH);
/**
* 查询社区矫正对象基础信息(标准7)列表
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 社区矫正对象基础信息(标准7)集合
*/
public List<JzObject> selectJzObjectList(JzObject jzObject);
/**
* 新增社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
public int insertJzObject(JzObject jzObject);
/**
* 修改社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
public int updateJzObject(JzObject jzObject);
/**
* 删除社区矫正对象基础信息(标准7)
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 结果
*/
public int deleteJzObjectBySQJZDXBH(String SQJZDXBH);
/**
* 批量删除社区矫正对象基础信息(标准7)
*
* @param SQJZDXBHs 需要删除的数据主键集合
* @return 结果
*/
public int deleteJzObjectBySQJZDXBHs(String[] SQJZDXBHs);
}
package com.ruoyi.busi.service;
import java.util.List;
import com.ruoyi.busi.domain.JzObject;
/**
* 社区矫正对象基础信息(标准7)Service接口
*
* @author ruoyi
* @date 2026-07-23
*/
public interface IJzObjectService
{
/**
* 查询社区矫正对象基础信息(标准7)
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 社区矫正对象基础信息(标准7)
*/
public JzObject selectJzObjectBySQJZDXBH(String SQJZDXBH);
/**
* 查询社区矫正对象基础信息(标准7)列表
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 社区矫正对象基础信息(标准7)集合
*/
public List<JzObject> selectJzObjectList(JzObject jzObject);
/**
* 新增社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
public int insertJzObject(JzObject jzObject);
/**
* 修改社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
public int updateJzObject(JzObject jzObject);
/**
* 批量删除社区矫正对象基础信息(标准7)
*
* @param SQJZDXBHs 需要删除的社区矫正对象基础信息(标准7)主键集合
* @return 结果
*/
public int deleteJzObjectBySQJZDXBHs(String[] SQJZDXBHs);
/**
* 删除社区矫正对象基础信息(标准7)信息
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 结果
*/
public int deleteJzObjectBySQJZDXBH(String SQJZDXBH);
}
package com.ruoyi.busi.service.impl;
import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.busi.mapper.JzObjectMapper;
import com.ruoyi.busi.domain.JzObject;
import com.ruoyi.busi.service.IJzObjectService;
/**
* 社区矫正对象基础信息(标准7)Service业务层处理
*
* @author ruoyi
* @date 2026-07-23
*/
@Service
public class JzObjectServiceImpl implements IJzObjectService
{
@Autowired
private JzObjectMapper jzObjectMapper;
/**
* 查询社区矫正对象基础信息(标准7)
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 社区矫正对象基础信息(标准7)
*/
@Override
public JzObject selectJzObjectBySQJZDXBH(String SQJZDXBH)
{
return jzObjectMapper.selectJzObjectBySQJZDXBH(SQJZDXBH);
}
/**
* 查询社区矫正对象基础信息(标准7)列表
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 社区矫正对象基础信息(标准7)
*/
@Override
public List<JzObject> selectJzObjectList(JzObject jzObject)
{
return jzObjectMapper.selectJzObjectList(jzObject);
}
/**
* 新增社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
@Override
public int insertJzObject(JzObject jzObject)
{
jzObject.setCreateTime(DateUtils.getNowDate());
return jzObjectMapper.insertJzObject(jzObject);
}
/**
* 修改社区矫正对象基础信息(标准7)
*
* @param jzObject 社区矫正对象基础信息(标准7)
* @return 结果
*/
@Override
public int updateJzObject(JzObject jzObject)
{
jzObject.setUpdateTime(DateUtils.getNowDate());
return jzObjectMapper.updateJzObject(jzObject);
}
/**
* 批量删除社区矫正对象基础信息(标准7)
*
* @param SQJZDXBHs 需要删除的社区矫正对象基础信息(标准7)主键
* @return 结果
*/
@Override
public int deleteJzObjectBySQJZDXBHs(String[] SQJZDXBHs)
{
return jzObjectMapper.deleteJzObjectBySQJZDXBHs(SQJZDXBHs);
}
/**
* 删除社区矫正对象基础信息(标准7)信息
*
* @param SQJZDXBH 社区矫正对象基础信息(标准7)主键
* @return 结果
*/
@Override
public int deleteJzObjectBySQJZDXBH(String SQJZDXBH)
{
return jzObjectMapper.deleteJzObjectBySQJZDXBH(SQJZDXBH);
}
}
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:dm://8.142.21.6:5236?schema=JZ_TEST
username: SYSDBA
password: Dameng1@34
driver-class-name: dm.jdbc.driver.DmDriver
redis:
host: localhost
port: 6379
mybatis:
mapper-locations: classpath*:mapper/**/*Mapper.xml
type-aliases-package: com.ruoyi.**.domain
pagehelper:
helper-dialect: dm
reasonable: true
support-methods-arguments: true
params: count=countSql
Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name}
智慧矫正业务服务
\ No newline at end of file
# Tomcat
server:
port: 9210
# Spring
spring:
application:
# 应用名称
name: ruoyi-busi
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
config:
# 配置文件格式
file-extension: yml
import:
- classpath:application-${spring.profiles.active}.${spring.config.file-extension}
- nacos:application-${spring.profiles.active}.${spring.config.file-extension}
- nacos:${spring.application.name}-${spring.profiles.active}.${spring.config.file-extension}
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/ruoyi-system" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
</configuration>
\ No newline at end of file
package com.ruoyi.file.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -12,26 +13,15 @@ import io.minio.MinioClient;
*/
@Configuration
@ConfigurationProperties(prefix = "minio")
@ConditionalOnProperty(value = "minio.enabled", havingValue = "true", matchIfMissing = false)
public class MinioConfig
{
/**
* 服务地址
*/
private String url;
/**
* 用户名
*/
private String accessKey;
/**
* 密码
*/
private String secretKey;
/**
* 存储桶名称
*/
private String bucketName;
public String getUrl()
......@@ -79,4 +69,4 @@ public class MinioConfig
{
return MinioClient.builder().endpoint(url).credentials(accessKey, secretKey).build();
}
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.ruoyi.file.service;
import java.io.InputStream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.nacos.common.utils.IoUtils;
......@@ -18,6 +19,7 @@ import io.minio.RemoveObjectArgs;
* @author ruoyi
*/
@Service
@ConditionalOnProperty(value = "minio.enabled", havingValue = "true", matchIfMissing = false)
public class MinioSysFileServiceImpl implements ISysFileService
{
@Autowired
......@@ -26,13 +28,6 @@ public class MinioSysFileServiceImpl implements ISysFileService
@Autowired
private MinioClient client;
/**
* Minio文件上传接口
*
* @param file 上传的文件
* @return 访问地址
* @throws Exception
*/
@Override
public String uploadFile(MultipartFile file) throws Exception
{
......@@ -60,12 +55,6 @@ public class MinioSysFileServiceImpl implements ISysFileService
}
}
/**
* Minio文件删除接口
*
* @param fileUrl 文件访问URL
* @throws Exception
*/
@Override
public void deleteFile(String fileUrl) throws Exception
{
......@@ -79,4 +68,4 @@ public class MinioSysFileServiceImpl implements ISysFileService
throw new RuntimeException("Minio Failed to delete file", e);
}
}
}
}
\ No newline at end of file
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:dm://8.142.21.6:5236?schema=JZ_TEST
username: SYSDBA
password: Dameng1@34
driver-class-name: dm.jdbc.driver.DmDriver
redis:
host: localhost
port: 6379
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
mybatis:
mapper-locations: classpath*:mapper/**/*Mapper.xml
type-aliases-package: com.ruoyi.**.domain
pagehelper:
helper-dialect: dm
reasonable: true
support-methods-arguments: true
params: count=countSql
file:
prefix: /profile/upload
path: D:/profile/upload
domain: http://localhost:9300
referer:
enabled: false
allowed-domains: http://localhost
minio:
enabled: false
\ No newline at end of file
......@@ -5,22 +5,16 @@ server:
# Spring
spring:
application:
# 应用名称
name: ruoyi-file
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
import-check:
enabled: false
config:
# 配置文件格式
file-extension: yml
import:
- nacos:application-${spring.profiles.active}.${spring.config.file-extension}
- nacos:${spring.application.name}-${spring.profiles.active}.${spring.config.file-extension}
file-extension: yml
\ No newline at end of file
......@@ -53,6 +53,12 @@
<artifactId>Dm8JdbcDriver18</artifactId>
</dependency>
<!-- RuoYi Common DataSource -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-datasource</artifactId>
</dependency>
<!-- RuoYi Common Log -->
<dependency>
<groupId>com.ruoyi</groupId>
......
<?xml version="1.0" encoding="UTF-8" ?>
<?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">
......@@ -41,15 +41,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
select t.column_name,
(case when (t.nullable = 'N' && t.constraint_type != 'P') then '1' else null end) as is_required,
(case when t.constraint_type = 'P' then '1' else '0' end) as is_pk,
(case when (t.nullable = 'N' and pk.constraint_type != 'P') then '1' else null end) as is_required,
(case when pk.constraint_type = 'P' then '1' else '0' end) as is_pk,
t.column_id as sort,
tc.comments as column_comment,
(case when t.identity_column = 'YES' then '1' else '0' end) as is_increment,
'0' as is_increment,
t.data_type || (case when t.data_type in ('VARCHAR', 'CHAR', 'DECIMAL', 'NUMBER') then '(' || t.data_length || ')' else '' end) as column_type
from user_tab_columns t
left join user_col_comments tc on t.table_name = tc.table_name and t.column_name = tc.column_name
left join (select table_name, column_name, constraint_type from user_cons_columns ucc join user_constraints uc on ucc.constraint_name = uc.constraint_name where uc.constraint_type = 'P') pk
left join (select ucc.table_name, ucc.column_name, uc.constraint_type from user_cons_columns ucc join user_constraints uc on ucc.constraint_name = uc.constraint_name where uc.constraint_type = 'P') pk
on t.table_name = pk.table_name and t.column_name = pk.column_name
where t.table_name = (#{tableName})
order by t.column_id
......
<?xml version="1.0" encoding="UTF-8" ?>
<?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">
......@@ -78,9 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
select t.table_name, tc.comments as table_comment, t.created as create_time, t.last_ddl_time as update_time
select t.table_name, tc.comments as table_comment, u.created as create_time, u.last_ddl_time as update_time
from user_tables t
left join user_tab_comments tc on t.table_name = tc.table_name
left join user_objects u on t.table_name = u.object_name and u.object_type = 'TABLE'
WHERE t.table_name NOT LIKE 'QRTZ_%' AND t.table_name NOT LIKE 'GEN_%'
AND t.table_name NOT IN (select table_name from gen_table)
<if test="tableName != null and tableName != ''">
......@@ -89,19 +90,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tableComment != null and tableComment != ''">
AND lower(tc.comments) like lower(concat('%', #{tableComment}, '%'))
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND to_char(t.created, 'yyyyMMdd') &gt;= to_char(#{params.beginTime}, 'yyyyMMdd')
<if test="params.beginTime != null and params.beginTime != ''">
AND to_char(u.created, 'yyyyMMdd') &gt;= to_char(#{params.beginTime}, 'yyyyMMdd')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND to_char(t.created, 'yyyyMMdd') &lt;= to_char(#{params.endTime}, 'yyyyMMdd')
<if test="params.endTime != null and params.endTime != ''">
AND to_char(u.created, 'yyyyMMdd') &lt;= to_char(#{params.endTime}, 'yyyyMMdd')
</if>
order by t.created desc
order by u.created desc
</select>
<select id="selectDbTableListByNames" resultMap="GenTableResult">
select t.table_name, tc.comments as table_comment, t.created as create_time, t.last_ddl_time as update_time
select t.table_name, tc.comments as table_comment, u.created as create_time, u.last_ddl_time as update_time
from user_tables t
left join user_tab_comments tc on t.table_name = tc.table_name
left join user_objects u on t.table_name = u.object_name and u.object_type = 'TABLE'
where t.table_name NOT LIKE 'QRTZ_%' and t.table_name NOT LIKE 'GEN_%'
and t.table_name in
<foreach collection="array" item="name" open="(" separator="," close=")">
......@@ -110,9 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
select t.table_name, tc.comments as table_comment, t.created as create_time, t.last_ddl_time as update_time
select t.table_name, tc.comments as table_comment, u.created as create_time, u.last_ddl_time as update_time
from user_tables t
left join user_tab_comments tc on t.table_name = tc.table_name
left join user_objects u on t.table_name = u.object_name and u.object_type = 'TABLE'
where tc.comments <![CDATA[ <> ]]> ''
and t.table_name = #{tableName}
</select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论