Commit 8dd0842d authored by 赵啸非's avatar 赵啸非

添加批量激活设备

parent 3aefa27a
...@@ -38,7 +38,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao ...@@ -38,7 +38,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao
@Override @Override
protected void saveBefore(AppPublishEntity entity, Context context) throws AppException { protected void saveBefore(AppPublishEntity entity, Context context) throws AppException {
String targetPath = "/home/mortals/apps/"; String targetPath = "/home/mortals/apps/";
String fileNewName = entity.getAppCode() + "-" + entity.getVersion(); String fileNewName = entity.getAppCode() + "-" + entity.getVersion()+"."+FileUtil.getSuffix(entity.getFilePath());
//将zip包移动到指定目录 并更改名称 //将zip包移动到指定目录 并更改名称
String realFilePath = uploadService.getFilePath(entity.getFilePath()); String realFilePath = uploadService.getFilePath(entity.getFilePath());
...@@ -67,7 +67,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao ...@@ -67,7 +67,7 @@ public class AppPublishServiceImpl extends AbstractCRUDServiceImpl<AppPublishDao
AppPublishEntity appPublishEntity = this.get(entity.getId()); AppPublishEntity appPublishEntity = this.get(entity.getId());
if (entity.getFilePath().equals(appPublishEntity.getFilePath())) { if (entity.getFilePath().equals(appPublishEntity.getFilePath())) {
String targetPath = "/home/mortals/apps/"; String targetPath = "/home/mortals/apps/";
String fileNewName = entity.getAppCode() + "-" + entity.getVersion(); String fileNewName = entity.getAppCode() + "-" + entity.getVersion()+"."+FileUtil.getSuffix(entity.getFilePath());
//将zip包移动到指定目录 并更改名称 //将zip包移动到指定目录 并更改名称
String realFilePath = uploadService.getFilePath(entity.getFilePath()); String realFilePath = uploadService.getFilePath(entity.getFilePath());
if (FileUtil.isEmpty(new File(realFilePath))) { if (FileUtil.isEmpty(new File(realFilePath))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment