diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java index 2fc24803..3838a68a 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquCheckItemServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.stereotype.Service; import com.op.device.mapper.EquCheckItemMapper; import com.op.device.domain.EquCheckItem; import com.op.device.service.IEquCheckItemService; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -99,6 +100,7 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService { */ @Override @DS("#header.poolName") + @Transactional public AjaxResult insertEquCheckItem(EquCheckItemDTO equCheckItemDTO) { // 检验重复 EquCheckItem checkItem = equCheckItemMapper.selectEquCheckItemByItemName(equCheckItemDTO.getItemName()); @@ -169,6 +171,7 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService { */ @Override @DS("#header.poolName") + @Transactional public AjaxResult updateEquCheckItem(EquCheckItemDTO equCheckItemDTO) { EquCheckItem equCheckItem = new EquCheckItem(); BeanUtils.copyProperties(equCheckItemDTO, equCheckItem);