Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 1.7.0 python udf manager #586

Merged
merged 7 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1201,14 +1201,14 @@ public Message request(
}
// 根据id判断是插入还是更新
if (pythonModuleInfo.getId() == null) {
pythonModuleInfo.setCreateUser(userName);
PythonModuleInfo moduleInfo = pythonModuleInfoService.getByUserAndNameAndId(pythonModuleInfo);
// 插入逻辑
if (moduleInfo != null) {
return Message.error("模块" + moduleInfo.getName() + "已存在");
}
pythonModuleInfo.setCreateTime(new Date());
pythonModuleInfo.setUpdateTime(new Date());
pythonModuleInfo.setCreateUser(userName);
pythonModuleInfo.setUpdateUser(userName);
pythonModuleInfoService.insertPythonModuleInfo(pythonModuleInfo);
return Message.ok().data("id", pythonModuleInfo.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package org.apache.linkis.udf.dao;

import org.apache.linkis.udf.entity.PythonModuleInfo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.linkis.udf.entity.PythonModuleInfo;

import java.util.List;

Expand All @@ -40,5 +40,5 @@ public interface PythonModuleInfoMapper {

// SQL 5: 查询包含多个引擎类型的hdfs路径
List<PythonModuleInfo> selectPathsByUsernameAndEnginetypes(
String username, List<String> enginetypes);
@Param("username") String username, @Param("enginetypes") List<String> enginetypes);
}
Loading