| | |
| | | return mongoTemplate.find(query, ShareHotGoods.class);
|
| | | }
|
| | |
|
| | | |
| | | public void deleteByGoodsId(Long goodsId) {
|
| | | Query query = new Query();
|
| | | Criteria ca = Criteria.where("goods.auctionId").is(goodsId);
|
| | | query.addCriteria(ca);
|
| | | |
| | |
|
| | | List<ShareHotGoods> list = mongoTemplate.find(query, ShareHotGoods.class);
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | | |
| | | for (ShareHotGoods shareHotGoods: list) {
|
| | |
|
| | | for (ShareHotGoods shareHotGoods : list) {
|
| | | mongoTemplate.remove(shareHotGoods);
|
| | | }
|
| | | }
|
| | |
|
| | | public List<ShareHotGoods> listByAuctionId(Long auctionid) {
|
| | | Query query = new Query();
|
| | | Criteria ca = Criteria.where("goods.auctionId").is(auctionid);
|
| | | query.addCriteria(ca);
|
| | | return mongoTemplate.find(query, ShareHotGoods.class);
|
| | | }
|
| | | }
|