| | |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.domain.vip.VIPPrice; |
| | | import javafx.print.Collation; |
| | | import com.yeshi.buwan.domain.vip.VIPPriceType; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | return findList(query); |
| | | } |
| | | |
| | | /** |
| | | * 根据价格类型查询 |
| | | * |
| | | * @param vipPriceType |
| | | * @return |
| | | */ |
| | | public VIPPrice selectByType(VIPPriceType vipPriceType) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("type").is(vipPriceType)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | /** |
| | | * 根据IOS内购商品ID查询 |
| | | * |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | public VIPPrice selectByIOSProductId(String productId) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("iosProductId").is(productId)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | } |