-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-…
…vue-pro # Conflicts: # yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationRecordController.java # yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/job/product/ProductStatisticsJob.java # yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/framework/order/config/TradeOrderProperties.java # yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/order/dto/PayOrderCreateReqDTO.java # yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundCreateReqDTO.java # yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferCreateReqDTO.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/transfer/PayTransferServiceImpl.java # yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java # yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/TencentSmsClient.java # yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/framework/sms/core/client/impl/SmsClientTests.java
- Loading branch information
Showing
80 changed files
with
1,454 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ain/java/cn/iocoder/yudao/module/ai/controller/admin/image/vo/AiImagePublicPageReqVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package cn.iocoder.yudao.module.ai.controller.admin.image.vo; | ||
|
||
import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
|
||
@Schema(description = "管理后台 - AI 绘画公开的分页 Request VO") | ||
@Data | ||
public class AiImagePublicPageReqVO extends PageParam { | ||
|
||
@Schema(description = "提示词") | ||
private String prompt; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../main/java/cn/iocoder/yudao/module/ai/controller/admin/mindmap/vo/AiMindMapPageReqVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cn.iocoder.yudao.module.ai.controller.admin.mindmap.vo; | ||
|
||
import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.ToString; | ||
import org.springframework.format.annotation.DateTimeFormat; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | ||
|
||
@Schema(description = "管理后台 - AI 思维导图分页 Request VO") | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@ToString(callSuper = true) | ||
public class AiMindMapPageReqVO extends PageParam { | ||
|
||
@Schema(description = "用户编号", example = "4325") | ||
private Long userId; | ||
|
||
@Schema(description = "生成内容提示", example = "Java 学习路线") | ||
private String prompt; | ||
|
||
@Schema(description = "创建时间") | ||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
private LocalDateTime[] createTime; | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...src/main/java/cn/iocoder/yudao/module/ai/controller/admin/mindmap/vo/AiMindMapRespVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cn.iocoder.yudao.module.ai.controller.admin.mindmap.vo; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Schema(description = "管理后台 - AI 思维导图 Response VO") | ||
@Data | ||
public class AiMindMapRespVO { | ||
|
||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3373") | ||
private Long id; | ||
|
||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4325") | ||
private Long userId; | ||
|
||
@Schema(description = "生成内容提示", requiredMode = Schema.RequiredMode.REQUIRED, example = "Java 学习路线") | ||
private String prompt; | ||
|
||
@Schema(description = "生成的思维导图内容") | ||
private String generatedContent; | ||
|
||
@Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED, example = "OpenAI") | ||
private String platform; | ||
|
||
@Schema(description = "模型", requiredMode = Schema.RequiredMode.REQUIRED, example = "gpt-3.5-turbo-0125") | ||
private String model; | ||
|
||
@Schema(description = "错误信息") | ||
private String errorMessage; | ||
|
||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | ||
private LocalDateTime createTime; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/knowledge/DocService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cn.iocoder.yudao.module.ai.service.knowledge; | ||
|
||
/** | ||
* AI 知识库 Service 接口 | ||
* | ||
* @author xiaoxin | ||
*/ | ||
public interface DocService { | ||
|
||
/** | ||
* 向量化文档 | ||
*/ | ||
void embeddingDoc(); | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...ule-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/knowledge/DocServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package cn.iocoder.yudao.module.ai.service.knowledge; | ||
|
||
import jakarta.annotation.Resource; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.ai.document.Document; | ||
import org.springframework.ai.reader.tika.TikaDocumentReader; | ||
import org.springframework.ai.transformer.splitter.TokenTextSplitter; | ||
import org.springframework.ai.vectorstore.RedisVectorStore; | ||
import org.springframework.beans.factory.annotation.Value; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* AI 知识库 Service 实现类 | ||
* | ||
* @author xiaoxin | ||
*/ | ||
//@Service // TODO 芋艿:临时注释,避免无法启动 | ||
@Slf4j | ||
public class DocServiceImpl implements DocService { | ||
|
||
@Resource | ||
private RedisVectorStore vectorStore; | ||
@Resource | ||
private TokenTextSplitter tokenTextSplitter; | ||
|
||
// TODO @xin 临时测试用,后续删 | ||
@Value("classpath:/webapp/test/Fel.pdf") | ||
private org.springframework.core.io.Resource data; | ||
|
||
@Override | ||
public void embeddingDoc() { | ||
// 读取文件 | ||
TikaDocumentReader loader = new TikaDocumentReader(data); | ||
List<Document> documents = loader.get(); | ||
// 文档分段 | ||
List<Document> segments = tokenTextSplitter.apply(documents); | ||
// 向量化并存储 | ||
vectorStore.add(segments); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.