Skip to content

Commit

Permalink
Dev 1.7.0 python udf manager (#586)
Browse files Browse the repository at this point in the history
* 代码由AI自动生成接口和AI插件生成

* 代码由AI自动生成接口和AI插件生成

* 代码由人工修改

* bug  fix

* bug  fix

---------

Co-authored-by: “v_kkhuang” <“420895376@qq.com”>
  • Loading branch information
v-kkhuang and “v_kkhuang” authored Aug 25, 2024
1 parent 3a513b2 commit 7bc3a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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);
}

0 comments on commit 7bc3a82

Please sign in to comment.