mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-13 20:53:42 +08:00
Merge remote-tracking branch 'upstream/main' into feat_vectorStore
This commit is contained in:
10
README.md
10
README.md
@@ -8,8 +8,18 @@
|
||||
[![Issues][issues-shield]][issues-url]
|
||||
[![MIT License][license-shield]][license-url]
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="https://trendshift.io/repositories/13209">
|
||||
<img src="https://trendshift.io/api/badge/repositories/13209" alt="GitHub Trending">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
<img src="image/00.png" alt="RuoYi AI Logo" width="120" height="120">
|
||||
|
||||
|
||||
|
||||
### 企业级AI助手平台
|
||||
|
||||
*开箱即用的智能AI平台,深度集成 FastGPT、扣子(Coze)、DIFY 等主流AI平台,提供先进的RAG技术和多模型支持*
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -20,7 +20,7 @@
|
||||
<java.version>17</java.version>
|
||||
<mysql.version>8.0.33</mysql.version>
|
||||
<mybatis.version>3.5.16</mybatis.version>
|
||||
<springdoc.version>2.8.5</springdoc.version>
|
||||
<springdoc.version>2.8.13</springdoc.version>
|
||||
<therapi-javadoc.version>0.15.0</therapi-javadoc.version>
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<easyexcel.version>3.2.1</easyexcel.version>
|
||||
|
||||
@@ -144,6 +144,15 @@ security:
|
||||
# swagger 文档配置
|
||||
- /*/api-docs
|
||||
- /*/api-docs/**
|
||||
- /v3/api-docs
|
||||
- /v3/api-docs/**
|
||||
- /v3/api-docs/swagger-config
|
||||
- /swagger-ui.html
|
||||
- /swagger-ui/**
|
||||
- /doc.html
|
||||
- /webjars/**
|
||||
- /swagger-resources
|
||||
- /swagger-resources/**
|
||||
# actuator 监控配置
|
||||
- /actuator
|
||||
- /actuator/**
|
||||
@@ -231,9 +240,9 @@ springdoc:
|
||||
# persistAuthorization: true
|
||||
info:
|
||||
# 标题
|
||||
title: '标题:RuoYi-Vue-Plus多租户管理系统_接口文档'
|
||||
title: '标题:ruoyi-ai 接口文档'
|
||||
# 描述
|
||||
description: ' 用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
|
||||
description: ''
|
||||
# 版本
|
||||
version: '版本号: ${ruoyi.version}'
|
||||
# 作者信息
|
||||
@@ -249,16 +258,19 @@ springdoc:
|
||||
in: HEADER
|
||||
name: ${sa-token.token-name}
|
||||
#这里定义了两个分组,可定义多个,也可以不定义
|
||||
group-configs:
|
||||
- group: 1.系统模块
|
||||
packages-to-scan: org.ruoyi.system
|
||||
packages-to-scan: org.ruoyi
|
||||
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh_cn
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
# 过滤开关
|
||||
enabled: true
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice
|
||||
excludes: /system/notice,/v3/api-docs/**,/doc.html,/swagger-ui/**,/swagger-ui.html,/swagger-resources/**,/webjars/**,/druid/**,/actuator/**,/favicon.ico
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
@@ -290,6 +302,7 @@ management:
|
||||
logfile:
|
||||
external-file: ./logs/sys-console.log
|
||||
|
||||
# websocket
|
||||
# websocket
|
||||
websocket:
|
||||
enabled: true
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.ruoyi.common.core.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import org.ruoyi.common.core.config.properties.ThreadPoolProperties;
|
||||
import org.ruoyi.common.core.utils.Threads;
|
||||
@@ -18,6 +19,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
*
|
||||
* @author Lion Li
|
||||
**/
|
||||
@Slf4j
|
||||
@AutoConfiguration
|
||||
@EnableConfigurationProperties(ThreadPoolProperties.class)
|
||||
public class ThreadPoolConfig {
|
||||
@@ -43,7 +45,8 @@ public class ThreadPoolConfig {
|
||||
* 执行周期性或定时任务
|
||||
*/
|
||||
@Bean(name = "scheduledExecutorService")
|
||||
protected ScheduledExecutorService scheduledExecutorService() {
|
||||
public ScheduledExecutorService scheduledExecutorService() {
|
||||
log.info("====创建定时任务线程池====");
|
||||
return new ScheduledThreadPoolExecutor(core,
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy()) {
|
||||
|
||||
@@ -68,7 +68,7 @@ public class OssClient {
|
||||
}
|
||||
this.client = build.build();
|
||||
|
||||
createBucket();
|
||||
// createBucket();
|
||||
} catch (Exception e) {
|
||||
if (e instanceof OssException) {
|
||||
throw e;
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||
import org.springframework.web.util.pattern.PathPattern;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -35,7 +36,17 @@ public class AllUrlHandler implements InitializingBean {
|
||||
Pattern pattern = Pattern.compile("\\{(.*?)\\}");
|
||||
|
||||
Set<String> handlerSet = handlerMethods.keySet().stream()
|
||||
.flatMap(info -> info.getPatternsCondition().getPatterns().stream())
|
||||
.flatMap(info -> {
|
||||
// Spring 5 (AntPath) 风格
|
||||
if (info.getPatternsCondition() != null && info.getPatternsCondition().getPatterns() != null) {
|
||||
return info.getPatternsCondition().getPatterns().stream();
|
||||
}
|
||||
// Spring 6 (PathPattern) 风格
|
||||
if (info.getPathPatternsCondition() != null && info.getPathPatternsCondition().getPatterns() != null) {
|
||||
return info.getPathPatternsCondition().getPatterns().stream().map(PathPattern::getPatternString);
|
||||
}
|
||||
return java.util.stream.Stream.<String>empty();
|
||||
})
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 获取注解上边的 path 替代 path variable 为 *
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<spring-ai.version>1.0.0-M7</spring-ai.version>
|
||||
<spring-ai.version>1.0.0</spring-ai.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring-ai.version>1.0.0-M7</spring-ai.version>
|
||||
<spring-ai.version>1.0.0</spring-ai.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ChatModelServiceImpl implements IChatModelService {
|
||||
* 查询聊天模型
|
||||
*/
|
||||
@Override
|
||||
public ChatModelVo queryById(Long id){
|
||||
public ChatModelVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ChatModelServiceImpl implements IChatModelService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ChatModel entity){
|
||||
private void validEntityBeforeSave(ChatModel entity) {
|
||||
// 判断是否包含*号
|
||||
if (entity.getApiKey().contains("*")) {
|
||||
// 重新设置key信息
|
||||
@@ -116,7 +116,7 @@ public class ChatModelServiceImpl implements IChatModelService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
@@ -129,24 +129,25 @@ public class ChatModelServiceImpl implements IChatModelService {
|
||||
public ChatModelVo selectModelByName(String modelName) {
|
||||
return baseMapper.selectVoOne(Wrappers.<ChatModel>lambdaQuery().eq(ChatModel::getModelName, modelName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过模型分类获取模型信息
|
||||
*/
|
||||
@Override
|
||||
public ChatModelVo selectModelByCategory(String category) {
|
||||
public ChatModelVo selectModelByCategory(String category) {
|
||||
return baseMapper.selectVoOne(Wrappers.<ChatModel>lambdaQuery().eq(ChatModel::getCategory, category));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过模型分类获取优先级最高的模型信息
|
||||
*/
|
||||
@Override
|
||||
public ChatModelVo selectModelByCategoryWithHighestPriority(String category) {
|
||||
return baseMapper.selectVoOne(
|
||||
Wrappers.<ChatModel>lambdaQuery()
|
||||
.eq(ChatModel::getCategory, category)
|
||||
.orderByDesc(ChatModel::getPriority)
|
||||
.last("LIMIT 1")
|
||||
Wrappers.<ChatModel>lambdaQuery()
|
||||
.eq(ChatModel::getCategory, category)
|
||||
.orderByDesc(ChatModel::getPriority),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -156,11 +157,11 @@ public class ChatModelServiceImpl implements IChatModelService {
|
||||
@Override
|
||||
public ChatModelVo selectFallbackModelByCategoryAndLessPriority(String category, Integer currentPriority) {
|
||||
return baseMapper.selectVoOne(
|
||||
Wrappers.<ChatModel>lambdaQuery()
|
||||
.eq(ChatModel::getCategory, category)
|
||||
.lt(ChatModel::getPriority, currentPriority)
|
||||
.orderByDesc(ChatModel::getPriority)
|
||||
.last("LIMIT 1")
|
||||
Wrappers.<ChatModel>lambdaQuery()
|
||||
.eq(ChatModel::getCategory, category)
|
||||
.lt(ChatModel::getPriority, currentPriority)
|
||||
.orderByDesc(ChatModel::getPriority),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ public class ChatTokenServiceImpl implements IChatTokenService {
|
||||
@Override
|
||||
public ChatUsageToken queryByUserId(Long userId, String modelName) {
|
||||
return baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<ChatUsageToken>()
|
||||
.eq(ChatUsageToken::getUserId, userId)
|
||||
.eq(ChatUsageToken::getModelName, modelName)
|
||||
.last("limit 1")
|
||||
new LambdaQueryWrapper<ChatUsageToken>()
|
||||
.eq(ChatUsageToken::getUserId, userId)
|
||||
.eq(ChatUsageToken::getModelName, modelName),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ChatTokenServiceImpl implements IChatTokenService {
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void resetToken(Long userId,String modelName) {
|
||||
public void resetToken(Long userId, String modelName) {
|
||||
ChatUsageToken chatToken = queryByUserId(userId, modelName);
|
||||
chatToken.setToken(0);
|
||||
baseMapper.updateById(chatToken);
|
||||
@@ -47,9 +47,9 @@ public class ChatTokenServiceImpl implements IChatTokenService {
|
||||
*/
|
||||
@Override
|
||||
public void editToken(ChatUsageToken chatToken) {
|
||||
if(chatToken.getId() == null){
|
||||
if (chatToken.getId() == null) {
|
||||
baseMapper.insert(chatToken);
|
||||
}else {
|
||||
} else {
|
||||
baseMapper.updateById(chatToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ public class PromptTemplateServiceImpl implements IPromptTemplateService {
|
||||
LambdaQueryWrapper<PromptTemplate> queryWrapper = Wrappers.lambdaQuery(PromptTemplate.class);
|
||||
queryWrapper.eq(PromptTemplate::getCategory, category);
|
||||
queryWrapper.orderByDesc(PromptTemplate::getUpdateTime);
|
||||
queryWrapper.last("limit 1");
|
||||
return baseMapper.selectVoOne(queryWrapper);
|
||||
return baseMapper.selectVoOne(queryWrapper, false);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package org.ruoyi.mapper;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.ruoyi.core.mapper.BaseMapperPlus;
|
||||
import org.ruoyi.domain.KnowledgeInfo;
|
||||
import org.ruoyi.domain.vo.KnowledgeInfoVo;
|
||||
@@ -15,4 +16,10 @@ import org.ruoyi.domain.vo.KnowledgeInfoVo;
|
||||
@Mapper
|
||||
public interface KnowledgeInfoMapper extends BaseMapperPlus<KnowledgeInfo, KnowledgeInfoVo> {
|
||||
|
||||
/**
|
||||
* 根据kid查询知识库
|
||||
* @param kid 知识库id
|
||||
* @return KnowledgeInfo
|
||||
*/
|
||||
KnowledgeInfo selectByKid(@Param("kid") String kid);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public interface IKnowledgeInfoService {
|
||||
/**
|
||||
* 删除知识库
|
||||
*/
|
||||
void removeKnowledge(String id);
|
||||
void removeKnowledge(String kid);
|
||||
|
||||
/**
|
||||
* 上传附件
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?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="org.ruoyi.mapper.KnowledgeInfoMapper">
|
||||
<select id="selectByKid" resultType="org.ruoyi.domain.KnowledgeInfo">
|
||||
SELECT * FROM knowledge_info WHERE kid = #{kid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -19,7 +19,7 @@
|
||||
<jda.version>5.0.0-beta.9</jda.version>
|
||||
<chatgpt-java.version>1.1.2-beta0</chatgpt-java.version>
|
||||
<dataurl.version>2.0.0</dataurl.version>
|
||||
<knife4j.verison>4.1.0</knife4j.verison>
|
||||
<knife4j.verison>4.4.0</knife4j.verison>
|
||||
<user-agent-utils.verison>1.21</user-agent-utils.verison>
|
||||
<httpclient.verison>4.5.14</httpclient.verison>
|
||||
<java.version>17</java.version>
|
||||
@@ -72,10 +72,16 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.verison}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>${springdoc.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
|
||||
@@ -102,9 +102,9 @@ public class KnowledgeController extends BaseController {
|
||||
/**
|
||||
* 删除知识库
|
||||
*/
|
||||
@PostMapping("/remove/{id}")
|
||||
public R<String> remove(@PathVariable String id) {
|
||||
knowledgeInfoService.removeKnowledge(id);
|
||||
@PostMapping("/remove/{kid}")
|
||||
public R<String> remove(@PathVariable String kid) {
|
||||
knowledgeInfoService.removeKnowledge(kid);
|
||||
return R.ok("删除知识库成功!");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.ruoyi.chat.controller.tripartite;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Request;
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author ageerle
|
||||
* @date 2025-05-03
|
||||
*/
|
||||
@Api(tags = "任务查询")
|
||||
@Tag(name = "任务查询")
|
||||
@RestController
|
||||
@RequestMapping("/mj")
|
||||
@RequiredArgsConstructor
|
||||
@@ -32,7 +32,7 @@ public class FaceController {
|
||||
|
||||
private final MjOkHttpUtil mjOkHttpUtil;
|
||||
|
||||
@ApiOperation(value = "换脸")
|
||||
@Operation(summary = "换脸")
|
||||
@PostMapping("/insight-face/swap")
|
||||
public String insightFace(@RequestBody InsightFace insightFace) {
|
||||
// 扣除接口费用并且保存消息记录
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.ruoyi.chat.controller.tripartite;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Request;
|
||||
@@ -28,7 +28,7 @@ public class LumaController {
|
||||
private final IChatCostService chatCostService;
|
||||
|
||||
|
||||
@ApiOperation(value = "文生视频")
|
||||
@Operation(summary = "文生视频")
|
||||
@PostMapping("/generations/")
|
||||
public String generateVideo(@RequestBody GenerateLuma generateLuma) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("luma");
|
||||
@@ -40,7 +40,7 @@ public class LumaController {
|
||||
return okHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "文生视频任务查询")
|
||||
@Operation(summary = "文生视频任务查询")
|
||||
@GetMapping("/generations/{taskId}")
|
||||
public String getGenerationTask(@PathVariable String taskId) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("luma");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.ruoyi.chat.controller.tripartite;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Request;
|
||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
||||
* @author ageerle
|
||||
* @date 2025-05-03
|
||||
*/
|
||||
@Api(tags = "任务提交")
|
||||
@Tag(name = "任务提交")
|
||||
@RestController
|
||||
@RequestMapping("/mj/submit")
|
||||
@RequiredArgsConstructor
|
||||
@@ -33,7 +33,7 @@ public class SubmitController {
|
||||
private final IChatCostService chatCostService;
|
||||
private final MjOkHttpUtil mjOkHttpUtil;
|
||||
|
||||
@ApiOperation(value = "绘图变化")
|
||||
@Operation(summary = "绘图变化")
|
||||
@PostMapping("/change")
|
||||
public String change(@RequestBody SubmitChangeDTO changeDTO) {
|
||||
String jsonStr = JSONUtil.toJsonStr(changeDTO);
|
||||
@@ -42,7 +42,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "执行动作")
|
||||
@Operation(summary = "执行动作")
|
||||
@PostMapping("/action")
|
||||
public String action(@RequestBody SubmitActionDTO changeDTO) {
|
||||
ActionType actionType = ActionType.fromCustomId(getAction(changeDTO.getCustomId()));
|
||||
@@ -69,7 +69,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "绘图变化-simple")
|
||||
@Operation(summary = "绘图变化-simple")
|
||||
@PostMapping("/simple-change")
|
||||
public String simpleChange(@RequestBody SubmitSimpleChangeDTO simpleChangeDTO) {
|
||||
String jsonStr = JSONUtil.toJsonStr(simpleChangeDTO);
|
||||
@@ -78,7 +78,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交图生图、混图任务")
|
||||
@Operation(summary = "提交图生图、混图任务")
|
||||
@PostMapping("/blend")
|
||||
public String blend(@RequestBody SubmitBlendDTO blendDTO) {
|
||||
chatCostService.taskDeduct("mj","blend", 0.0);
|
||||
@@ -88,7 +88,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交图生文任务")
|
||||
@Operation(summary = "提交图生文任务")
|
||||
@PostMapping("/describe")
|
||||
public String describe(@RequestBody SubmitDescribeDTO describeDTO) {
|
||||
chatCostService.taskDeduct("mj","describe",0.0);
|
||||
@@ -98,7 +98,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交文生图任务")
|
||||
@Operation(summary = "提交文生图任务")
|
||||
@PostMapping("/imagine")
|
||||
public String imagine(@RequestBody SubmitImagineDTO imagineDTO) {
|
||||
chatCostService.taskDeduct("mj",imagineDTO.getPrompt(), 0.0);
|
||||
@@ -108,7 +108,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交局部重绘任务")
|
||||
@Operation(summary = "提交局部重绘任务")
|
||||
@PostMapping("/modal")
|
||||
public String modal(@RequestBody SubmitModalDTO submitModalDTO) {
|
||||
chatCostService.taskDeduct("mj","repaint ", 0.0);
|
||||
@@ -118,7 +118,7 @@ public class SubmitController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交提示词分析任务")
|
||||
@Operation(summary = "提交提示词分析任务")
|
||||
@PostMapping("/shorten")
|
||||
public String shorten(@RequestBody SubmitShortenDTO submitShortenDTO) {
|
||||
chatCostService.taskDeduct("mj","shorten", 0.0);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.ruoyi.chat.controller.tripartite;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Request;
|
||||
@@ -29,7 +29,7 @@ public class SunoController {
|
||||
private final OkHttpConfig okHttpConfig;
|
||||
private final IChatCostService chatCostService;
|
||||
|
||||
@ApiOperation(value = "文生歌曲")
|
||||
@Operation(summary = "文生歌曲")
|
||||
@PostMapping("/generate")
|
||||
public String generate(@RequestBody GenerateSuno generateSuno) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("suno");
|
||||
@@ -42,7 +42,7 @@ public class SunoController {
|
||||
return okHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "生成歌词")
|
||||
@Operation(summary = "生成歌词")
|
||||
@PostMapping("/generate/lyrics/")
|
||||
public String generate(@RequestBody GenerateLyric generateLyric) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("suno");
|
||||
@@ -53,7 +53,7 @@ public class SunoController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询歌词任务")
|
||||
@Operation(summary = "查询歌词任务")
|
||||
@GetMapping("/lyrics/{taskId}")
|
||||
public String lyrics(@PathVariable String taskId) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("suno");
|
||||
@@ -63,7 +63,7 @@ public class SunoController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询歌曲任务")
|
||||
@Operation(summary = "查询歌曲任务")
|
||||
@GetMapping("/feed/{taskId}")
|
||||
public String feed(@PathVariable String taskId) {
|
||||
OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("suno");
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.ruoyi.chat.controller.tripartite;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Request;
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @author ageerle
|
||||
* @date 2025-05-03
|
||||
*/
|
||||
@Api(tags = "任务查询")
|
||||
@Tag(name = "任务查询")
|
||||
@RestController
|
||||
@RequestMapping("/mj/task")
|
||||
@RequiredArgsConstructor
|
||||
@@ -27,15 +27,15 @@ public class TaskController {
|
||||
|
||||
private final MjOkHttpUtil mjOkHttpUtil;
|
||||
|
||||
@ApiOperation(value = "指定ID获取任务")
|
||||
@Operation(summary = "指定ID获取任务")
|
||||
@GetMapping("/{id}/fetch")
|
||||
public String fetch(@ApiParam(value = "任务ID") @PathVariable String id) {
|
||||
public String fetch(@Parameter(description = "任务ID") @PathVariable String id) {
|
||||
String url = "mj/task/" + id + "/fetch";
|
||||
Request request = mjOkHttpUtil.createGetRequest(url);
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据ID列表查询任务")
|
||||
@Operation(summary = "根据ID列表查询任务")
|
||||
@PostMapping("/list-by-condition")
|
||||
public String listByIds(@RequestBody TaskConditionDTO conditionDTO) {
|
||||
String url = "mj/task/list-by-condition";
|
||||
@@ -44,9 +44,9 @@ public class TaskController {
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取任务图片的seed")
|
||||
@Operation(summary = "获取任务图片的seed")
|
||||
@GetMapping("/{id}/image-seed")
|
||||
public String getSeed(@ApiParam(value = "任务ID") @PathVariable String id) {
|
||||
public String getSeed(@Parameter(description = "任务ID") @PathVariable String id) {
|
||||
String url = "mj/task/" + id + "/image-seed";
|
||||
Request request = mjOkHttpUtil.createGetRequest(url);
|
||||
return mjOkHttpUtil.executeRequest(request);
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.ruoyi.chat.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
public class DomainObject implements Serializable {
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModelProperty("ID")
|
||||
@Schema(description = "ID")
|
||||
protected String id;
|
||||
|
||||
@Setter
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.ruoyi.chat.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -10,13 +9,13 @@ import java.io.Serializable;
|
||||
* @author WangLe
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("Discord账号")
|
||||
@Schema(name = "Discord账号")
|
||||
public class InsightFace implements Serializable {
|
||||
/**本人头像json*/
|
||||
@ApiModelProperty("本人头像json")
|
||||
@Schema(description = "本人头像json")
|
||||
private String sourceBase64;
|
||||
|
||||
/**明星头像json*/
|
||||
@ApiModelProperty("明星头像json")
|
||||
@Schema(description = "明星头像json")
|
||||
private String targetBase64;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -8,9 +8,9 @@ import lombok.Setter;
|
||||
@Setter
|
||||
public abstract class BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty("自定义参数")
|
||||
@Schema(description = "自定义参数")
|
||||
protected String state;
|
||||
|
||||
@ApiModelProperty("回调地址, 为空时使用全局notifyHook")
|
||||
@Schema(description = "回调地址, 为空时使用全局notifyHook")
|
||||
protected String notifyHook;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel("变化任务提交参数")
|
||||
@Schema(name = "变化任务提交参数")
|
||||
public class SubmitActionDTO {
|
||||
|
||||
private String customId;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.ruoyi.chat.enums.BlendDimensions;
|
||||
@@ -9,13 +9,13 @@ import org.ruoyi.chat.enums.BlendDimensions;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("Blend提交参数")
|
||||
@Schema(name = "Blend提交参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SubmitBlendDTO extends BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty(value = "图片base64数组", required = true, example = "[\"data:image/png;base64,xxx1\", \"data:image/png;base64,xxx2\"]")
|
||||
@ArraySchema(arraySchema = @Schema(description = "图片base64数组", requiredMode = Schema.RequiredMode.REQUIRED), schema = @Schema(example = "data:image/png;base64,xxx1"))
|
||||
private List<String> base64Array;
|
||||
|
||||
@ApiModelProperty(value = "比例: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2)", example = "SQUARE")
|
||||
@Schema(description = "比例: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2)", example = "SQUARE")
|
||||
private BlendDimensions dimensions = BlendDimensions.SQUARE;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.ruoyi.chat.enums.TaskAction;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel("变化任务提交参数")
|
||||
@Schema(name = "变化任务提交参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SubmitChangeDTO extends BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty(value = "任务ID", required = true, example = "\"1320098173412546\"")
|
||||
@Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "\"1320098173412546\"")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty(value = "UPSCALE(放大); VARIATION(变换); REROLL(重新生成)", required = true,
|
||||
allowableValues = "UPSCALE, VARIATION, REROLL", example = "UPSCALE")
|
||||
@Schema(description = "UPSCALE(放大); VARIATION(变换); REROLL(重新生成)", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"UPSCALE", "VARIATION", "REROLL"}, example = "UPSCALE")
|
||||
private TaskAction action;
|
||||
|
||||
@ApiModelProperty(value = "序号(1~4), action为UPSCALE,VARIATION时必传", allowableValues = "range[1, 4]", example = "1")
|
||||
@Schema(description = "序号(1~4), action为UPSCALE,VARIATION时必传", minimum = "1", maximum = "4", example = "1")
|
||||
private Integer index;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@ApiModel("Describe提交参数")
|
||||
@Schema(name = "Describe提交参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SubmitDescribeDTO extends BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty(value = "图片base64", required = true, example = "data:image/png;base64,xxx")
|
||||
@Schema(description = "图片base64", requiredMode = Schema.RequiredMode.REQUIRED, example = "data:image/png;base64,xxx")
|
||||
private String base64;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -9,17 +8,17 @@ import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel("Imagine提交参数")
|
||||
@Schema(name = "Imagine提交参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SubmitImagineDTO extends BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty(value = "提示词", required = true, example = "Cat")
|
||||
@Schema(description = "提示词", requiredMode = Schema.RequiredMode.REQUIRED, example = "Cat")
|
||||
private String prompt;
|
||||
|
||||
@ApiModelProperty(value = "垫图base64数组")
|
||||
@Schema(description = "垫图base64数组")
|
||||
private List<String> base64Array;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
@Schema(hidden = true)
|
||||
@Deprecated(since = "3.0", forRemoval = true)
|
||||
private String base64;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("局部重绘提交参数")
|
||||
@Schema(name = "局部重绘提交参数")
|
||||
public class SubmitModalDTO extends BaseSubmitDTO{
|
||||
|
||||
private String maskBase64;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("prompt分析提交参数")
|
||||
@Schema(name = "prompt分析提交参数")
|
||||
public class SubmitShortenDTO extends BaseSubmitDTO{
|
||||
|
||||
private String botType;
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@Data
|
||||
@ApiModel("变化任务提交参数-simple")
|
||||
@Schema(name = "变化任务提交参数-simple")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SubmitSimpleChangeDTO extends BaseSubmitDTO {
|
||||
|
||||
@ApiModelProperty(value = "变化描述: ID $action$index", required = true, example = "1320098173412546 U2")
|
||||
@Schema(description = "变化描述: ID $action$index", requiredMode = Schema.RequiredMode.REQUIRED, example = "1320098173412546 U2")
|
||||
private String content;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package org.ruoyi.chat.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("任务查询参数")
|
||||
@Schema(name = "任务查询参数")
|
||||
public class TaskConditionDTO {
|
||||
|
||||
@ArraySchema(arraySchema = @Schema(description = "任务ID列表"), schema = @Schema(example = "1320098173412546"))
|
||||
private List<String> ids;
|
||||
|
||||
}
|
||||
|
||||
@@ -435,8 +435,8 @@ public class ChatCostServiceImpl implements IChatCostService {
|
||||
@Override
|
||||
public boolean checkBalanceSufficient(ChatRequest chatRequest) {
|
||||
if (chatRequest.getUserId() == null) {
|
||||
log.warn("checkBalanceSufficient->用户ID为空,视为余额不足");
|
||||
return false;
|
||||
log.warn("当前未登录");
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -118,7 +118,7 @@ public class ImageServiceImpl implements IChatService {
|
||||
@Override
|
||||
public SseEmitter chat(ChatRequest chatRequest, SseEmitter emitter) {
|
||||
// 从数据库获取 image 类型的模型配置
|
||||
ChatModelVo chatModelVo = chatModelService.selectModelByCategory(ChatModeType.IMAGE.getCode());
|
||||
ChatModelVo chatModelVo = chatModelService.selectModelByName(chatRequest.getModel());
|
||||
if (chatModelVo == null) {
|
||||
log.error("未找到 image 类型的模型配置");
|
||||
emitter.completeWithError(new IllegalStateException("未找到 image 类型的模型配置"));
|
||||
|
||||
@@ -43,7 +43,7 @@ public class OpenAIServiceImpl implements IChatService {
|
||||
this.chatClient = chatClientBuilder
|
||||
.defaultOptions(
|
||||
OpenAiChatOptions.builder().model("gpt-4o-mini").build())
|
||||
.defaultTools(new SyncMcpToolCallbackProvider(mcpSyncClients))
|
||||
.defaultToolCallbacks(new SyncMcpToolCallbackProvider(mcpSyncClients))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,16 @@ public class BillingChatServiceProxy implements IChatService {
|
||||
String errorMsg = "余额不足,无法使用AI服务,请充值后再试";
|
||||
log.warn("余额不足阻止AI回复,用户ID: {}, 模型: {}",
|
||||
chatRequest.getUserId(), chatRequest.getModel());
|
||||
throw new RuntimeException(errorMsg);
|
||||
try {
|
||||
emitter.send(errorMsg);
|
||||
emitter.complete();
|
||||
} catch (IOException e) {
|
||||
log.error("推送流异常,用户ID: {}, 模型: {}",
|
||||
chatRequest.getUserId(), chatRequest.getModel());
|
||||
emitter.complete();
|
||||
throw new RuntimeException(errorMsg);
|
||||
}
|
||||
return emitter;
|
||||
}
|
||||
|
||||
log.debug("余额检查通过,开始AI回复,用户ID: {}, 模型: {}",
|
||||
|
||||
@@ -226,11 +226,12 @@ public class KnowledgeInfoServiceImpl implements IKnowledgeInfoService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void removeKnowledge(String id) {
|
||||
public void removeKnowledge(String kid) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
KnowledgeInfo knowledgeInfo = baseMapper.selectById(id);
|
||||
KnowledgeInfo knowledgeInfo = baseMapper.selectByKid(kid);
|
||||
|
||||
check(knowledgeInfo);
|
||||
map.put("kid", knowledgeInfo.getId());
|
||||
map.put("kid", knowledgeInfo.getKid());
|
||||
// 删除向量数据
|
||||
vectorStoreService.removeById(String.valueOf(knowledgeInfo.getId()), knowledgeInfo.getVectorModelName());
|
||||
// 删除附件和知识片段
|
||||
|
||||
@@ -60,6 +60,23 @@ services:
|
||||
networks:
|
||||
- ruoyi-net
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
container_name: ruoyi-ai-minio
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9090:9090"
|
||||
environment:
|
||||
- MINIO_ACCESS_KEY=ruoyi
|
||||
- MINIO_SECRET_KEY=ruoyi123
|
||||
volumes:
|
||||
- ./data/minio:/data
|
||||
- ./data/minio-config:/root/.minio
|
||||
command: server /data --console-address ":9090"
|
||||
restart: always
|
||||
networks:
|
||||
- ruoyi-net
|
||||
|
||||
ruoyi-backend:
|
||||
image: ruoyi-ai-backend:v2.0.5
|
||||
container_name: ruoyi-ai-backend
|
||||
|
||||
28
script/docker/minio/docker-compose.yml
Normal file
28
script/docker/minio/docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minio:
|
||||
image: minio/minio
|
||||
container_name: minio
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9090:9090"
|
||||
environment:
|
||||
- MINIO_ACCESS_KEY=ruoyi
|
||||
- MINIO_SECRET_KEY=ruoyi123
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
- minio_config:/root/.minio
|
||||
command: server /data --console-address ":9090"
|
||||
restart: always
|
||||
networks:
|
||||
- minio-net
|
||||
|
||||
networks:
|
||||
minio-net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
minio_data:
|
||||
minio_config:
|
||||
8
script/sql/update/fix-upload-bucket.sql
Normal file
8
script/sql/update/fix-upload-bucket.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 默认开启本地minio
|
||||
UPDATE `ruoyi-ai`.sys_oss_config t
|
||||
SET t.status = '1'
|
||||
WHERE t.oss_config_id = 4;
|
||||
|
||||
UPDATE `ruoyi-ai`.sys_oss_config t
|
||||
SET t.status = '0'
|
||||
WHERE t.oss_config_id = 1;
|
||||
Reference in New Issue
Block a user