| | |
| | | //package com.supersavedriving.driver; |
| | | // |
| | | //import com.supersavedriving.driver.modular.system.model.WeatherCity; |
| | | //import com.supersavedriving.driver.modular.system.service.IAccountChangeDetailService; |
| | | //import com.supersavedriving.driver.modular.system.service.IOrderService; |
| | | //import com.supersavedriving.driver.modular.system.service.IWeatherCityService; |
| | | //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 com.alibaba.fastjson.JSON; |
| | | // import com.alibaba.fastjson.JSONObject; |
| | | // import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | // import com.supersavedriving.driver.core.util.ToolUtil; |
| | | // import com.supersavedriving.driver.modular.system.model.*; |
| | | // import com.supersavedriving.driver.modular.system.service.*; |
| | | // import com.supersavedriving.driver.modular.system.service.impl.CashWithdrawalServiceImpl; |
| | | // import com.supersavedriving.driver.modular.system.service.impl.OrderServiceImpl; |
| | | // import com.supersavedriving.driver.modular.system.util.MallBook.model.*; |
| | | // import com.supersavedriving.driver.modular.system.util.MallBook.util.TrhRequest; |
| | | // import com.supersavedriving.driver.modular.system.util.RedisUtil; |
| | | // import com.supersavedriving.driver.modular.system.util.ResultUtil; |
| | | // import com.supersavedriving.driver.modular.system.util.UUIDUtil; |
| | | // 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.OrderPriceWarpper; |
| | | // 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.*; |
| | | // |
| | | // |
| | | //@RunWith(SpringRunner.class) |
| | |
| | | // @Autowired |
| | | // private IOrderService orderService; |
| | | // |
| | | // @Autowired |
| | | // private IDriverService driverService; |
| | | // |
| | | // @Autowired |
| | | // private IDriverBankService driverBankService; |
| | | // |
| | | // @Autowired |
| | | // private IAppUserService appUserService; |
| | | // |
| | | // @Autowired |
| | | // private ISystemConfigService systemConfigService; |
| | | // |
| | | // @Autowired |
| | | // private IAccountChangeDetailService accountChangeDetailService; |
| | | // |
| | | // @Autowired |
| | | // private IRevenueService revenueService; |
| | | // |
| | | // @Autowired |
| | | // private IRechargeRecordService rechargeRecordService; |
| | | // |
| | | // @Autowired |
| | | // private IAgentService agentService; |
| | | // |
| | | // @Autowired |
| | | // private IDivisionRecordService divisionRecordService; |
| | | // |
| | | // @Autowired |
| | | // private ICashWithdrawalService cashWithdrawalService; |
| | | // |
| | | // @Autowired |
| | | // private RedisUtil redisUtil; |
| | | // |
| | | // |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test() throws Exception { |
| | | // PerformanceSummaryWarpper performanceSummaryWarpper = orderService.queryPerformanceSummary(1, 1, "2023年", 3); |
| | | //// Withdraw withdraw = new Withdraw(); |
| | | //// withdraw.setUserId("79796121680"); |
| | | //// withdraw.setAmount(String.valueOf(Double.valueOf(54.48 * 100).intValue())); |
| | | //// withdraw.setOrderName("账户余额提现"); |
| | | //// withdraw.setRemark("账户余额提现"); |
| | | //// withdraw.setNotifyUrl("https://chaoshengdaijia.com:443/driver/base/driver/withdrawCashCallback"); |
| | | //// withdraw.setParameter1("1"); |
| | | //// TrhRequest<Withdraw> request1 = new TrhRequest(); |
| | | //// InterfaceResponse execute = request1.execute(withdraw, Withdraw.SERVICE_CODE);//结算(提现) |
| | | //// if("0000".equals(execute.getCode())){ |
| | | //// JSONObject jsonObject1 = JSON.parseObject(execute.getResult()); |
| | | //// String merOrderId1 = jsonObject1.getString("merOrderId"); |
| | | //// Integer status = jsonObject1.getInteger("status");//0:待处理;1:成功;2:失败 |
| | | //// if(1 == status){ |
| | | //// } |
| | | //// if(2 == status){ |
| | | //// System.err.println("结算接口异常【提现】:" + jsonObject1.getString("statusMsg")); |
| | | //// } |
| | | //// }else{ |
| | | //// System.err.println("结算接口异常【提现】:" + execute.getMsg()); |
| | | //// } |
| | | // |
| | | // |
| | | // |
| | | //// QueryUser queryUser = new QueryUser(); |
| | | //// /** |
| | | //// * 业务系统会员ID(必填) 字段长度最长:32位 |
| | | //// */ |
| | | //// queryUser.setMerUserId("driver_13"); |
| | | //// TrhRequest<QueryUser> request = new TrhRequest(); |
| | | //// InterfaceResponse execute = request.execute(queryUser, QueryUser.SERVICE_CODE); |
| | | //// if("0000".equals(execute.getCode())){ |
| | | //// JSONObject jsonObject1 = JSON.parseObject(execute.getResult()); |
| | | //// String merOrderId1 = jsonObject1.getString("merOrderId"); |
| | | //// Integer status = jsonObject1.getInteger("status");//0:待处理;1:成功;2:失败 |
| | | //// if(1 == status){ |
| | | //// } |
| | | //// if(2 == status){ |
| | | //// System.err.println("结算接口异常【提现】:" + jsonObject1.getString("statusMsg")); |
| | | //// } |
| | | //// }else{ |
| | | //// System.err.println("结算接口异常【提现】:" + execute.getMsg()); |
| | | //// } |
| | | // |
| | | // |
| | | // for (int i = 0; i < 2; i++) { |
| | | // String value = redisUtil.getValue("repeat_" + 10); |
| | | // if(ToolUtil.isEmpty(value)){ |
| | | // redisUtil.setStrValue("repeat_" + 10, System.currentTimeMillis() + "", 600);//10分钟 |
| | | // }else{ |
| | | // Long s = System.currentTimeMillis() - Long.valueOf(value); |
| | | // if(s.compareTo(60000L) < 0){//1分钟 |
| | | // System.err.println("数据处理中"); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | //} |