| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void updateStatusById(YwWarehouse ywWarehouse) { |
| | | if(Objects.isNull(ywWarehouse) |
| | | || Objects.isNull(ywWarehouse.getStatus()) |
| | | || Objects.isNull(ywWarehouse.getId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ywWarehouseMapper.update(new UpdateWrapper<YwWarehouse>().lambda().eq(YwWarehouse::getId,ywWarehouse.getId()).set(YwWarehouse::getStatus,ywWarehouse.getStatus())); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwWarehouse> ywWarehouses) { |
| | | if (CollectionUtils.isEmpty(ywWarehouses)) { |
| | | return; |