package com.yeshi.fanli.dao.brand;
|
|
import java.util.List;
|
|
import org.springframework.data.mongodb.core.query.Criteria;
|
import org.springframework.data.mongodb.core.query.Query;
|
import org.springframework.stereotype.Repository;
|
|
import com.yeshi.fanli.dao.MongodbBaseDao;
|
import com.yeshi.fanli.entity.brand.BrandShopCahe;
|
|
@Repository
|
public class BrandShopCaheDao extends MongodbBaseDao<BrandShopCahe> {
|
|
/**
|
* 查询品牌下店铺
|
* @param brandId
|
* @return
|
*/
|
public List<BrandShopCahe> getByBrandId(Long brandId){
|
if (brandId == null)
|
return null;
|
Query query = new Query();
|
query.addCriteria(Criteria.where("brandId").is(brandId));
|
return mongoTemplate.find(query, BrandShopCahe.class);
|
}
|
|
}
|