| | |
| | | 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)); |
| | | } |
| | | } |
| | | //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())); |
| | | // } |
| | | //} |