update 客户端下载修复

This commit is contained in:
yyb
2026-01-13 09:38:11 +08:00
parent 33099f3383
commit fc3bcff8cb
3 changed files with 12 additions and 2 deletions

View File

@@ -1470,7 +1470,8 @@ public class LeaseUserServiceImpl extends ServiceImpl<LeaseUserMapper, LeaseUser
System.out.println("获取下载权限码"+userEmail);
LeaseShop leaseShop = leaseShopMapper.selectOne(new LambdaQueryWrapper<LeaseShop>()
.select(LeaseShop::getUserEmail)
.eq(LeaseShop::getUserEmail, userEmail));
.eq(LeaseShop::getUserEmail, userEmail)
.eq(LeaseShop::getDel,false));
if (leaseShop == null){
throw new RuntimeException("下载失败,下载客户端权限,请重新登录并创建店铺");
@@ -1512,7 +1513,13 @@ public class LeaseUserServiceImpl extends ServiceImpl<LeaseUserMapper, LeaseUser
Files.write(authFile, auth.getBytes(StandardCharsets.UTF_8));
//读取/home/ubuntu/web/client/linux 或 /home/ubuntu/web/client/windows 下所有文件和 auth文件一起压缩
Path sourceDir = Paths.get(downloadClientLinux);
Path sourceDir;
if (type.equals("linux")){
sourceDir = Paths.get(downloadClientLinux);
}else{
sourceDir = Paths.get(downloadClientWindows);
}
try {
Files.walk(sourceDir)
.filter(path -> !Files.isDirectory(path))