| | |
| | | //package com.stylefeng.guns; |
| | | // |
| | | //import com.alibaba.fastjson.JSON; |
| | | //import com.stylefeng.guns.core.util.ToolUtil; |
| | | //import com.stylefeng.guns.modular.shunfeng.model.DriverRide; |
| | | //import com.stylefeng.guns.modular.shunfeng.model.Evaluate; |
| | | //import com.stylefeng.guns.modular.shunfeng.model.OrderRide; |
| | | //import com.stylefeng.guns.modular.shunfeng.service.IDriverRideService; |
| | | //import com.stylefeng.guns.modular.shunfeng.service.IEvaluateService; |
| | | //import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService; |
| | | //import com.stylefeng.guns.modular.shunfeng.util.SensitiveWordUtil; |
| | | //import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | //import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | //import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | //import com.stylefeng.guns.modular.system.model.Company; |
| | | //import com.stylefeng.guns.modular.system.model.Driver; |
| | | //import com.stylefeng.guns.modular.system.model.SensitiveWords; |
| | | //import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | //import com.stylefeng.guns.modular.system.service.ICompanyService; |
| | | //import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | //import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | //import com.stylefeng.guns.modular.system.util.EmailUtil; |
| | | //import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | //import com.stylefeng.guns.modular.system.util.qianyuntong.AESUtils; |
| | | //import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; |
| | | //import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil; |
| | | //import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | //import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //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 javax.annotation.Resource; |
| | | //import javax.mail.MessagingException; |
| | | //import java.io.UnsupportedEncodingException; |
| | | //import java.math.BigDecimal; |
| | | //import java.util.Date; |
| | | //import java.util.HashSet; |
| | | //import java.util.List; |
| | | //import java.util.Set; |
| | | // |
| | | ///** |
| | | // * SpringBoot方式启动类 |
| | | // * |
| | | // * @author stylefeng |
| | | // * @Date 2017/5/21 12:06 |
| | | // */ |
| | | //@Slf4j |
| | | //@RunWith(SpringRunner.class) |
| | | //@SpringBootTest |
| | | //public class GunsApplicationTest { |
| | | // |
| | | // @Autowired |
| | | // private IOrderPrivateCarService orderPrivateCarService; |
| | | // |
| | | // @Autowired |
| | | // private IUserInfoService userInfoService; |
| | | // |
| | | // @Autowired |
| | | // private IDriverService driverService; |
| | | // @Autowired |
| | | // private ICompanyService companyService; |
| | | // @Autowired |
| | | // private IPaymentRecordService paymentRecordService; |
| | | // @Autowired |
| | | // private EmailUtil emailUtil; |
| | | // /*顺风车司机*/ |
| | | // @Autowired |
| | | // private IDriverRideService driverRideService; |
| | | // |
| | | // @Resource |
| | | // private SensitiveWordsMapper sensitiveWordsMapper; |
| | | // /*评价*/ |
| | | // @Autowired |
| | | // private IEvaluateService evaluateService; |
| | | // /*顺风车订单*/ |
| | | // @Autowired |
| | | // private IOrderRideService orderRideService; |
| | | // |
| | | // |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test(){ |
| | | // RegisterViaMobileRequest request = new RegisterViaMobileRequest(); |
| | | // request.setMobile("15828353222"); |
| | | // request.setEncryptType("aesbase64"); |
| | | // request.setPassword(AESUtils.encryptBase64("123456")); |
| | | // request.setNickname("测试"); |
| | | //// request.setVerify_code(code); |
| | | //// request.setVerify_code_type("0"); |
| | | // RegisterViaMobile register = UserUtil.registerViaMobile(request); |
| | | // System.err.println(register); |
| | | // } |
| | | //} |
| | | package com.stylefeng.guns; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.itextpdf.text.DocumentException; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.shunfeng.model.DriverRide; |
| | | import com.stylefeng.guns.modular.shunfeng.model.Evaluate; |
| | | import com.stylefeng.guns.modular.shunfeng.model.OrderRide; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IDriverRideService; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IEvaluateService; |
| | | import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService; |
| | | import com.stylefeng.guns.modular.shunfeng.util.SensitiveWordUtil; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.Driver; |
| | | import com.stylefeng.guns.modular.system.model.SensitiveWords; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.model.vo.TripOrderVo; |
| | | import com.stylefeng.guns.modular.system.pdf.TripSheetGenerator; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.EmailUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.AESUtils; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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 javax.annotation.Resource; |
| | | import javax.mail.MessagingException; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * SpringBoot方式启动类 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/21 12:06 |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest |
| | | public class GunsApplicationTest { |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | @Autowired |
| | | private IUserInfoService userInfoService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | @Autowired |
| | | private ICompanyService companyService; |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private EmailUtil emailUtil; |
| | | /*顺风车司机*/ |
| | | @Autowired |
| | | private IDriverRideService driverRideService; |
| | | |
| | | @Resource |
| | | private SensitiveWordsMapper sensitiveWordsMapper; |
| | | /*评价*/ |
| | | @Autowired |
| | | private IEvaluateService evaluateService; |
| | | /*顺风车订单*/ |
| | | @Autowired |
| | | private TripSheetGenerator tripSheetGenerator; |
| | | |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void test(){ |
| | | List<TripOrderVo> tripOrderVos = new ArrayList<>(); |
| | | TripOrderVo tripOrderVo = new TripOrderVo(); |
| | | tripOrderVo.setOrderId(1); |
| | | tripOrderVo.setOrderTime("2026-01-07 12:00:01"); |
| | | tripOrderVo.setStartAddress("测试地址1"); |
| | | tripOrderVo.setEndAddress("测试地址2"); |
| | | tripOrderVo.setCompanyName("fuwushang"); |
| | | tripOrderVo.setCity("成都市"); |
| | | tripOrderVo.setBoardingTime(new Date()); |
| | | tripOrderVo.setPayMoney(10D); |
| | | tripOrderVo.setServerCarModel("网约车"); |
| | | tripOrderVos.add(tripOrderVo); |
| | | tripOrderVo = new TripOrderVo(); |
| | | tripOrderVo.setOrderId(1); |
| | | tripOrderVo.setOrderTime("2026-01-07 12:00:01"); |
| | | tripOrderVo.setStartAddress("测试地址1"); |
| | | tripOrderVo.setEndAddress("测试地址2"); |
| | | tripOrderVo.setCompanyName("fuwushang"); |
| | | tripOrderVo.setCity("成都市"); |
| | | tripOrderVo.setBoardingTime(new Date()); |
| | | tripOrderVo.setPayMoney(10D); |
| | | tripOrderVo.setServerCarModel("网约车"); |
| | | tripOrderVos.add(tripOrderVo); |
| | | try { |
| | | String filePath = tripSheetGenerator.generatePdf(tripOrderVos); |
| | | } catch (DocumentException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |