Browse Source

试验-规范文件-规范更新返回新文件id

LHB 2 months ago
parent
commit
8e966bb206

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/PrivateStandardController.java

@@ -203,8 +203,8 @@ public class PrivateStandardController {
     @ApiOperation(value = "规范更新")
     @GetMapping("/standardUpdate")
     @ApiImplicitParam(name = "id", value = "规范文件id", required = true)
-    public R<Boolean> standardUpdate(Long id) {
-        boolean b = this.privateStandardService.standardUpdate(id);
+    public R<Long> standardUpdate(Long id) {
+        Long b = this.privateStandardService.standardUpdate(id);
         return R.data(b);
     }
 

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/PrivateStandardService.java

@@ -24,5 +24,5 @@ public interface PrivateStandardService extends IService<PrivateStandard> {
 
     boolean updateTypeByTwo(List<PrivateStandardDTO> data, List<Long> delIds, List<Long> delFileIds, MultipartFile[] files);
 
-    boolean standardUpdate(Long id);
+    Long standardUpdate(Long id);
 }

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/PrivateStandardServiceImpl.java

@@ -298,7 +298,7 @@ public class PrivateStandardServiceImpl extends ServiceImpl<PrivateStandardMappe
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean standardUpdate(Long id) {
+    public Long standardUpdate(Long id) {
         BladeUser user = SecureUtil.getUser();
         //获取当前规范文件信息
         PrivateStandard privateStandard = baseMapper.selectById(id);
@@ -409,7 +409,7 @@ public class PrivateStandardServiceImpl extends ServiceImpl<PrivateStandardMappe
         }
 
         standardFileService.saveBatch(standardFiles);
-        return true;
+        return newId;
     }
 }