fix: ASW-122 修复 package name 解析失败问题

This commit is contained in:
zhangshuai
2024-10-29 16:58:04 +08:00
parent 634ac2b8bb
commit dee4829605

View File

@@ -91,6 +91,7 @@ public class PackageServiceImpl extends ServiceImpl<PackageDao, PackageEntity> i
if (T.ObjectUtil.isNull(apkInfo)) { if (T.ObjectUtil.isNull(apkInfo)) {
throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR); throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR);
} }
entity.setName(apkInfo.getLabel());
entity.setVersion(apkInfo.getVersionName()); entity.setVersion(apkInfo.getVersionName());
entity.setIdentifier(apkInfo.getPackageName()); entity.setIdentifier(apkInfo.getPackageName());
} else { } else {
@@ -98,6 +99,7 @@ public class PackageServiceImpl extends ServiceImpl<PackageDao, PackageEntity> i
if (T.ObjectUtil.isNull(apkInfo)) { if (T.ObjectUtil.isNull(apkInfo)) {
throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR); throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR);
} }
entity.setName(apkInfo.getLabel());
entity.setVersion(apkInfo.getSdkVersion()); entity.setVersion(apkInfo.getSdkVersion());
entity.setIdentifier(apkInfo.getPackageName()); entity.setIdentifier(apkInfo.getPackageName());
} }
@@ -107,7 +109,6 @@ public class PackageServiceImpl extends ServiceImpl<PackageDao, PackageEntity> i
throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR); throw new ASWException(RCode.PACKAGE_FILE_TYPE_ERROR);
} }
entity.setId(pkgId); entity.setId(pkgId);
entity.setName(fileResource.getFilename());
entity.setDescription(T.StrUtil.emptyToDefault(description, "")); entity.setDescription(T.StrUtil.emptyToDefault(description, ""));
entity.setPlatform(PkgConstant.Platform.ANDROID.getValue()); entity.setPlatform(PkgConstant.Platform.ANDROID.getValue());
entity.setWorkspaceId(workspaceId); entity.setWorkspaceId(workspaceId);