update 客户端下载修复
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user