tangchuanxing_branch
CR7 10 months ago
parent 0f71af50d1
commit 5ce83e1a26

@ -0,0 +1,74 @@
/*
* Copyright (c) 2018-2999 广 All rights reserved.
*
* https://www.mall4j.com/
*
*
*
*
*/
package com.yami.shop.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.yami.shop.bean.model.IndexImg;
import com.yami.shop.dao.IndexImgMapper;
import com.yami.shop.service.IndexImgService;
import java.util.List;
/**
* IndexImgServiceImpl IndexImgService
* MyBatis-PlusServiceImplIndexImgService
* IndexImg
*
* @author lgh on 2018/11/26.
*/
@Service
public class IndexImgServiceImpl extends ServiceImpl<IndexImgMapper, IndexImg> implements IndexImgService {
/**
* indexImgMapperSpringDAO
* IndexImg
*/
@Autowired
private IndexImgMapper indexImgMapper;
/**
* deleteIndexImgByIdsID
* indexImgMapperdeleteIndexImgByIds
*/
@Override
public void deleteIndexImgByIds(Long[] ids) {
indexImgMapper.deleteIndexImgByIds(ids);
}
/**
* listIndexImg
* 使@CacheableSpring Cache
*
*
*
*/
@Override
@Cacheable(cacheNames = "indexImg", key = "'indexImg'")
public List<IndexImg> listIndexImg() {
return indexImgMapper.listIndexImg();
}
/**
* removeIndexImgCache
* 使@CacheEvict
*
*/
@Override
@CacheEvict(cacheNames = "indexImg", key = "'indexImg'")
public void removeIndexImgCache() {
// 方法体为空,因为实际的缓存清除工作由@CacheEvict注解完成。
}
}
Loading…
Cancel
Save