| | |
| | | entity.setCreateDate(new Date()); |
| | | insert(entity); |
| | | modelMethodService.insertList(dto.getModelMethods(), entity.getId()); |
| | | |
| | | // 替换环境变量MDK_PKGS下的py文件 |
| | | String mdkPkgs = System.getenv("MDK_PKGS"); |
| | | String pyFilePath = mdkPkgs + File.separator + entity.getPyModule().replace(".", File.separator) + File.separator + entity.getPyName() + ".pyd"; |
| | | FileUtil.mkParentDirs(pyFilePath); |
| | | FileUtil.copy(entity.getFilePath(), pyFilePath, true); |
| | | } |
| | | |
| | | @Override |
| | |
| | | updateById(entity); |
| | | modelMethodService.deleteModelMethod(entity.getId()); |
| | | modelMethodService.insertList(dto.getModelMethods(), entity.getId()); |
| | | |
| | | // 替换环境变量MDK_PKGS下的py文件 |
| | | String mdkPkgs = System.getenv("MDK_PKGS"); |
| | | String pyFilePath = mdkPkgs + File.separator + entity.getPyModule().replace(".", File.separator) + File.separator + entity.getPyName() + ".pyd"; |
| | | FileUtil.mkParentDirs(pyFilePath); |
| | | FileUtil.copy(entity.getFilePath(), pyFilePath, true); |
| | | } |
| | | |
| | | @Override |