refactor(llm): 优化禁用大模型功能

- 移除了不必要的 Map 对象创建
- 使用查询参数直接传递 deploy_id- 添加了日志记录禁用操作的结果
- 删除了冗余的注释代码
This commit is contained in:
sunxiqing 2025-03-06 16:46:09 +08:00
parent 55d11a8b38
commit 35dc0d4ce2

View File

@ -172,9 +172,8 @@ public class BaseModelServiceImpl implements BaseModelService {
try {
BaseModelDO baseModelDO = baseModelMapper.selectById(updateReqVO.getId());
Long deploy_id = baseModelDO.getModelId();
Map<String,Long> map = new HashMap<>();
map.put("deploy_id",deploy_id);
String resStr = HttpUtils.post(llmBackendProperties.getDeleteModel(), null, JSON.toJSONString(map));
String resStr = HttpUtils.post(llmBackendProperties.getDeleteModel()+"?deploy_id="+deploy_id, null, "");
log.info(" unActive:{}", resStr);
// 禁用模型
// updateReqVO.setIsActive(0);
// updateBaseModel(updateReqVO);