iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java
@@ -20,7 +20,6 @@ import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -111,7 +110,6 @@ @PreAuthorize("@ss.hasPermission('data:point:update')") @PutMapping("/enable") @Operation(summary = "启用") @Transactional public CommonResult<Boolean> enable(@RequestBody String[] ids) { daPointService.enableByIds(ids); return success(true); @@ -120,7 +118,6 @@ @PreAuthorize("@ss.hasPermission('data:point:update')") @PutMapping("/disable") @Operation(summary = "禁用") @Transactional public CommonResult<Boolean> disable(@RequestBody String[] ids) { daPointService.disableByIds(ids); return success(true); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java
@@ -402,6 +402,7 @@ } @Override @DSTransactional(rollbackFor = Exception.class) public void enableByIds(String[] ids) { if (CollectionUtils.isEmpty(Arrays.asList(ids))) { return; @@ -410,11 +411,13 @@ DaPointEntity entity = new DaPointEntity(); entity.setId(item); entity.setIsEnable(IsEnableEnum.ENABLE.getCode()); entity.setUpdateTime(new Date()); daPointDao.updateById(entity); }); } @Override @DSTransactional(rollbackFor = Exception.class) public void disableByIds(String[] ids) { if (CollectionUtils.isEmpty(Arrays.asList(ids))) { return; @@ -423,6 +426,7 @@ DaPointEntity entity = new DaPointEntity(); entity.setId(item); entity.setIsEnable(IsEnableEnum.DISABLE.getCode()); entity.setUpdateTime(new Date()); daPointDao.updateById(entity); }); }