Compare commits
13 Commits
6bbd9f1e01
...
92b470e001
Author | SHA1 | Date | |
---|---|---|---|
92b470e001 | |||
49851384c8 | |||
0619c7d184 | |||
5dd1cfcf9e | |||
77a4b86cb4 | |||
cae2a7786e | |||
789108aaa3 | |||
4a1e6013b3 | |||
2aaf3d96f0 | |||
77fb43e95d | |||
5692cca3e7 | |||
60a71a121c | |||
28b5ca1dfc |
@ -90,17 +90,17 @@ redis的服务器配置
|
|||||||
### 📅 明日计划
|
### 📅 明日计划
|
||||||
完成拦截器功能
|
完成拦截器功能
|
||||||
|
|
||||||
## 2025年5月26日
|
## 2025年5月25日
|
||||||
### ✅ 今日完成
|
### ✅ 今日完成
|
||||||
服务调度
|
服务发布可注册到nacos上
|
||||||
|
|
||||||
### 🚧 进行中
|
### 🚧 进行中
|
||||||
无
|
拦截器开发
|
||||||
|
|
||||||
### ⚠️ 问题/障碍
|
### ⚠️ 问题/障碍
|
||||||
暂无
|
模型api请求不知道是什么
|
||||||
|
|
||||||
### 📅 明日计划
|
### 📅 明日计划
|
||||||
已完成
|
开发拦截器功能
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@ -75,5 +76,20 @@ public class ModelController {
|
|||||||
return OptResult.success();
|
return OptResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询生命周期列表")
|
||||||
|
@GetMapping("/listLifeCycle")
|
||||||
|
public OptResult listLifeCycle(){
|
||||||
|
log.info("查询生命周期列表");
|
||||||
|
List<Map<String, String>> lifeCycleList = modelService.listLifeCycle();
|
||||||
|
return OptResult.success(lifeCycleList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查询数据集列表")
|
||||||
|
@GetMapping("/listDataset")
|
||||||
|
public OptResult listDataset(){
|
||||||
|
List<DatasetEntity> datasetList = modelService.listDataset();
|
||||||
|
return OptResult.success(datasetList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
package com.bipt.intelligentapplicationorchestrationservice.mapper;
|
package com.bipt.intelligentapplicationorchestrationservice.mapper;
|
||||||
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelInfo;
|
import com.bipt.intelligentapplicationorchestrationservice.pojo.*;
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVO;
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVersion;
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVersionDTO;
|
|
||||||
import org.apache.ibatis.annotations.*;
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -72,4 +69,11 @@ public interface ModelMapper {
|
|||||||
*/
|
*/
|
||||||
@Update("update model_version set life_cycle=#{dbValue} where id=#{id}")
|
@Update("update model_version set life_cycle=#{dbValue} where id=#{id}")
|
||||||
int updateLifeCycleById(Long id, String dbValue);
|
int updateLifeCycleById(Long id, String dbValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据集列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("select dataset_id,dataset_name from dataset")
|
||||||
|
List<DatasetEntity> listDataset();
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@ -145,4 +148,21 @@ public class ModelServiceImpl implements ModelService {
|
|||||||
log.info("模型生命周期更新成功,新状态为: {}", targetLifeCycle);
|
log.info("模型生命周期更新成功,新状态为: {}", targetLifeCycle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, String>> listLifeCycle() {
|
||||||
|
return Arrays.stream(ModelLifecycle.values())
|
||||||
|
.map(lifecycle -> Map.of(
|
||||||
|
"code", lifecycle.name(), // 枚举名称(如 "DESIGNING")
|
||||||
|
"description", lifecycle.getDescription() // 中文描述(如 "设计中")
|
||||||
|
))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DatasetEntity> listDataset() {
|
||||||
|
List<DatasetEntity> datasetEntityList = modelMapper.listDataset();
|
||||||
|
return datasetEntityList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package com.bipt.intelligentapplicationorchestrationservice.service;
|
package com.bipt.intelligentapplicationorchestrationservice.service;
|
||||||
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelDTO;
|
import com.bipt.intelligentapplicationorchestrationservice.pojo.*;
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVO;
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVersion;
|
|
||||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelVersionDTO;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface ModelService {
|
public interface ModelService {
|
||||||
void createModel(ModelDTO dto);
|
void createModel(ModelDTO dto);
|
||||||
@ -21,4 +19,8 @@ public interface ModelService {
|
|||||||
void deleteModelVersion(Long id);
|
void deleteModelVersion(Long id);
|
||||||
|
|
||||||
void updateLifeCycle(Long id, String lifeCycle);
|
void updateLifeCycle(Long id, String lifeCycle);
|
||||||
|
|
||||||
|
List<Map<String, String>> listLifeCycle();
|
||||||
|
|
||||||
|
List<DatasetEntity> listDataset();
|
||||||
}
|
}
|
||||||
|
@ -10,24 +10,24 @@ spring.datasource.hikari.maximum-pool-size=10
|
|||||||
spring.datasource.hikari.minimum-idle=5
|
spring.datasource.hikari.minimum-idle=5
|
||||||
spring.datasource.hikari.connection-timeout=30000
|
spring.datasource.hikari.connection-timeout=30000
|
||||||
|
|
||||||
# SQL映射文件路径配置
|
# MyBatis配置
|
||||||
mybatis.mapper-locations=classpath:mapper/*.xml
|
mybatis.mapper-locations=classpath:mapper/*.xml
|
||||||
# 配置实体类别名所在包
|
|
||||||
mybatis.type-aliases-package=com.bipt.intelligentapplicationorchestrationservice.pojo
|
mybatis.type-aliases-package=com.bipt.intelligentapplicationorchestrationservice.pojo
|
||||||
# 开启驼峰命名转换
|
|
||||||
mybatis.configuration.map-underscore-to-camel-case=true
|
mybatis.configuration.map-underscore-to-camel-case=true
|
||||||
|
|
||||||
# Redis服务器地址
|
# Redis配置
|
||||||
spring.data.redis.host=116.205.121.200
|
spring.data.redis.host=116.205.121.200
|
||||||
# Redis服务器端口
|
|
||||||
spring.data.redis.port=6379
|
spring.data.redis.port=6379
|
||||||
# Redis密码(如果有)
|
|
||||||
spring.data.redis.password=Jbjhhzstsl97@
|
spring.data.redis.password=Jbjhhzstsl97@
|
||||||
# Redis数据库索引(默认为0)
|
|
||||||
spring.data.redis.database=0
|
spring.data.redis.database=0
|
||||||
# 连接超时时间(毫秒)
|
|
||||||
spring.data.redis.timeout=3000
|
spring.data.redis.timeout=3000
|
||||||
|
|
||||||
|
# 服务路由配置
|
||||||
|
spring.cloud.gateway.routes[0].id=request-service-route
|
||||||
|
spring.cloud.gateway.routes[0].uri=lb://intelligent-application-orchestration-service
|
||||||
|
spring.cloud.gateway.routes[0].predicates[0]=Path=/request
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logging.level.org.springframework.web=DEBUG
|
logging.level.org.springframework.web=DEBUG
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user