diff --git a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/api/UDFRestfulApi.java b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/api/UDFRestfulApi.java index 2bebc661dd..0db971d6f5 100644 --- a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/api/UDFRestfulApi.java +++ b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/api/UDFRestfulApi.java @@ -1201,6 +1201,7 @@ public Message request( } // 根据id判断是插入还是更新 if (pythonModuleInfo.getId() == null) { + pythonModuleInfo.setCreateUser(userName); PythonModuleInfo moduleInfo = pythonModuleInfoService.getByUserAndNameAndId(pythonModuleInfo); // 插入逻辑 if (moduleInfo != null) { @@ -1208,7 +1209,6 @@ public Message request( } pythonModuleInfo.setCreateTime(new Date()); pythonModuleInfo.setUpdateTime(new Date()); - pythonModuleInfo.setCreateUser(userName); pythonModuleInfo.setUpdateUser(userName); pythonModuleInfoService.insertPythonModuleInfo(pythonModuleInfo); return Message.ok().data("id", pythonModuleInfo.getId()); diff --git a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/dao/PythonModuleInfoMapper.java b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/dao/PythonModuleInfoMapper.java index f32432ef18..0f52960e17 100644 --- a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/dao/PythonModuleInfoMapper.java +++ b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/dao/PythonModuleInfoMapper.java @@ -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; @@ -40,5 +40,5 @@ public interface PythonModuleInfoMapper { // SQL 5: 查询包含多个引擎类型的hdfs路径 List selectPathsByUsernameAndEnginetypes( - String username, List enginetypes); + @Param("username") String username, @Param("enginetypes") List enginetypes); }