diff --git a/platformapi/ebaiapi/order_test.go b/platformapi/ebaiapi/order_test.go index 13e2b5ec..9754a6c1 100644 --- a/platformapi/ebaiapi/order_test.go +++ b/platformapi/ebaiapi/order_test.go @@ -19,7 +19,7 @@ func TestCancelOrder(t *testing.T) { } func TestOrderGet(t *testing.T) { - result, err := api.OrderGet("4016706010217879061") + result, err := api.OrderGet("4094290178807791113") products := result["products"].([]interface{})[0].([]interface{}) for _, product2 := range products { product := product2.(map[string]interface{}) @@ -322,13 +322,13 @@ func Test2222(t *testing.T) { } func Test1(t *testing.T) { - str := "1000,8,10:1001,14,10:1002,9,10:1006,12,10:1008,20,3:1009,8,2:1010,14,10:1011,8,10:1012,12,10:1013,8,10:1014,11,10:1015,8,10:1016,17,5:1017,14,10:1018,12,10:1019,9,10:1020,11,10:1021,8,10:1022,9,10:1023,8,10:1024,9,10:1025,12,10:1026,8,10:1027,8,10:1028,8,10:1029,12,10:1030,8,10:1031,11,10:1032,11,10:1033,8,10:1034,9,10:1035,8,10:1036,8,10:1037,9,10:1038,11,10:1039,12,10:1040,9,10:1041,9,10:1042,8,10:1043,9,10:1044,7,10:1045,11,10:1046,12,10:1047,8,10:1048,8,10:1049,8,10:1050,6,10:1051,6,10:1052,12,10:1053,9,10:1054,8,10:1055,8,10:1056,12,10:1057,14,10:2408,14,10:1058,12,10:1059,8,10:1060,8,10:1061,8,10:1062,8,10:1063,8,10:1064,11,10:1065,12,10:1066,7,10:1067,15,10:1068,8,10:1069,3,100:1070,6,10:1071,8,10:1072,17,5:1073,9,10:1074,12,10:1075,8,10:1076,8,10:1077,9,10:1078,14,10:1079,14,10:1080,10,10:1081,11,10:1082,2,100:1083,12,10:1084,9,10:1085,9,10:1086,9,10:1087,15,3:1088,14,10:1089,11,10:1090,9,10:1091,6,10:1092,37,1:1093,30,2:1094,24,3:1095,23,3:1096,17,3:1097,20,3:1098,20,3:1099,20,3:1100,17,3:1101,17,3:1102,20,3:1103,32,1:1104,25,3:1105,23,3:1106,17,3:1107,17,3:1108,14,10:1109,11,10:1110,14,10:1111,14,10:1112,20,5:1113,21,5:1114,23,3:1115,18,5:1116,23,5:1117,23,5:1118,20,5:1119,20,5:1120,32,1:1121,38,1:1122,35,1:1123,30,2:1124,25,2:1125,30,2:1126,25,2:1127,27,2:1128,27,2:1129,31,2:1130,27,2:1131,50,1:1132,25,2:1133,8,10:1134,8,10:1135,8,10:1136,5,100:1137,14,10:1138,8,10:1139,11,10:1140,21,5:1141,38,1:1142,28,3:1143,6,50:1144,11,10:1145,9,10:1146,15,10:1147,14,10:1148,15,10:1149,15,10:1150,15,10:1151,9,10:1152,21,5:1153,8,10:1154,8,10:1155,9,10:1156,32,1:1157,17,5:1158,32,1:1159,28,2:1160,12,10:1161,33,1:1162,33,1:1163,50,1:1164,35,1:1165,25,2:1166,38,1:1167,8,10:1168,8,10:1169,9,10:1170,12,10:1171,12,10:1172,24,2:1173,9,10:1174,11,10:1175,11,10:1176,8,10:1177,12,10:1178,44,1:1179,23,2:1180,17,3:1181,9,10:1182,21,2:1183,18,2:1184,18,2:1185,20,2:1186,21,2:1187,25,2:1188,26,2:1189,27,2:1190,28,2:1191,32,2:1192,38,1:1193,48,1:1194,50,1:1195,54,1:1196,47,1:1197,41,1:1198,23,2:1199,23,2:1200,75,1:1201,82,1:1202,23,2:1203,15,3:1204,14,10:1205,17,3:1206,41,1:1207,9,10:1208,21,3:1209,20,3:1210,26,2:1211,38,1:1212,32,2:1213,25,2:1214,54,1:1215,10,10:1216,18,2:1217,17,2:1218,18,2:1219,15,5:1220,35,1:1221,33,1:2409,6.6,1:2410,6.6,1:2411,9,1:2412,9,1:2413,6.6,1:2414,6.6,1:2415,9,1:2416,18.6,1:2417,9,10:2418,9,10:2419,9,10:2420,17,3:1500,1.6,100:1501,2.4,100:1502,3.6,50:1508,6,1:1510,1.2,120:1511,1.2,120:1512,2.4,10:1513,2.4,15:1514,2.4,50:1515,2.4,50:1523,3.9,20:1560,1.6,144:1561,4.2,10:1838,8.4,10:1839,63.9,2:1840,37.5,5:1841,45,5:1842,6.9,10:1843,11.4,12:1844,9.9,12:1845,3.9,24:1846,2.8,12:1847,1.6,20:1848,2.4,20:1849,2,24:1850,2.4,19:1851,2.8,16:1852,4.2,10:1853,4.2,10:1854,3,50:1855,3,20:1856,4.2,20:1857,5.7,20:1858,8.7,10:1859,3,20:1860,0.5,200:1861,6,5:1862,6.9,10:1863,3.3,10:1864,1.2,40:1865,3.9,10:1866,1.6,200:1867,13.2,10:1868,4.8,10:1869,1.6,50:1870,7.5,10:1871,6,10:1872,2.4,50:1873,3.9,20:1874,24.3,5:1875,15,5:1876,18.9,5:1877,9.3,12:1878,5.1,12:1879,5.7,12:1880,5.7,10:1881,18.9,5:1882,9.3,10:1883,6,10:1884,6.9,10:1885,3.9,24:1886,3.2,20:1887,6.9,20:1888,3.3,20:1889,9.3,5:1890,9.3,10:1891,6,5:1892,8.4,5:1893,9,5:1894,3.9,20:1895,3.9,20:1896,15,10:1897,3.9,20:1898,3,20:1899,11.4,5:1900,4.5,10:1901,7.5,10:1902,9.3,5:1903,3.2,20:1904,5.7,10:1905,4.8,10:1906,2.4,10:1907,3.9,20:1908,5.7,10:1909,3.9,20:1910,9.3,5:1911,2.4,20:1912,10.5,5:1913,9.3,10:1914,3,20:1915,3.9,20:1916,3.9,20:1917,18.9,10:1918,18.9,10:1919,4.8,20:1920,8.4,20:1921,33.9,5:1922,37.5,5:1923,7.5,10:1924,4.8,5:1925,4.5,5:1926,3.9,20:1927,7.5,10:1928,3,20:1929,3.2,20:1930,4.8,10:1931,4.2,10:1932,3.2,10:1933,3,10:1934,3.9,10:1935,3,10:1936,3.9,10:1937,7.5,20:1938,13.2,5:1939,15,5:1940,3.9,10:1941,5.7,10:1942,7.5,5:1943,11.4,5:1944,15,10:1945,18.9,10:1946,3.9,20:1947,3.9,40:1948,9.3,10:1949,3.9,20:1950,3.2,20:1952,16.8,5:1953,20.7,5:1954,3.9,10:1955,4.8,10:1956,69.3,5:1957,33.9,2:1958,3,20:1959,3,20:1960,3,20:1961,2.4,100:1962,3.3,20:1963,3.3,20:1964,15,10:1965,13.2,10:1966,2.8,60:1967,3.2,60:1968,3.3,10:1969,3.6,20:1970,9.3,20:1971,14.4,1:1972,18.9,5:1973,18.9,5:1974,3.9,20:1975,3,20:1976,4.8,10:1977,4.8,10:1978,3.9,20:1979,4.5,20:1980,9.3,10:1981,13.2,10:1982,5.7,20:1983,5.7,20:1984,3.2,20:1985,3.9,25:1986,3,25:1987,8.4,10:1988,1.2,20:1989,2.4,20:1990,3,20:1991,3.2,20:1992,3.3,20:1993,3,20:1994,4.5,20:1995,7.5,10:1996,9,10:1997,13.2,2:1998,13.2,10:1999,7.5,10:2000,4.2,20:2002,4.2,20:2003,3,20:2004,4.2,20:2005,4.8,10:2006,3.9,20:2007,6.9,1:2008,4.5,10:2009,13.5,10:2010,13.5,10:2011,11.4,10:2012,9.3,10:2013,3.9,10:2014,3.9,10:2015,2.4,10:2016,2,10:2017,2,10:2018,3.9,12:2019,4.5,10:2020,5.7,10:2021,6.9,10:2022,4.5,10:2023,5.7,10:2024,6.9,10:2025,2.4,10:2026,3.2,10:2027,3.6,10:2028,9.3,10:2029,13.2,10:2030,11.4,10:2031,13.2,10:2032,1.2,50:2033,1.6,50:2034,3.9,20:2035,4.5,5:2036,6.9,5:2037,3.6,100:2038,3.9,10:2039,3.9,20:2040,4.2,10:2041,2.4,20:2042,18.9,2:2043,2,16:2044,1.2,20:2045,18.9,2:2046,18.9,2:2047,18.9,2:2048,18.9,2:2049,18.9,2:2050,18.9,2:2051,2,20:2052,3.6,20:2053,1.6,20:2054,1.6,20:2055,2.4,60:2056,4.8,10:2057,2.8,50:2058,4.5,20:2059,3,10:2060,3.9,10:2061,4.2,10:2062,4.8,20:2063,3.9,20:2064,3,10:2065,3.3,10:2066,4.2,10:2067,4.2,10:2068,7.5,10:2069,3,40:2070,3.9,10:2071,3.9,10:2072,3.9,60:2073,3.9,20:2074,3.9,20:2075,4.2,1:2076,13.2,10:2077,60,2:2078,21.9,5:2079,37.5,2:2080,22.5,2:2081,3.2,24:2082,6.9,5:2083,4.2,20:2084,4.2,20:2085,45,2:2086,45,5:2087,33.9,5:2088,5.4,20:2089,9.3,1:2407,2,10:1951,6,10:1516,8.8,10:1517,7.6,10:1518,6.2,10:1519,13.8,10:1520,11.2,10:1521,13.8,10:1522,15,10:1524,35,12:1525,3.8,100:1526,13.8,10:1527,20,30:1528,18.8,10:1529,27.6,20:1530,16.2,10:1531,15,10:1532,16.2,6:1533,18.8,6:1534,6.2,10:1535,7.6,10:1536,8.8,10:1537,6.2,10:1538,5.8,10:1539,6.2,10:1540,4.2,10:1541,12.6,10:1542,12.6,10:1543,21.2,5:1544,15,5:1545,11.2,10:1546,17.6,10:1547,11.2,10:1548,8.8,10:1549,7.6,10:1550,16.2,10:1551,4.2,10:1552,2.2,50:1553,2.6,10:1554,3.8,10:1555,5,10:1556,6.2,10:1557,3.8,10:1558,8.8,10:1566,2.2,10:1567,3.8,10:1568,3,10:1569,15,5:1570,22.6,5:1571,13.8,5:1572,7.6,40:1573,15,20:1574,7.6,30:1575,6.2,40:1576,12.6,20:1577,16.2,5:1578,1.2,20:1579,2.2,20:1580,45,2:1581,55,2:1582,10,5:1583,20,5:1584,7.6,10:1585,15,10:1586,5,10:1587,3.8,10:1588,16.2,5:1589,17.6,5:1590,13.8,5:1591,13.8,5:1592,3.2,20:1593,6.2,10:1594,10,10:1595,13.8,10:1596,13.8,10:1597,8.8,10:1598,8.8,10:1599,15,10:1600,15,10:1601,11.2,10:1602,11.2,10:1603,6.2,10:1604,8.8,10:1605,37.6,10:1606,62.6,10:1607,13.8,5:1608,8.8,5:1609,12.6,10:1610,5,10:1611,6.2,10:1612,7.6,10:1613,12.6,2:1614,27.6,2:1615,52.6,2:1616,25,2:1617,37.6,2:1618,30,6:1619,30,6:1620,17.6,5:1621,22.6,5:1622,25,5:1623,15,5:1624,17.6,5:1625,20,5:1626,20,5:1627,17.6,5:1628,15,5:1629,12.6,5:1630,5,10:1631,6.2,10:1632,7.6,10:1633,10,10:1634,12.6,10:1635,5,10:1636,6.2,10:1637,3.2,20:1638,5,20:1639,7,10:1640,13.8,5:1641,13.8,5:1642,13.8,5:1643,5,10:1644,7.6,10:1645,8.8,10:1646,10,5:1647,21.2,5:1648,21.2,5:1652,4.6,5:1653,6.2,5:1654,7.6,12:1655,2,24:1656,2.6,20:1657,4.6,20:1658,4.6,20:1659,87.6,2:1660,62.6,2:1661,45,2:1662,32.6,2:1663,7.6,10:1664,12.6,10:1665,12.6,10:1666,11.2,10:1667,12.6,10:1668,15,10:1669,87.6,2:1670,12.6,2:1671,20,2:1672,25,2:1673,5,10:1674,6.2,10:1675,5,10:1676,5.6,10:1677,87.6,2:1678,2.6,10:1679,3,10:1680,7,10:1681,8.8,10:1682,11.2,10:1683,10,10:1684,12.6,10:1685,10,10:1686,12.6,10:1687,15,10:1688,13.8,10:1689,30,5:1690,6.2,10:1691,11.2,10:1692,15,10:1693,35,5:1694,32.6,5:1695,6.2,10:1696,6.2,10:1559,7,10:1223,6.2,10:1225,5.6,10:1226,3,10:1227,11.2,5:1228,8.8,15:1229,8.8,15:1230,30,2:1231,21.2,2:1232,6.2,10:1233,6.2,10:1234,2.6,10:1235,21.2,5:1236,3.2,24:1237,2.6,12:1238,3.8,12:1239,2.6,20:1240,10,2:1241,20,2:1242,15,2:1243,20,2:1244,15,2:1245,3.8,10:1246,1.6,12:1247,3.8,10:1248,3.8,10:1249,3.2,10:1250,3.2,20:1251,21.2,5:1252,16.2,5:1253,10,1:1254,8,1:1255,27.6,2:1256,6,1:1257,60,2:1258,31.2,2:1259,16.2,2:1260,1.8,2:1261,6.2,5:1262,11.2,5:1263,15,5:1264,8.8,5:1265,13.8,5:1266,18.8,5:1268,23.8,5:1269,6.2,5:1270,11.2,5:1271,7.6,5:1272,11.2,5:1273,16.2,5:1274,25,3:1275,12.6,5:1276,21.2,5:1277,26.2,5:1278,41.2,2:1279,17.6,2:1280,17.6,2:1282,20,5:1284,13.8,5:1285,18.8,2:1286,15,2:1287,1.8,2:1288,21.2,2:1289,1,100:1290,2.2,20:1291,1.2,24:1292,0.8,24:1293,0.8,32:1294,1,32:1295,1.2,32:1296,72,5:1297,54,5:1298,36,5:1299,18,5:1300,15,5:1301,30,5:1302,45,3:1303,60,3:1304,82.6,2:1305,66,2:1306,49.6,3:1307,33,3:1308,24.8,5:1309,16.6,5:1310,10,5:1311,13.8,5:1312,15,5:1313,10,10:1314,13.8,5:1315,7,12:1316,4,10:1317,6.2,10:1318,25,5:1319,18.8,5:1320,1.2,72:1321,10,5:1322,1.2,60:1323,3.8,26:1324,3.8,18:1325,4.6,5:1326,9,5:1327,13.6,5:1328,21.2,2:1329,36.2,2:1330,56.2,2:1331,21.2,5:1332,21.2,5:1333,16.2,5:1334,16.2,5:1335,11.2,5:1336,11.2,5:1337,17.6,2:1338,17.6,2:1339,17.6,2:1340,18.8,2:1341,16.2,2:1342,16.2,2:1343,16.2,2:1344,8.8,2:1345,18.8,2:1346,16.2,2:1347,18.8,2:1348,8.8,2:1349,6.6,20:1350,1.8,60:1352,2.8,24:1353,3,24:1354,4.6,24:1355,0.8,60:1356,1.8,60:1357,1.2,60:1358,2.2,120:1359,2.2,120:1360,3.8,60:1361,2,20:1362,2,10:1363,1.2,30:1364,1.2,20:1365,1.2,10:1366,1.2,20:1367,1.2,10:1368,7.6,24:1369,7.6,24:1370,7.6,24:1371,7.6,24:1372,9.6,24:1373,9.6,24:1374,9.6,24:1375,9.6,24:1376,4.6,48:1377,4.6,48:1378,4.6,48:1379,4.6,48:1380,5,36:1381,5,36:1382,1.6,80:1383,1.6,80:1384,3.2,40:1385,1.6,40:1386,1.6,40:1387,2.6,40:1388,1.6,80:1389,0.8,60:1390,1.2,48:1391,1.2,48:1392,2.6,36:1393,2.6,36:1394,11.2,5:1395,11.2,5:1396,11.2,5:1397,11.2,5:1398,10,5:1399,13.8,5:1400,13.8,5:1401,11.2,5:1402,10,5:1403,10,5:1404,10,5:1405,10,5:1406,25,2:1407,25,2:1408,2.6,12:1409,3.8,12:1410,3.6,12:1411,2.6,24:1412,3.8,12:1413,8,10:1414,10.6,10:1415,3,10:1416,5,10:1417,3.8,20:1418,5,18:1419,5,18:1420,3.8,20:1421,3.8,20:1422,1.8,30:1423,1.8,30:1424,1.8,30:1425,0.8,1:1426,1.2,18:1427,1.2,15:1428,1.2,30:1429,1.2,1:1430,2.6,24:1431,6,24:1432,3.2,24:1433,3.8,24:1434,4,24:1435,2.2,24:1436,1.8,24:1437,2.4,36:1438,1.8,60:1439,1.2,60:1440,0.8,60:1441,0.8,60:1442,1.2,60:1443,3.8,10:1444,3.8,10:1445,5.6,10:1446,5,10:1447,16.2,5:1448,11.2,10:1449,5,12:1450,5,12:1451,13.8,12:1452,3.8,24:1453,13.8,12:1454,4.6,30:1455,4.6,30:1456,8.8,12:1457,8.8,12:1458,1,20:1459,4.6,30:1460,3,40:1461,3,40:1462,4.6,48:1463,18.8,5:1464,1.6,50:1465,1.2,40:1466,4,20:1467,6.2,20:1468,3,40:1469,12.6,5:1470,6.2,10:1471,9.6,10:1472,6.2,10:1473,2.8,20:1474,1.2,20:1475,13.8,10:1476,8.8,10:1477,16.2,5:1478,13.8,5:1479,11.2,5:1480,18.8,5:1481,16.2,5:1482,13.8,5:1483,10,2:1484,16.2,2:1485,15,5:1486,6.2,10:1487,6.2,10:1488,11.2,5:1489,8,5:1490,9.6,5:1491,11.2,5:1492,4,10:1493,3.2,48:1494,3.2,48:1495,4,40:1496,4,40:1497,5.8,10:1498,15,2:1499,12.6,2:1503,16.2,5:1504,16.2,5:1505,1.2,50:1506,5,1:1507,17.6,2:1509,13.8,5:1649,8.8,15:1650,8.8,15:1651,3.8,:1697,53.8,5:1698,60,5:1699,53.8,10:1700,53.8,10:1701,65,5:1702,65,5:1703,85,4:1704,80,4:1705,32.6,10:1706,62.6,5:1707,8.8,1:1708,8.8,1:1709,8.8,1:1710,8.8,1:1711,8.8,1:1712,8.8,1:1713,8.8,1:1714,20,5:1715,50,5:1716,50,5:1717,72.6,2:1718,22.6,20:1719,22.6,20:1720,22.6,20:1721,37.6,5:1722,22.6,20:1723,22.6,20:1724,58.8,2:1725,58.8,2:1726,20,5:1727,20,5:1728,10,10:1729,10,10:1730,10,10:1731,32.6,2:1732,40,2:1733,7.6,10:1734,2.6,10:1735,8.8,20:1736,8.8,20:1737,10.6,20:1738,16.2,20:1739,6.2,10:1740,3.8,1:1741,3.8,1:1742,3.8,1:1743,3.8,1:1744,3.8,1:1745,3.8,1:1746,25,5:1747,15,10:1748,25,5:1749,25,5:1750,20,5:1751,25,10:1752,25,10:1753,12.6,10:1754,25,2:1755,17.6,10:1756,10,10:1757,5,10:1758,20,10:1759,37.6,5:1760,25,10:1761,22.6,5:1762,22.6,4:1763,22.6,5:1764,22.6,10:1765,22.6,5:1766,22.6,5:1767,17.6,10:1768,17.6,10:1769,17.6,10:1770,17.6,10:1771,17.6,10:1772,12.6,16:1773,12.6,16:1774,12.6,16:1775,12.6,16:1776,7.6,5:1777,6.2,5:1778,4.6,20:1779,42.6,20:1780,42.6,20:1781,42.6,20:1782,42.6,20:1783,18.8,10:1784,30,2:1785,32.6,2:1786,32.6,5:1787,12.6,1:1788,15,1:1789,17.6,1:1790,20,1:1791,37.6,6:1792,52.6,5:1793,22.6,10:1794,22.6,10:1795,32.6,5:1796,32.6,5:1797,12.6,10:1798,22.6,10:1799,12.6,10:1800,12.6,10:1801,8.8,10:1802,5,10:1803,5,10:1804,5,10:1805,5,10:1806,22.6,12:1808,22.6,12:1809,22.6,12:1810,22.6,12:1811,3.2,60:1812,3.2,60:1813,8.8,20:1814,15,10:1815,20,5:1816,20,5:1817,20,5:1818,20,5:1819,20,5:1820,20,3:1821,20,2:1822,10,10:1823,42.6,10:1824,42.6,10:1825,42.6,10:1826,42.6,10:1827,42.6,10:1828,25,10:1829,25,10:1830,18.8,12:1831,18.8,12:1832,18.8,12:1833,17.8,12:1834,62.6,12:1835,62.6,12:1836,62.6,12:1837,62.6,12:2090,4,20:2091,3.3,40:2092,4,20:2095,4,20:2096,9.5,20:2097,9.5,20:2098,4.5,40:2099,4.8,20:2100,5,24:2101,4.8,12:2102,4.8,12:2103,4.8,12:2104,4.8,12:2105,4.8,12:2106,7.8,20:2107,4.5,12:2108,4.5,12:2109,4.5,12:2110,4.5,12:2111,4.5,12:2112,3.8,24:2113,3.8,24:2114,2.5,48:2115,4.5,18:2116,4.5,18:2117,5,36:2118,5,36:2119,5,36:2120,5,24:2121,5,24:2122,5.5,36:2123,5.5,36:2124,5.5,36:2125,34.5,12:2126,23.5,12:2127,26.5,12:2128,26.5,12:2129,5,40:2130,5.3,20:2131,5,20:2132,4.8,20:2133,4,30:2134,4,10:2135,4,10:2136,4,10:2137,4,10:2138,4,10:2139,4,10:2140,4,10:2141,4,10:2142,4,10:2143,4,10:2144,7.8,20:2145,2.5,20:2146,4.8,20:2147,4.8,20:2148,3.5,10:2149,3.8,30:2150,4.5,10:2151,3.3,20:2152,3.3,20:2153,3.3,20:2154,3.3,20:2155,3.3,20:2156,4.5,30:2157,4.5,30:2158,4.5,30:2159,4.5,30:2160,4.5,30:2161,4.5,30:2162,4.5,30:2163,2.5,20:2164,4.8,12:2165,4.8,12:2166,4.8,12:2167,4.8,12:2168,4.8,12:2169,4.5,30:2170,4.5,30:2171,4.5,30:2172,4.5,30:2173,4.5,30:2174,4.5,30:2175,4.5,30:2176,4.5,30:2177,4.5,30:2178,4.5,30:2179,4.5,30:2180,5,24:2181,5.8,24:2182,5.8,24:2183,5,120:2184,4.5,50:2185,4.5,50:2186,4.5,50:2187,4.5,50:2188,4.5,50:2189,3.5,20:2190,3.8,20:2191,4.5,20:2192,4.8,20:2193,4.8,20:2194,4.5,12:2195,3.3,12:2196,3,12:2197,2.8,12:2198,4.8,24:2199,4.8,24:2200,4.8,24:2201,4.8,24:2202,4.8,24:2203,4.8,24:2204,4.8,24:2205,4.8,24:2206,4.8,24:2207,4.5,12:2208,4.5,10:2209,4.8,24:2210,6.3,12:2211,6.3,12:2212,5.8,24:2213,4.8,24:2214,4.8,24:2215,4.5,12:2216,5,12:2217,4.8,24:2218,4.8,24:2219,4.8,20:2221,4.8,20:2222,4.8,20:2224,3.8,20:2225,5.3,4:2226,4.5,4:2227,3.3,20:2228,4.8,20:2229,3.3,20:2230,4,12:2231,4,12:2232,4,12:2233,4,12:2234,4.8,12:2235,4.8,30:2236,5,100:2237,4.8,12:2238,4.8,12:2239,4.8,12:2240,4.8,12:2241,4.8,12:2242,5,12:2243,5,12:2244,5,12:2245,4.8,12:2246,5,12:2247,5,12:2248,5,12:2249,4.5,12:2250,4.8,12:2251,4,20:2252,4,20:2253,2.5,20:2254,5,30:2255,4.8,72:2256,4.8,72:2257,4.8,72:2258,4.8,24:2259,4,12:2260,4,12:2261,4,12:2262,4,12:2263,3.8,8:2264,3.8,8:2265,4,12:2266,4,12:2267,4.5,12:2268,2.5,30:2269,5,24:2270,4.5,30:2271,4.8,36:2272,4.8,10:2273,4.8,10:2274,4.8,10:2275,4.8,10:2276,4.8,10:2277,4.8,10:2278,4.8,10:2279,7.8,10:2280,3.8,10:2281,3.8,10:2282,3.8,10:2283,3.8,10:2284,3.8,10:2285,4.5,10:2286,4.5,10:2287,4.5,10:2288,4.5,10:2289,4.5,10:2290,5.3,10:2291,5.3,10:2292,5.3,10:2293,14,10:2294,14,10:2295,14,10:2296,4.8,10:2297,4.8,10:2298,4.8,10:2299,4,30:2300,5,40:2301,5,20:2302,4.8,20:2303,5,20:2304,7.8,20:2305,4.8,40:2306,4.8,40:2307,4.8,40:2308,4.5,10:2309,4.5,10:2310,4.5,10:2311,4.5,10:2312,4.5,10:2313,4.5,10:2314,4.5,10:2315,4.8,30:2316,4.8,30:2317,4.8,30:2318,4.8,30:2319,4.8,30:2320,4.8,30:2321,4.8,30:2322,4.8,30:2323,4.8,30:2324,5,24:2325,5,24:2326,2.5,10:2327,3.8,10:2328,4.8,10:2330,4.8,10:2331,4.8,10:2332,4.8,10:2333,4.8,12:2334,4.8,12:2423,4.8,12:2335,4.8,12:2424,4.8,12:2336,4.8,12:2337,4.8,12:2338,4.8,30:2339,4,12:2340,4.5,12:2341,3.8,12:2342,3.8,12:2343,4,40:2344,3.8,20:2345,3.8,20:2346,4,40:2347,4,40:2348,4,40:2349,3.8,20:2350,3.8,20:2351,3.8,20:2352,3.8,20:2353,3.8,20:2354,3.8,20:2355,4,20:2356,4,40:2357,4,40:2358,4,20:2359,4,20:2360,3.3,40:2361,4,20:2362,4,20:2363,3.3,40:2364,3.3,20:2365,4,20:2366,3.3,40:2367,4,20:2368,4,20:2369,3.3,40:2370,4,20:2371,4,20:2372,4,20:2373,3.3,40:2374,4,20:2375,3.3,20:2376,3.3,20:2377,3.3,20:2378,3.3,20:2379,3.3,40:2380,4,20:2381,4,20:2421,4,20:2422,4,20:2382,4,20:2383,4,20:2384,4,20:2385,4,20:2386,4,20:2387,4,20:2388,4,20:2389,4,20:2390,3.3,20:2391,4,20:2392,3.3,20:2393,3.3,20:2394,4,20:2395,4,20:2396,4,20:2397,4,20:2398,3.3,20:2399,4,20:2400,3.3,40:2401,4,20:2402,3.3,20:2403,4,20:2404,4,20:2405,3.3,40:2406,3.3,20:1562,6.4,5:1563,14.6,5:1564,2.2,24:1565,2.2,24" + str := "1000,1.3:1001,2.3:1002,1.5:1006,2:1008,3.3:1009,1.3:1010,2.3:1011,1.3:1012,2:1013,1.3:1014,1.8:1015,1.3:1016,2.7:1017,2.3:1018,1.9:1019,1.5:1020,1.7:1021,1.2:1022,1.4:1023,1.2:1024,1.4:1025,1.9:1026,1.3:1027,1.3:1028,1.2:1029,1.9:1030,1.3:1031,1.7:1032,1.8:1033,1.3:1034,1.4:1035,1.2:1036,1.2:1037,1.4:1038,1.7:1039,1.9:1040,1.4:1041,1.4:1042,1.2:1043,1.5:1044,1.1:1045,1.7:1046,1.9:1047,1.3:1048,1.3:1049,1.3:1050,1:1051,1:1052,2:1053,1.4:1054,1.3:1055,1.3:1056,1.9:1057,2.3:2408,2.3:1058,2:1059,1.3:1060,1.3:1061,1.3:1062,1.3:1063,1.3:1064,1.7:1065,1.9:1066,1.1:1067,2.5:1068,1.3:1069,0.5:1070,1:1071,1.3:1072,2.7:1073,1.5:1074,1.9:1075,1.3:1076,1.3:1077,1.5:1078,2.2:1079,2.3:1080,1.6:1081,1.8:1082,0.3:1083,1.9:1084,1.4:1085,1.5:1086,1.5:1087,2.5:1088,2.3:1089,1.7:1090,1.5:1091,1:1092,7.3:1093,6:1094,4.2:1095,3.8:1096,2.7:1097,3.2:1098,3.2:1099,3.2:1100,2.8:1101,2.7:1102,3.2:1103,6.3:1104,4.4:1105,3.8:1106,2.8:1107,2.8:1108,2.3:1109,1.8:1110,2.3:1111,2.3:1112,3.2:1113,3.5:1114,3.8:1115,3:1116,3.8:1117,3.8:1118,3.2:1119,3.2:1120,6.3:1121,7.5:1122,6.9:1123,5.3:1124,4.4:1125,5.3:1126,4.4:1127,4.8:1128,4.8:1129,5.5:1130,4.8:1131,10:1132,4.4:1133,1.2:1134,1.2:1135,1.3:1136,0.7:1137,2.2:1138,1.2:1139,1.7:1140,3.5:1141,7.5:1142,5:1143,1:1144,1.7:1145,1.4:1146,2.5:1147,2.3:1148,2.5:1149,2.5:1150,2.5:1151,1.4:1152,3.5:1153,1.2:1154,1.3:1155,1.5:1156,6.3:1157,2.8:1158,5.7:1159,5:1160,1.9:1161,6.5:1162,6.5:1163,10:1164,6.9:1165,4.4:1166,7.5:1167,1.3:1168,1.2:1169,1.5:1170,1.9:1171,2:1172,4.2:1173,1.5:1174,1.8:1175,1.7:1176,1.3:1177,1.9:1178,8.8:1179,3.8:1180,2.8:1181,1.5:1182,3.5:1183,3:1184,2.9:1185,3.2:1186,3.5:1187,4.4:1188,4.7:1189,4.8:1190,5:1191,5.7:1192,7.5:1193,9.5:1194,10:1195,10.7:1196,9.4:1197,8.2:1198,3.8:1199,3.8:1200,15:1201,16.3:1202,3.8:1203,2.5:1204,2.3:1205,2.7:1206,8.2:1207,1.5:1208,3.5:1209,3.2:1210,4.7:1211,7.5:1212,5.7:1213,4.4:1214,10.7:1215,1.6:1216,2.9:1217,2.7:1218,3:1219,2.5:1220,6.9:1221,6.5:2409,1.1:2410,1.1:2411,1.5:2412,1.5:2413,1.1:2414,1.1:2415,1.5:2416,3.1:2417,1.5:2418,1.5:2419,1.5:2420,2.7:1500,0.4:1501,0.6:1502,0.9:1508,2:1510,0.3:1511,0.3:1512,0.6:1513,0.6:1514,0.6:1515,0.6:1523,1.3:1560,0.4:1561,1.4:1838,2.8:1839,21.3:1840,12.5:1841,15:1842,2.3:1843,3.8:1844,3.3:1845,1.3:1846,0.7:1847,0.4:1848,0.6:1849,0.5:1850,0.6:1851,0.7:1852,1.4:1853,1.4:1854,1:1855,1:1856,1.4:1857,1.9:1858,2.9:1859,1:1860,0.1:1861,2:1862,2.3:1863,1.1:1864,0.3:1865,1.3:1866,0.4:1867,4.4:1868,1.6:1869,0.4:1870,2.5:1871,2:1872,0.6:1873,1.3:1874,8.1:1875,5:1876,6.3:1877,3.1:1878,1.7:1879,1.9:1880,1.9:1881,6.3:1882,3.1:1883,2:1884,2.3:1885,1.3:1886,0.8:1887,2.3:1888,1.1:1889,3.1:1890,3.1:1891,2:1892,2.8:1893,3:1894,1.3:1895,1.3:1896,5:1897,1.3:1898,1:1899,3.8:1900,1.5:1901,2.5:1902,3.1:1903,0.8:1904,1.9:1905,1.6:1906,0.6:1907,1.3:1908,1.9:1909,1.3:1910,3.1:1911,0.6:1912,3.5:1913,3.1:1914,1:1915,1.3:1916,1.3:1917,6.3:1918,6.3:1919,1.6:1920,2.8:1921,11.3:1922,12.5:1923,2.5:1924,1.6:1925,1.5:1926,1.3:1927,2.5:1928,1:1929,0.8:1930,1.6:1931,1.4:1932,0.8:1933,1:1934,1.3:1935,1:1936,1.3:1937,2.5:1938,4.4:1939,5:1940,1.3:1941,1.9:1942,2.5:1943,3.8:1944,5:1945,6.3:1946,1.3:1947,1.3:1948,3.1:1949,1.3:1950,0.8:1952,5.6:1953,6.9:1954,1.3:1955,1.6:1956,23.1:1957,11.3:1958,1:1959,1:1960,1:1961,0.6:1962,1.1:1963,1.1:1964,5:1965,4.4:1966,0.7:1967,0.8:1968,1.1:1969,0.9:1970,3.1:1971,4.8:1972,6.3:1973,6.3:1974,1.3:1975,1:1976,1.6:1977,1.6:1978,1.3:1979,1.5:1980,3.1:1981,4.4:1982,1.9:1983,1.9:1984,0.8:1985,1.3:1986,1:1987,2.8:1988,0.3:1989,0.6:1990,1:1991,0.8:1992,1.1:1993,1:1994,1.5:1995,2.5:1996,3:1997,4.4:1998,4.4:1999,2.5:2000,1.4:2002,1.4:2003,1:2004,1.4:2005,1.6:2006,1.3:2007,2.3:2008,1.5:2009,4.5:2010,4.5:2011,3.8:2012,3.1:2013,1.3:2014,1.3:2015,0.6:2016,0.5:2017,0.5:2018,1.3:2019,1.5:2020,1.9:2021,2.3:2022,1.5:2023,1.9:2024,2.3:2025,0.6:2026,0.8:2027,0.9:2028,3.1:2029,4.4:2030,3.8:2031,4.4:2032,0.3:2033,0.4:2034,1.3:2035,1.5:2036,2.3:2037,0.9:2038,1.3:2039,1.3:2040,1.4:2041,0.6:2042,6.3:2043,0.6:2044,0.3:2045,6.3:2046,6.3:2047,6.3:2048,6.3:2049,6.3:2050,6.3:2051,0.5:2052,0.9:2053,0.4:2054,0.4:2055,0.6:2056,1.6:2057,0.7:2058,1.5:2059,1:2060,1.3:2061,1.4:2062,1.6:2063,1.3:2064,1:2065,1.1:2066,1.4:2067,1.4:2068,2.5:2069,1:2070,1.3:2071,1.3:2072,1.3:2073,1.3:2074,1.3:2075,1.4:2076,4.4:2077,20:2078,7.3:2079,12.5:2080,7.5:2081,0.8:2082,2.3:2083,1.4:2084,1.4:2085,15:2086,15:2087,11.3:2088,1.8:2089,3.1:2407,0.5:1951,2:1516,4.4:1517,3.8:1518,3.1:1519,6.9:1520,5.6:1521,6.9:1522,7.5:1524,17.5:1525,1.9:1526,6.9:1527,10:1528,9.4:1529,13.8:1530,8.1:1531,7.5:1532,8.1:1533,9.4:1534,3.1:1535,3.8:1536,4.4:1537,3.1:1538,2.9:1539,3.1:1540,2.1:1541,6.3:1542,6.3:1543,10.6:1544,7.5:1545,5.6:1546,8.8:1547,5.6:1548,4.4:1549,3.8:1550,8.1:1551,2.1:1552,1.1:1553,1.3:1554,1.9:1555,2.5:1556,3.1:1557,1.9:1558,4.4:1566,1.1:1567,1.9:1568,1.5:1569,7.5:1570,11.3:1571,6.9:1572,3.8:1573,7.5:1574,3.8:1575,3.1:1576,6.3:1577,8.1:1578,0.6:1579,1.1:1580,22.5:1581,27.5:1582,5:1583,10:1584,3.8:1585,7.5:1586,2.5:1587,1.9:1588,8.1:1589,8.8:1590,6.9:1591,6.9:1592,1.6:1593,3.1:1594,5:1595,6.9:1596,6.9:1597,4.4:1598,4.4:1599,7.5:1600,7.5:1601,5.6:1602,5.6:1603,3.1:1604,4.4:1605,18.8:1606,31.3:1607,6.9:1608,4.4:1609,6.3:1610,2.5:1611,3.1:1612,3.8:1613,6.3:1614,13.8:1615,26.3:1616,12.5:1617,18.8:1618,15:1619,15:1620,8.8:1621,11.3:1622,12.5:1623,7.5:1624,8.8:1625,10:1626,10:1627,8.8:1628,7.5:1629,6.3:1630,2.5:1631,3.1:1632,3.8:1633,5:1634,6.3:1635,2.5:1636,3.1:1637,1.6:1638,2.5:1639,3.5:1640,6.9:1641,6.9:1642,6.9:1643,2.5:1644,3.8:1645,4.4:1646,5:1647,10.6:1648,10.6:1652,2.3:1653,3.1:1654,3.8:1655,1:1656,1.3:1657,2.3:1658,2.3:1659,43.8:1660,31.3:1661,22.5:1662,16.3:1663,3.8:1664,6.3:1665,6.3:1666,5.6:1667,6.3:1668,7.5:1669,43.8:1670,6.3:1671,10:1672,12.5:1673,2.5:1674,3.1:1675,2.5:1676,2.8:1677,43.8:1678,1.3:1679,1.5:1680,3.5:1681,4.4:1682,5.6:1683,5:1684,6.3:1685,5:1686,6.3:1687,7.5:1688,6.9:1689,15:1690,3.1:1691,5.6:1692,7.5:1693,17.5:1694,16.3:1695,3.1:1696,3.1:1559,3.5:1223,3.1:1225,2.8:1226,1.5:1227,5.6:1228,4.4:1229,4.4:1230,15:1231,10.6:1232,3.1:1233,3.1:1234,1.3:1235,10.6:1236,1.6:1237,1.3:1238,1.9:1239,1.3:1240,5:1241,10:1242,7.5:1243,10:1244,7.5:1245,1.9:1246,0.8:1247,1.9:1248,1.9:1249,1.6:1250,1.6:1251,10.6:1252,8.1:1253,5:1254,4:1255,13.8:1256,3:1257,30:1258,15.6:1259,8.1:1260,0.9:1261,3.1:1262,5.6:1263,7.5:1264,4.4:1265,6.9:1266,9.4:1268,11.9:1269,3.1:1270,5.6:1271,3.8:1272,5.6:1273,8.1:1274,12.5:1275,6.3:1276,10.6:1277,13.1:1278,20.6:1279,8.8:1280,8.8:1282,10:1284,6.9:1285,9.4:1286,7.5:1287,0.9:1288,10.6:1289,0.5:1290,1.1:1291,0.6:1292,0.4:1293,0.4:1294,0.5:1295,0.6:1296,36:1297,27:1298,18:1299,9:1300,7.5:1301,15:1302,22.5:1303,30:1304,41.3:1305,33:1306,24.8:1307,16.5:1308,12.4:1309,8.3:1310,5:1311,6.9:1312,7.5:1313,5:1314,6.9:1315,3.5:1316,2:1317,3.1:1318,12.5:1319,9.4:1320,0.6:1321,5:1322,0.6:1323,1.9:1324,1.9:1325,2.3:1326,4.5:1327,6.8:1328,10.6:1329,18.1:1330,28.1:1331,10.6:1332,10.6:1333,8.1:1334,8.1:1335,5.6:1336,5.6:1337,8.8:1338,8.8:1339,8.8:1340,9.4:1341,8.1:1342,8.1:1343,8.1:1344,4.4:1345,9.4:1346,8.1:1347,9.4:1348,4.4:1349,3.3:1350,0.9:1352,1.4:1353,1.5:1354,2.3:1355,0.4:1356,0.9:1357,0.6:1358,1.1:1359,1.1:1360,1.9:1361,1:1362,1:1363,0.6:1364,0.6:1365,0.6:1366,0.6:1367,0.6:1368,3.8:1369,3.8:1370,3.8:1371,3.8:1372,4.8:1373,4.8:1374,4.8:1375,4.8:1376,2.3:1377,2.3:1378,2.3:1379,2.3:1380,2.5:1381,2.5:1382,0.8:1383,0.8:1384,1.6:1385,0.8:1386,0.8:1387,1.3:1388,0.8:1389,0.4:1390,0.6:1391,0.6:1392,1.3:1393,1.3:1394,5.6:1395,5.6:1396,5.6:1397,5.6:1398,5:1399,6.9:1400,6.9:1401,5.6:1402,5:1403,5:1404,5:1405,5:1406,12.5:1407,12.5:1408,1.3:1409,1.9:1410,1.8:1411,1.3:1412,1.9:1413,4:1414,5.3:1415,1.5:1416,2.5:1417,1.9:1418,2.5:1419,2.5:1420,1.9:1421,1.9:1422,0.9:1423,0.9:1424,0.9:1425,0.4:1426,0.6:1427,0.6:1428,0.6:1429,0.6:1430,1.3:1431,3:1432,1.6:1433,1.9:1434,2:1435,1.1:1436,0.9:1437,1.2:1438,0.9:1439,0.6:1440,0.4:1441,0.9:1442,0.6:1443,1.9:1444,1.9:1445,2.8:1446,2.5:1447,8.1:1448,5.6:1449,2.5:1450,2.5:1451,6.9:1452,1.9:1453,6.9:1454,2.3:1455,2.3:1456,4.4:1457,4.4:1458,0.5:1459,2.3:1460,1.5:1461,1.5:1462,2.3:1463,9.4:1464,0.8:1465,0.6:1466,2:1467,3.1:1468,1.5:1469,6.3:1470,3.1:1471,4.8:1472,3.1:1473,1.4:1474,0.6:1475,6.9:1476,4.4:1477,8.1:1478,6.9:1479,5.6:1480,9.4:1481,8.1:1482,6.9:1483,5:1484,8.1:1485,7.5:1486,3.1:1487,3.1:1488,5.6:1489,4:1490,4.8:1491,5.6:1492,2:1493,1.6:1494,1.6:1495,2:1496,2:1497,2.9:1498,7.5:1499,6.3:1503,8.1:1504,8.1:1505,0.6:1506,2.5:1507,8.8:1509,6.9:1649,4.4:1650,4.4:1651,1.9:1697,26.9:1698,30:1699,26.9:1700,26.9:1701,32.5:1702,32.5:1703,42.5:1704,40:1705,16.3:1706,31.3:1707,4.4:1708,4.4:1709,4.4:1710,4.4:1711,4.4:1712,4.4:1713,4.4:1714,10:1715,25:1716,25:1717,36.3:1718,11.3:1719,11.3:1720,11.3:1721,18.8:1722,11.3:1723,11.3:1724,29.4:1725,29.4:1726,10:1727,10:1728,5:1729,5:1730,5:1731,16.3:1732,20:1733,3.8:1734,1.3:1735,4.4:1736,4.4:1737,5.3:1738,8.1:1739,3.1:1740,1.9:1741,1.9:1742,1.9:1743,1.9:1744,1.9:1745,1.9:1746,12.5:1747,7.5:1748,12.5:1749,12.5:1750,10:1751,12.5:1752,12.5:1753,6.3:1754,12.5:1755,8.8:1756,5:1757,2.5:1758,10:1759,18.8:1760,12.5:1761,11.3:1762,11.3:1763,11.3:1764,11.3:1765,11.3:1766,11.3:1767,8.8:1768,8.8:1769,8.8:1770,8.8:1771,8.8:1772,6.3:1773,6.3:1774,6.3:1775,6.3:1776,3.8:1777,3.1:1778,2.3:1779,21.3:1780,21.3:1781,21.3:1782,21.3:1783,9.4:1784,15:1785,16.3:1786,16.3:1787,6.3:1788,7.5:1789,8.8:1790,10:1791,18.8:1792,26.3:1793,11.3:1794,11.3:1795,16.3:1796,16.3:1797,6.3:1798,11.3:1799,6.3:1800,6.3:1801,4.4:1802,2.5:1803,2.5:1804,2.5:1805,2.5:1806,11.3:1808,11.3:1809,11.3:1810,11.3:1811,1.6:1812,1.6:1813,4.4:1814,7.5:1815,10:1816,10:1817,10:1818,10:1819,10:1820,10:1821,10:1822,5:1823,21.3:1824,21.3:1825,21.3:1826,21.3:1827,21.3:1828,12.5:1829,12.5:1830,9.4:1831,9.4:1832,9.4:1833,8.9:1834,31.3:1835,31.3:1836,31.3:1837,31.3:2090,1.6:2091,1.3:2092,1.6:2095,1.6:2096,3.8:2097,3.8:2098,1.8:2099,1.9:2100,2:2101,1.9:2102,1.9:2103,1.9:2104,1.9:2105,1.9:2106,3.1:2107,1.8:2108,1.8:2109,1.8:2110,1.8:2111,1.8:2112,1.5:2113,1.5:2114,1:2115,1.8:2116,1.8:2117,2:2118,2:2119,2:2120,2:2121,2:2122,2.2:2123,2.2:2124,2.2:2125,13.8:2126,9.4:2127,10.6:2128,10.6:2129,2:2130,2.1:2131,2:2132,1.9:2133,1.6:2134,1.6:2135,1.6:2136,1.6:2137,1.6:2138,1.6:2139,1.6:2140,1.6:2141,1.6:2142,1.6:2143,1.6:2144,3.1:2145,1:2146,1.9:2147,1.9:2148,1.4:2149,1.5:2150,1.8:2151,1.3:2152,1.3:2153,1.3:2154,1.3:2155,1.3:2156,1.8:2157,1.8:2158,1.8:2159,1.8:2160,1.8:2161,1.8:2162,1.8:2163,1:2164,1.9:2165,1.9:2166,1.9:2167,1.9:2168,1.9:2169,1.8:2170,1.8:2171,1.8:2172,1.8:2173,1.8:2174,1.8:2175,1.8:2176,1.8:2177,1.8:2178,1.8:2179,1.8:2180,2:2181,2.3:2182,2.3:2183,2:2184,1.8:2185,1.8:2186,1.8:2187,1.8:2188,1.8:2189,1.4:2190,1.5:2191,1.8:2192,1.9:2193,1.9:2194,1.8:2195,1.3:2196,1.2:2197,1.1:2198,1.9:2199,1.9:2200,1.9:2201,1.9:2202,1.9:2203,1.9:2204,1.9:2205,1.9:2206,1.9:2207,1.8:2208,1.8:2209,1.9:2210,2.5:2211,2.5:2212,2.3:2213,1.9:2214,1.9:2215,1.8:2216,2:2217,1.9:2218,1.9:2219,1.9:2221,1.9:2222,1.9:2224,1.5:2225,2.1:2226,1.8:2227,1.3:2228,1.9:2229,1.3:2230,1.6:2231,1.6:2232,1.6:2233,1.6:2234,1.9:2235,1.9:2236,2:2237,1.9:2238,1.9:2239,1.9:2240,1.9:2241,1.9:2242,2:2243,2:2244,2:2245,1.9:2246,2:2247,2:2248,2:2249,1.8:2250,1.9:2251,1.6:2252,1.6:2253,1:2254,2:2255,1.9:2256,1.9:2257,1.9:2258,1.9:2259,1.6:2260,1.6:2261,1.6:2262,1.6:2263,1.5:2264,1.5:2265,1.6:2266,1.6:2267,1.8:2268,1:2269,2:2270,1.8:2271,1.9:2272,1.9:2273,1.9:2274,1.9:2275,1.9:2276,1.9:2277,1.9:2278,1.9:2279,3.1:2280,1.5:2281,1.5:2282,1.5:2283,1.5:2284,1.5:2285,1.8:2286,1.8:2287,1.8:2288,1.8:2289,1.8:2290,2.1:2291,2.1:2292,2.1:2293,5.6:2294,5.6:2295,5.6:2296,1.9:2297,1.9:2298,1.9:2299,1.6:2300,2:2301,2:2302,1.9:2303,2:2304,3.1:2305,1.9:2306,1.9:2307,1.9:2308,1.8:2309,1.8:2310,1.8:2311,1.8:2312,1.8:2313,1.8:2314,1.8:2315,1.9:2316,1.9:2317,1.9:2318,1.9:2319,1.9:2320,1.9:2321,1.9:2322,1.9:2323,1.9:2324,2:2325,2:2326,1:2327,1.5:2328,1.9:2330,1.9:2331,1.9:2332,1.9:2333,1.9:2334,1.9:2423,1.9:2335,1.9:2424,1.9:2336,1.9:2337,1.9:2338,1.9:2339,1.6:2340,1.8:2341,1.5:2342,1.5:2343,1.6:2344,1.5:2345,1.5:2346,1.6:2347,1.6:2348,1.6:2349,1.5:2350,1.5:2351,1.5:2352,1.5:2353,1.5:2354,1.5:2355,1.6:2356,1.6:2357,1.6:2358,1.6:2359,1.6:2360,1.3:2361,1.6:2362,1.6:2363,1.3:2364,1.3:2365,1.6:2366,1.3:2367,1.6:2368,1.6:2369,1.3:2370,1.6:2371,1.6:2372,1.6:2373,1.3:2374,1.6:2375,1.3:2376,1.3:2377,1.3:2378,1.3:2379,1.3:2380,1.6:2381,1.6:2421,1.6:2422,1.6:2382,1.6:2383,1.6:2384,1.6:2385,1.6:2386,1.6:2387,1.6:2388,1.6:2389,1.6:2390,1.3:2391,1.6:2392,1.3:2393,1.3:2394,1.6:2395,1.6:2396,1.6:2397,1.6:2398,1.3:2399,1.6:2400,1.3:2401,1.6:2402,1.3:2403,1.6:2404,1.6:2405,1.3:2406,1.3:1562,3.2:1563,7.3:1564,1.1:1565,1.1" skuList := strings.Split(str, ":") for k, v := range skuList { skuEx := strings.Split(v, ",") - skuNameID, skuPrice, stock := skuEx[0], skuEx[1], skuEx[2] + skuNameID, skuPrice := skuEx[0], skuEx[1] skuPrice = utils.Float64ToStr(math.Floor(utils.Str2Float64(skuPrice) * 100)) - sql := fmt.Sprintf(`UPDATE store_sku_bind sb JOIN sku s ON sb.sku_id = s.id SET sb.price = %s,sb.mtwm_price = %s,ebai_price = %s,jd_price = %s,jds_price = %s,tao_price = %s,dd_price = %s ,sb.stock = %s,sb.mtwm_sync_status = 57 ,sb.ebai_sync_status = 57,sb.jd_sync_status = 57,sb.jds_sync_status = 57,sb.dd_sync_status = 57,sb.tao_sync_status = 57 WHERE s.name_id = %s AND sb.store_id = 20002;`, skuPrice, skuPrice, skuPrice, skuPrice, skuPrice, skuPrice, skuPrice, stock, skuNameID) + sql := fmt.Sprintf(`UPDATE sku_name sb SET sb.price = %s WHERE id = %s ;`, skuPrice, skuNameID) fmt.Println(fmt.Sprintf("k:%d,sql:%s", k-k, sql)) } diff --git a/platformapi/ebaiapi/shop_test.go b/platformapi/ebaiapi/shop_test.go index 5de537f0..778ac399 100644 --- a/platformapi/ebaiapi/shop_test.go +++ b/platformapi/ebaiapi/shop_test.go @@ -4,6 +4,7 @@ import ( "fmt" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/globals" + "strings" "testing" ) @@ -311,9 +312,31 @@ func TestShopAptitudeUpload(t *testing.T) { } func TestShopDeliveryinfoGet(t *testing.T) { - result, err := api.ShopDeliveryinfoGet("", 2233065959) - if err != nil { - t.Fatal(err) + vendorStoreID := "1128314567" + store, err := api.ShopGet2("", utils.Str2Int64(vendorStoreID)) + globals.SugarLogger.Debugf("-:=%s", utils.Format4Output(store, false)) + globals.SugarLogger.Debugf("-:=%v", err) + + list, err := api.ShopDeliveryinfoGet("", utils.Str2Int64(vendorStoreID)) + if err == nil && len(list) > 0 { + deliveryRange := EbaiDeliveryRegion2Jx2(list[0]) + globals.SugarLogger.Debugf("-:=%s", deliveryRange) } - t.Log(utils.Format4Output(result, false)) + +} + +func EbaiDeliveryRegion2Jx2(deliveryRegion map[string]interface{}) string { + if len(deliveryRegion) > 0 { + if deliveryRegion["delivery_areas"] == nil { + return "" + } + region := deliveryRegion["delivery_areas"].([]interface{})[0].(map[string]interface{})["coordinates"].([]interface{}) + coords := make([]string, len(region)) + for k, v := range region { + mapV := v.(map[string]interface{}) + coords[k] = fmt.Sprintf("%.6f,%.6f", utils.MustInterface2Float64(mapV["longitude"]), utils.MustInterface2Float64(mapV["latitude"])) + } + return strings.Join(coords, ";") + } + return "" } diff --git a/platformapi/fnpsapi/store.go b/platformapi/fnpsapi/store.go index bbe3687a..10a016ee 100644 --- a/platformapi/fnpsapi/store.go +++ b/platformapi/fnpsapi/store.go @@ -140,63 +140,80 @@ const ( ) // HttpToGuoYuanFN 订单消息推送果园 -func HttpToGuoYuanFN(param map[string]interface{}, requestType string) (*http.Response, error) { - var paramData []byte - var err error - paramData, err = json.Marshal(param) - if err != nil { - return nil, err - } - body := strings.NewReader(string(paramData)) +func HttpToGuoYuanFN(param map[string]interface{}, requestType string, serverType string) (*http.Response, error) { + //var paramData []byte + //var err error + //paramData, err = json.Marshal(param) + //if err != nil { + // return nil, err + //} + //body := strings.NewReader(string(paramData)) url := "" - switch requestType { - case FengNiaoCallbackTypeStore: - url = "http://callback-jxgy.jxc4.com/fn/fnStore" - case FengNiaoCallbackTypeOrder: - url = "http://callback-jxgy.jxc4.com/fn/fnOrder" - case FengNiaoCallbackTypeAbnormal: - url = "http://callback-jxgy.jxc4.com/fn/fnAbnormal" - case FengNiaoCallbackTypeToken: - url = "http://callback-jxgy.jxc4.com/fn/fnToken" + if serverType == "prod" { + switch requestType { + case FengNiaoCallbackTypeStore: + url = "http://callback-jxgy.jxc4.com/fn/fnStore" + case FengNiaoCallbackTypeOrder: + url = "http://callback-jxgy.jxc4.com/fn/fnOrder" + case FengNiaoCallbackTypeAbnormal: + url = "http://callback-jxgy.jxc4.com/fn/fnAbnormal" + case FengNiaoCallbackTypeToken: + url = "http://callback-jxgy.jxc4.com/fn/fnToken" + } + } else if serverType == "jxgy" { + switch requestType { + case FengNiaoCallbackTypeStore: + url = "http://callback-gblm.jxc4.com/fn/fnStore" + case FengNiaoCallbackTypeOrder: + url = "http://callback-gblm.jxc4.com/fn/fnOrder" + case FengNiaoCallbackTypeAbnormal: + url = "http://callback-gblm.jxc4.com/fn/fnAbnormal" + case FengNiaoCallbackTypeToken: + url = "http://callback-gblm.jxc4.com/fn/fnToken" + } + } else { + return nil, nil } - httpReq, err := http.NewRequest(http.MethodPost, url, body) + + httpReq, err := http.NewRequest(http.MethodPost, url, strings.NewReader(utils.Map2URLValues(param).Encode())) if err != nil { return nil, err } httpReq.Header.Set("Content-Type", "application/json") + httpReq.Header.Set("accept", "application/json, text/plain, */*") httpRes, err := http.DefaultClient.Do(httpReq) return httpRes, err } // HttpToPetFN 订单消息推送宠物 -func HttpToPetFN(param map[string]interface{}, requestType string) (*http.Response, error) { - var paramData []byte - var err error - paramData, err = json.Marshal(param) - if err != nil { - return nil, err - } - body := strings.NewReader(string(paramData)) - url := "" - switch requestType { - case FengNiaoCallbackTypeStore: - url = "http://callback-gblm.jxc4.com/fn/fnStore" - case FengNiaoCallbackTypeOrder: - url = "http://callback-gblm.jxc4.com/fn/fnOrder" - case FengNiaoCallbackTypeAbnormal: - url = "http://callback-gblm.jxc4.com/fn/fnAbnormal" - case FengNiaoCallbackTypeToken: - url = "http://callback-gblm.jxc4.com/fn/fnToken" - } - httpReq, err := http.NewRequest(http.MethodPost, url, body) - if err != nil { - return nil, err - } - - httpReq.Header.Set("Content-Type", "application/json") - - httpRes, err := http.DefaultClient.Do(httpReq) - return httpRes, err -} +//func HttpToPetFN(param map[string]interface{}, requestType string) (*http.Response, error) { +// var paramData []byte +// var err error +// paramData, err = json.Marshal(param) +// if err != nil { +// return nil, err +// } +// body := strings.NewReader(string(paramData)) +// url := "" +// switch requestType { +// case FengNiaoCallbackTypeStore: +// url = "http://callback-gblm.jxc4.com/fn/fnStore" +// case FengNiaoCallbackTypeOrder: +// url = "http://callback-gblm.jxc4.com/fn/fnOrder" +// case FengNiaoCallbackTypeAbnormal: +// url = "http://callback-gblm.jxc4.com/fn/fnAbnormal" +// case FengNiaoCallbackTypeToken: +// url = "http://callback-gblm.jxc4.com/fn/fnToken" +// } +// httpReq, err := http.NewRequest(http.MethodPost, url, body) +// if err != nil { +// return nil, err +// } +// +// httpReq.Header.Set("Content-Type", "application/json") +// +// httpRes, err := http.DefaultClient.Do(httpReq) +// return httpRes, err +//} diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index 5f8f6526..22b8aafc 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -32,11 +32,11 @@ func init() { // 京东果园 320406 //api = New("1e87595b-e850-4ba4-9ee0-53bcfe383a4f", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") // 京东白货 - api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349") + //api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349") // 果切 379599 //api = New("ad4061a1-6a5c-43f9-bf51-b1232fd9499d", "f2ed33075faf4773a47e065acd79532b", "aed14cbbecac4456843570e90c5f46ec") // 381564 - //api = New("8d9e4443-3536-41ae-b6c7-677f90f1978b", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da") + api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da") // 384633 ///api = New("02a3f772-89f3-46f1-bbd5-74be346cba54", "e496a0f9b88a407297fea283b8dc9e29", "9bb82ffbec144c4b8fc8d627e5ca6a35") diff --git a/platformapi/jdapi/store_test.go b/platformapi/jdapi/store_test.go index 1c2d429d..50426758 100644 --- a/platformapi/jdapi/store_test.go +++ b/platformapi/jdapi/store_test.go @@ -41,7 +41,7 @@ func TestGetStationsByVenderId(t *testing.T) { } func TestGetStoreInfoByStationNo(t *testing.T) { - result, err := api.GetStoreInfoByStationNo2("11918839") + result, err := api.GetStoreInfoByStationNo2("12691999") if err != nil { t.Fatal(err) } diff --git a/platformapi/mtwmapi/im_test.go b/platformapi/mtwmapi/im_test.go index 6a623add..453bbb65 100644 --- a/platformapi/mtwmapi/im_test.go +++ b/platformapi/mtwmapi/im_test.go @@ -127,7 +127,7 @@ func TestAPI_GetPoiIMStatus(t *testing.T) { // ans += v + ":" + utils.Int2Str(retrieval.ImStatus) + "," //} //fmt.Println(ans) - retrieval, _ := api.GetPoiIMStatus("18003191") + retrieval, _ := api.GetPoiIMStatus("18008153") fmt.Println(retrieval) } diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 0b7c7c5b..79368a01 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -20,13 +20,13 @@ func init() { baseapi.Init(sugarLogger) // 菜市 - api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") + //api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") // 果园 //api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //商超 - //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qR5Et61N9S000vcr7q1PZQ") + api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_sinaAnZgfFZJkRIrdbJKBA") //cookieStr := ` // acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1; //` diff --git a/platformapi/pddapi/sku_test.go b/platformapi/pddapi/sku_test.go index a7c15944..a6224dcf 100644 --- a/platformapi/pddapi/sku_test.go +++ b/platformapi/pddapi/sku_test.go @@ -1,8 +1,10 @@ package pddapi import ( + "fmt" "git.rosy.net.cn/baseapi/utils" "testing" + "time" ) func TestGoodsCatsGet(t *testing.T) { @@ -39,3 +41,11 @@ func TestGoodsRecommendGet(t *testing.T) { } t.Log(utils.Format4Output(result, false)) } + +func TestName(t *testing.T) { + cc := time.Now().Add(-2 * time.Minute) + aa := cc.Sub(time.Now()).Seconds() + bb := time.Now().Sub(cc).Seconds() + fmt.Println(aa) + fmt.Println(bb) +} diff --git a/platformapi/pddapi/tcp_test.go b/platformapi/pddapi/tcp_test.go new file mode 100644 index 00000000..d0bb936b --- /dev/null +++ b/platformapi/pddapi/tcp_test.go @@ -0,0 +1,89 @@ +package pddapi + +import ( + "bufio" + "fmt" + "net" + "time" +) + +// 定义一个客户端结构体,保存每个客户端的信息 +type Client struct { + conn net.Conn + lastActive time.Time // 记录最后活跃时间,用于心跳检测 +} + +// 处理客户端消息的函数 +func (c *Client) handleConnection() { + defer c.conn.Close() + + reader := bufio.NewReader(c.conn) + for { + // 检查是否超时 + if time.Since(c.lastActive) > 30*time.Second { + fmt.Printf("Client %s timed out\n", c.conn.RemoteAddr()) + return + } + + message, err := reader.ReadString('\n') + if err != nil { + fmt.Printf("Error reading from %s: %v\n", c.conn.RemoteAddr(), err) + return + } + fmt.Printf("Received from %s: %s", c.conn.RemoteAddr(), message) + + // 更新最后活跃时间 + c.lastActive = time.Now() + + // 发送响应给客户端 + c.conn.Write([]byte("Message received\n")) + } +} + +// 心跳检测函数 +func (c *Client) heartbeat() { + ticker := time.NewTicker(10 * time.Second) + defer ticker.Stop() + for { + select { + case <-ticker.C: + // 发送心跳包 + _, err := c.conn.Write([]byte("heartbeat\n")) + if err != nil { + fmt.Printf("Error sending heartbeat to %s: %v\n", c.conn.RemoteAddr(), err) + return + } + // 更新最后活跃时间 + c.lastActive = time.Now() + } + } +} + +func main() { + listener, err := net.Listen("tcp", ":8080") + if err != nil { + fmt.Println("Error starting server:", err) + return + } + defer listener.Close() + fmt.Println("Server listening on :8080") + + for { + conn, err := listener.Accept() + if err != nil { + fmt.Println("Error accepting connection:", err) + continue + } + + client := &Client{ + conn: conn, + lastActive: time.Now(), + } + + // 启动一个新的goroutine处理每个连接 + go client.handleConnection() + + // 启动心跳检测goroutine + go client.heartbeat() + } +} diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index f38291ad..350aaa0c 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -8,13 +8,14 @@ import ( ) // 京西速食(蔬菜) -var token1 = `{"access_token":"97a511yhugi-1j7t4nq1hehos0000sn6spy","expires_in":1732606054,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市","refresh_token":"zuxb12yhugi-1j7t4nq1hehos0000sn6spy","authority_id":""}` +//var token1 = `{"access_token":"97a511yhugi-1j7t4nq1hehos0000sn6spy","expires_in":1732606054,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市","refresh_token":"zuxb12yhugi-1j7t4nq1hehos0000sn6spy","authority_id":""}` // 美好菜市 //var token1 = `{"access_token":"9a315a03-c737-4a82-ae52-c9a6ce827007","expires_in":1699490747,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"8334c006-5301-4d25-911b-4d8cc7b70ebb","authority_id":""}` -// 京西到家(商超) -//var token2 = `{"access_token":"7e3853fa-24d4-4649-938b-46947da04c92","expires_in":1698887957,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"1dd634e9-9f9e-459b-a770-341fb64e4f88","authority_id":""}` +// 京西到家 +var token1 = `{"access_token":"3d290106-d462-4201-80cc-b7b7aa823ae5","expires_in":1723882281,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"d5ae3365-18f6-4c5f-883f-968830ec7bed","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token1) // 查询售后单详情 diff --git a/platformapi/tiktok_shop/tiktok_api/store_test.go b/platformapi/tiktok_shop/tiktok_api/store_test.go index d8dedb9c..7e736e06 100644 --- a/platformapi/tiktok_shop/tiktok_api/store_test.go +++ b/platformapi/tiktok_shop/tiktok_api/store_test.go @@ -95,7 +95,7 @@ func TestGetStoreList2(t *testing.T) { //获取门店详细信息 func TestGetStoreDetail(t *testing.T) { data, err := a.GetStoreDetail(&shop_getStoreDetail_request.ShopGetStoreDetailParam{ - StoreId: "64250739", + StoreId: "199514645", }) fmt.Println(utils.Format4Output(data, false)) fmt.Println(err)