From 7a9e05846c5e37f7278f242857056d0623532379 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 16 六月 2023 20:17:32 +0800
Subject: [PATCH] 修改bug和功能优化
---
driver/guns-admin/src/test/java/com/supersavedriving/driver/GunsApplicationTest.java | 122 ++++++++++++++++++++++------------------
1 files changed, 66 insertions(+), 56 deletions(-)
diff --git a/driver/guns-admin/src/test/java/com/supersavedriving/driver/GunsApplicationTest.java b/driver/guns-admin/src/test/java/com/supersavedriving/driver/GunsApplicationTest.java
index 5cd2811..bc86d94 100644
--- a/driver/guns-admin/src/test/java/com/supersavedriving/driver/GunsApplicationTest.java
+++ b/driver/guns-admin/src/test/java/com/supersavedriving/driver/GunsApplicationTest.java
@@ -1,56 +1,66 @@
-package com.supersavedriving.driver;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.supersavedriving.driver.modular.system.model.DriverBank;
-import com.supersavedriving.driver.modular.system.model.WeatherCity;
-import com.supersavedriving.driver.modular.system.service.*;
-import com.supersavedriving.driver.modular.system.util.ResultUtil;
-import com.supersavedriving.driver.modular.system.util.juhe.WeatherCityInfo;
-import com.supersavedriving.driver.modular.system.util.juhe.WeatherUtil;
-import com.supersavedriving.driver.modular.system.warpper.PerformanceSummaryWarpper;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class GunsApplicationTest {
-
- @Autowired
- private IOrderService orderService;
-
- @Autowired
- private IDriverService driverService;
-
- @Autowired
- private IDriverBankService driverBankService;
-
-
- @Test
- public void test() throws Exception {
-// ResultUtil resultUtil = driverService.microenterprise(1, "蒲芝兵", "510823198911154858"
-// , "15828353127", "https://10pz685243.zicp.fun/supersavedriving/base/driver/microenterpriseCallback");
-// System.err.println(JSON.toJSONString(resultUtil));
-
-
-// DriverBank driverId = driverBankService.selectOne(new EntityWrapper<DriverBank>().eq("driverId", 1));
-// System.err.println(JSON.toJSONString(driverId));
-
-
-// ResultUtil resultUtil = driverBankService.addDriverBank(1, "蒲芝兵", "15828353127"
-// , "510823198911154858", "6212264402094114687");
-// System.err.println(JSON.toJSONString(resultUtil));
-
-
-// ResultUtil resultUtil1 = driverBankService.delDriverBank(1, 1);
-// System.err.println(JSON.toJSONString(resultUtil1));
-
- ResultUtil resultUtil = driverService.balanceRecharge(1, 1D);
- System.err.println(JSON.toJSONString(resultUtil));
- }
-}
+//package com.supersavedriving.driver;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.baomidou.mybatisplus.mapper.EntityWrapper;
+//import com.supersavedriving.driver.modular.system.model.DriverBank;
+//import com.supersavedriving.driver.modular.system.model.Order;
+//import com.supersavedriving.driver.modular.system.model.WeatherCity;
+//import com.supersavedriving.driver.modular.system.service.*;
+//import com.supersavedriving.driver.modular.system.util.ResultUtil;
+//import com.supersavedriving.driver.modular.system.util.juhe.WeatherCityInfo;
+//import com.supersavedriving.driver.modular.system.util.juhe.WeatherUtil;
+//import com.supersavedriving.driver.modular.system.warpper.PerformanceSummaryWarpper;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.springframework.beans.BeanUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//import org.springframework.test.context.junit4.SpringRunner;
+//
+//import java.text.SimpleDateFormat;
+//import java.util.Calendar;
+//import java.util.Date;
+//
+//
+//@RunWith(SpringRunner.class)
+//@SpringBootTest
+//public class GunsApplicationTest {
+//
+// @Autowired
+// private IOrderService orderService;
+//
+// @Autowired
+// private IDriverService driverService;
+//
+// @Autowired
+// private IDriverBankService driverBankService;
+//
+//
+// @Test
+// public void test() throws Exception {
+// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+// Date date = sdf.parse("2023-06-15 01:00:00");
+// Integer hour1 = 22;
+// Integer hour2 = 6;
+//
+// Calendar s = Calendar.getInstance();
+// s.setTime(date);
+// s.set(Calendar.HOUR_OF_DAY, hour1);
+// s.set(Calendar.SECOND, 0);
+//
+// Calendar e = Calendar.getInstance();
+// e.setTime(date);
+// e.set(Calendar.HOUR_OF_DAY, hour2);
+// e.set(Calendar.SECOND, 0);
+//
+// if(hour1 > hour2){
+// if(s.getTimeInMillis() > date.getTime()){
+// s.set(Calendar.DAY_OF_YEAR, s.get(Calendar.DAY_OF_YEAR) - 1);
+// }else{
+// e.set(Calendar.DAY_OF_YEAR, e.get(Calendar.DAY_OF_YEAR) + 1);
+// }
+// }
+// System.err.println(sdf.format(s.getTime()));
+// System.err.println(sdf.format(e.getTime()));
+// }
+//}
--
Gitblit v1.7.1