-
Notifications
You must be signed in to change notification settings - Fork 2
/
TestDb.java
36 lines (25 loc) · 920 Bytes
/
TestDb.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package BinanceJavaAPIPackage;
import java.math.BigDecimal;
import java.util.NavigableMap;
import org.springframework.beans.factory.annotation.Autowired;
import com.pack.binance.model.LiveOrderBook;
import com.pack.binance.repo.LiveOrderBookRepository;
public class TestDb {
@Autowired
LiveOrderBookRepository liveOrderBookRepository;
private void saveData(Integer count) {
//NavigableMap<BigDecimal, BigDecimal> askData = getAsks();
LiveOrderBook orderBook = new LiveOrderBook();
//for(BigDecimal key :askData.keySet()) {
orderBook.setOrderId(count);
orderBook.setSymbol("ETCBNC");
orderBook.setPrice(12.34);
orderBook.setQuantity(34.23);
liveOrderBookRepository.save(orderBook);
// }
}
public static void main(String srgs[]) {
TestDb ob = new TestDb();
ob.saveData(1);
}
}