Code: Select all
Mongo
Code: Select all
org.bson.json.JsonParseException: JSON reader expected a string but found '?0'.
Code: Select all
public interface PaymentMongoLogDetailRepository extends MongoRepository
{
@Query(value = "{'$and' : [{'createdOn':{'$gt':ISODate(?0)}},{'createdOn':{'$lte':ISODate(?1)}},{'stripeResponse.sessionId':/cs_live/},{'stripeResponse.status':'success'}]}",count = true)
Long findAllSuccessCounts(String from,String to);
}
Die gleiche Abfrage, wenn ich in Mongo Shell ausführt, gibt mir keine Nullzahlen.
Code: Select all
db.paymentMongoLogDetail.find({'$and' : [{'createdOn':{'$gt':ISODate('2025-01-24')}},{'createdOn':{'$lte':ISODate('2025-02-08')}},{'stripeResponse.sessionId':/cs_live/},{'stripeResponse.status':'success'}]}).count();
Code: Select all
org.bson.json.JsonParseException: JSON reader expected a string but found '?0'.
Code: Select all
public interface PaymentMongoLogDetailRepository extends MongoRepository {
@Query(value = "{'$and' : [{'createdOn':{'$gt': ?0,'$lte': ?1}},{'stripeResponse.sessionId':/cs_live/},{'stripeResponse.status':'success'}]}",count = true)
Long findAllSuccessCounts(Date from,Date to);
}