From 744594ef1a2f530fc3e86ea9dc48b62247f79420 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 19 五月 2020 17:13:23 +0800 Subject: [PATCH] 饿了么绘图,添加口碑 --- fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandShopCaheDao.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandShopCaheDao.java b/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandShopCaheDao.java index 46e3bc9..fb05451 100644 --- a/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandShopCaheDao.java +++ b/fanli/src/main/java/com/yeshi/fanli/dao/brand/BrandShopCaheDao.java @@ -58,6 +58,17 @@ /** + * 鍝佺墝id + * @param brandId + */ + public void removeByBrandId(Long brandId) { + Query query = new Query(); + query.addCriteria(Criteria.where("brandId").is(brandId)); + mongoTemplate.remove(query, BrandShopCahe.class); + } + + + /** * 鍒犻櫎鏍规嵁鏃堕棿 * * @param id @@ -74,4 +85,16 @@ ); mongoTemplate.remove(query, BrandShopCahe.class); } + + /** + * 鍒犻櫎鏍规嵁鏃堕棿 + * + * @param id + * @return + */ + public void removeAgoByDate(Date createTime) { + Query query = new Query(); + query.addCriteria(Criteria.where("createTime").lt(createTime)); + mongoTemplate.remove(query, BrandShopCahe.class); + } } -- Gitblit v1.8.0