From 51a4ff5d777028d52a19c314a99f796334cb7b51 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 23 十一月 2019 18:30:01 +0800 Subject: [PATCH] 配置文件修改 --- fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandGoodsCaheDao.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandGoodsCaheDao.java b/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandGoodsCaheDao.java index 91963da..dea5f86 100644 --- a/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandGoodsCaheDao.java +++ b/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandGoodsCaheDao.java @@ -63,6 +63,18 @@ /** + * 鍝佺墝id + * @param brandId + */ + public void removeByBrandId(Long brandId) { + Query query = new Query(); + query.addCriteria(Criteria.where("brandId").lt(brandId)); + mongoTemplate.remove(query, BrandGoodsCahe.class); + } + + + + /** * 鍒犻櫎鏍规嵁鏃堕棿 * * @param id @@ -79,4 +91,17 @@ ); mongoTemplate.remove(query, BrandGoodsCahe.class); } + + + /** + * 鍒犻櫎鏍规嵁鏃堕棿 + * + * @param id + * @return + */ + public void removeAgoByDate(Date createTime) { + Query query = new Query(); + query.addCriteria(Criteria.where("createTime").lt(createTime)); + mongoTemplate.remove(query, BrandGoodsCahe.class); + } } -- Gitblit v1.8.0