mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 20:35:29 +08:00
【合并升级v3.8.1】
Merge remote-tracking branch 'origin/master' into springboot3 # Conflicts: # jeecg-boot/README.md # jeecg-boot/db/tables_nacos.sql # jeecg-boot/jeecg-boot-base-core/pom.xml # jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java # jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java # jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebMvcConfiguration.java # jeecg-boot/jeecg-boot-module/jeecg-boot-module-airag/pom.xml # jeecg-boot/jeecg-boot-module/jeecg-boot-module-airag/src/main/java/org/jeecg/modules/airag/app/controller/AiragAppController.java # jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/monitor/actuator/httptrace/CustomInMemoryHttpTraceRepository.java # jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/service/impl/OpenApiPermissionServiceImpl.java # jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleIndexController.java # jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysUserService.java # jeecg-boot/jeecg-module-system/jeecg-system-start/pom.xml # jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml # jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/src/main/java/org/jeecg/JeecgSystemCloudApplication.java # jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/pom.xml # jeecg-boot/pom.xml # jeecgboot-vue3/pnpm-lock.yaml
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
//package org.jeecg.modules.demo.cloud.controller;
|
||||
//
|
||||
//import com.alibaba.csp.sentinel.annotation.SentinelResource;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
//import io.swagger.v3.oas.annotations.Operation;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.jeecg.common.api.vo.Result;
|
||||
//import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
@ -18,7 +18,7 @@
|
||||
// *
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Api(tags = "【微服务】单元测试")
|
||||
//@Tag(name = "【微服务】单元测试")
|
||||
//@RestController
|
||||
//@RequestMapping("/test")
|
||||
//public class JcloudDemoFeignController {
|
||||
@ -34,7 +34,7 @@
|
||||
// */
|
||||
// @GetMapping("/callSystem")
|
||||
// //@SentinelResource(value = "remoteDict",fallback = "getDefaultHandler")
|
||||
// @ApiOperation(value = "通过feign调用system服务", notes = "测试jeecg-demo服务,是否通过fegin调用system服务接口")
|
||||
// @Operation(summary = "通过feign调用system服务")
|
||||
// public Result getRemoteDict() {
|
||||
// List<DictModel> list = sysBaseApi.queryAllDict();
|
||||
// return Result.OK(list);
|
||||
@ -48,7 +48,7 @@
|
||||
//// * @return
|
||||
//// */
|
||||
//// @GetMapping("/callErp")
|
||||
//// @ApiOperation(value = "测试feign erp", notes = "测试feign erp")
|
||||
//// @Operation(summary = "测试feign erp")
|
||||
//// public Result callErp() {
|
||||
//// log.info("call erp 服务");
|
||||
//// String res = erpHelloApi.callHello();
|
||||
|
||||
@ -1,95 +0,0 @@
|
||||
package org.jeecg.modules.demo.gpt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.chatgpt.service.AiChatService;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240110 for:[QQYUN-5509]AI生成表结构和软文------------
|
||||
|
||||
/**
|
||||
* @Description: chatGpt接口
|
||||
* @Author: chenrui
|
||||
* @Date: 2024/1/9 16:30
|
||||
*/
|
||||
@Tag(name = "AI接口")
|
||||
@RestController
|
||||
@RequestMapping("/test/ai")
|
||||
@Slf4j
|
||||
public class AiController {
|
||||
|
||||
private static final String CACHE_PREFIX = "ai:resp:";
|
||||
|
||||
@Autowired
|
||||
AiChatService aiChatService;
|
||||
|
||||
|
||||
/**
|
||||
* 通过AI生成模块表设计
|
||||
* @param descr 描述
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/1/9 20:12
|
||||
*/
|
||||
@AutoLog(value = "通过AI生成模块表设计")
|
||||
@PostMapping(value = "/gen/schema/modules")
|
||||
@Operation(summary = "通过AI生成模块表设计")
|
||||
public Result<String> genSchemaModules(@RequestParam(name = "prompt", required = true) String prompt) {
|
||||
String result = aiChatService.genSchemaModules(prompt);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过AI生成软文
|
||||
* @param descr 描述
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/1/9 20:12
|
||||
*/
|
||||
@AutoLog(value = "通过AI生成软文")
|
||||
@PostMapping(value = "/gen/article")
|
||||
@Operation(summary = "通过AI生成软文")
|
||||
public Result<String> genArticle(@RequestParam(name = "prompt", required = true) String prompt) {
|
||||
String result = aiChatService.genArticleWithMd(prompt);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 向AI提问
|
||||
* @param message
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/1/15 19:11
|
||||
*/
|
||||
@AutoLog(value = "向AI提问")
|
||||
@PostMapping(value = "/completions")
|
||||
@Operation(summary = "向AI提问")
|
||||
public Result<?> completions(@RequestParam(name = "message", required = true) String message) {
|
||||
String result = aiChatService.completions(message);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 让AI生成图片
|
||||
* @param prompt
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/1/15 19:11
|
||||
*/
|
||||
@AutoLog(value = "让AI生成图片")
|
||||
@PostMapping(value = "/gen/image")
|
||||
@Operation(summary = "让AI生成图片")
|
||||
public Result<?> genImage(@RequestParam(name = "prompt", required = true) String prompt) {
|
||||
String result = aiChatService.imageGenerate(prompt);
|
||||
return Result.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240110 for://update-begin---author:chenrui ---date:20240110 for:[QQYUN-5509]AI生成表结构和软文------------------------
|
||||
@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@ -64,7 +62,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取所有Demo数据列表")
|
||||
@Operation(summary = "获取Demo数据列表")
|
||||
@GetMapping(value = "/list")
|
||||
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
|
||||
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@ -477,7 +475,6 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
||||
* 测试Mono对象
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "Mono测试")
|
||||
@GetMapping(value ="/test")
|
||||
public Mono<String> test() {
|
||||
//解决shiro报错No SecurityManager accessible to the calling code, either bound to the org.apache.shiro
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package org.jeecg.modules.demo.test.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
@ -3,7 +3,6 @@ package org.jeecg.modules.demo.test.entity;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@ -11,6 +10,8 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
Reference in New Issue
Block a user