|
@@ -52,9 +52,9 @@ class QgSdkTests {
|
|
|
@Test
|
|
@Test
|
|
|
void profitSeparateList() throws Exception {
|
|
void profitSeparateList() throws Exception {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
- params.put("startTimestamp","20240701");
|
|
|
|
|
- params.put("endTimestamp", "20240717");
|
|
|
|
|
- //params.put("shopId","19031816333414");
|
|
|
|
|
|
|
+ params.put("startTimestamp","20240819");
|
|
|
|
|
+ params.put("endTimestamp", "20240819");
|
|
|
|
|
+ params.put("shopId","24071416503101");
|
|
|
Map<String, Object> extracted = extracted(params);
|
|
Map<String, Object> extracted = extracted(params);
|
|
|
// 遍历原始的Map,并将键和值作为Object类型添加到新的Map中
|
|
// 遍历原始的Map,并将键和值作为Object类型添加到新的Map中
|
|
|
params.forEach((key, value) -> System.out.println("Key = " + key + ", Value = " + value));
|
|
params.forEach((key, value) -> System.out.println("Key = " + key + ", Value = " + value));
|
|
@@ -71,8 +71,8 @@ class QgSdkTests {
|
|
|
void refundList() throws Exception {
|
|
void refundList() throws Exception {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("startTimestamp","1720563978000");
|
|
params.put("startTimestamp","1720563978000");
|
|
|
- params.put("endTimestamp", "1721174865743");
|
|
|
|
|
- params.put("shopId","24071617124901");
|
|
|
|
|
|
|
+ params.put("endTimestamp", "1721909568223");
|
|
|
|
|
+ params.put("shopId","24071416503101");
|
|
|
Map<String, Object> extracted = extracted(params);
|
|
Map<String, Object> extracted = extracted(params);
|
|
|
// 遍历原始的Map,并将键和值作为Object类型添加到新的Map中
|
|
// 遍历原始的Map,并将键和值作为Object类型添加到新的Map中
|
|
|
params.forEach((key, value) -> System.out.println("Key = " + key + ", Value = " + value));
|
|
params.forEach((key, value) -> System.out.println("Key = " + key + ", Value = " + value));
|
|
@@ -115,10 +115,10 @@ class QgSdkTests {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void test3333(){
|
|
void test3333(){
|
|
|
- BigDecimal number = new BigDecimal("13.00");
|
|
|
|
|
|
|
+ BigDecimal number = new BigDecimal("00");
|
|
|
BigDecimal stripped = number.stripTrailingZeros();
|
|
BigDecimal stripped = number.stripTrailingZeros();
|
|
|
|
|
|
|
|
- System.out.println(stripped);
|
|
|
|
|
|
|
+ System.out.println(number.multiply(new BigDecimal("999")));
|
|
|
// 假设我们期望原始数字是一个整数或者小数点后都是零
|
|
// 假设我们期望原始数字是一个整数或者小数点后都是零
|
|
|
if (stripped.compareTo(BigDecimal.valueOf(stripped.longValue())) == 0) {
|
|
if (stripped.compareTo(BigDecimal.valueOf(stripped.longValue())) == 0) {
|
|
|
System.out.println("The number has only zeros after the decimal point.");
|
|
System.out.println("The number has only zeros after the decimal point.");
|