|
|
@@ -7,6 +7,7 @@ import com.chuanghai.ihotel.entity.RoomTypeEntity;
|
|
|
import com.chuanghai.ihotel.service.RoomTypeService;
|
|
|
import com.chuanghai.ihotel.vo.RoomGroupVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@@ -72,6 +73,7 @@ public class RoomServiceImpl extends ServiceImpl<RoomDao, RoomEntity> implements
|
|
|
return new PageUtils<>(page);
|
|
|
}
|
|
|
|
|
|
+ @CacheEvict(value = "room", allEntries = true)
|
|
|
@Override
|
|
|
public void mySave(RoomEntity room) {
|
|
|
// 检测房型是否存在
|
|
|
@@ -98,4 +100,16 @@ public class RoomServiceImpl extends ServiceImpl<RoomDao, RoomEntity> implements
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @CacheEvict(value = "room", allEntries = true)
|
|
|
+ @Override
|
|
|
+ public boolean myUpdate(RoomEntity room) {
|
|
|
+ return this.updateById(room);
|
|
|
+ }
|
|
|
+
|
|
|
+ @CacheEvict(value = "room", allEntries = true)
|
|
|
+ @Override
|
|
|
+ public boolean myRemoveByIds(List<Long> ids) {
|
|
|
+ return this.removeByIds(ids);
|
|
|
+ }
|
|
|
}
|