| | |
| | | <name>eureka</name> |
| | | <description>Eureka project for Spring Boot</description> |
| | | |
| | | <packaging>war</packaging> |
| | | <packaging>jar</packaging> |
| | | |
| | | <properties> |
| | | <java.version>1.8</java.version> |
| | |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-tomcat</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>javax.servlet</groupId> |
| | | <artifactId>javax.servlet-api</artifactId> |
| | | <version>3.1.0</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-starter-tomcat</artifactId>--> |
| | | <!-- <scope>provided</scope>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>javax.servlet</groupId>--> |
| | | <!-- <artifactId>javax.servlet-api</artifactId>--> |
| | | <!-- <version>3.1.0</version>--> |
| | | <!-- <scope>provided</scope>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | |
| | | @EnableEurekaServer//开启服务治理 |
| | | @SpringBootApplication |
| | | public class EurekaApplication extends SpringBootServletInitializer { |
| | | public class EurekaApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(EurekaApplication.class, args); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | return builder.sources(EurekaApplication.class); |
| | | } |
| | | } |
| | |
| | | <artifactId>google-cloud-texttospeech</artifactId> |
| | | <version>2.46.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.cloud</groupId> |
| | | <artifactId>google-cloud-storage</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | | |
| | | <dependencyManagement> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.google.cloud</groupId> |
| | | <artifactId>libraries-bom</artifactId> |
| | | <version>26.45.0</version> |
| | | <type>pom</type> |
| | | <scope>import</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | </dependencyManagement> |
| | | |
| | | <build> |
| | | <plugins> |
| | |
| | | } |
| | | |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/reportLossResult_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/reportLossResult_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/reportLossResult_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/reportLossResult_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(userInfo.getId()); |
| | |
| | | english_remark.text("NB! Coupon is valid only for the trip fare not less than GHS " + fullMoney + " per ride."); |
| | | EmailUtil.send(userInfo1.getEmail(), "Coupon is in", document1.html()); |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/coupon_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/coupon_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/coupon_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/coupon_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(userInfo1.getId()); |
| | |
| | | } |
| | | |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/complaintResult_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/complaintResult_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/complaintResult_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/complaintResult_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(tUser.getId()); |
| | |
| | | } |
| | | |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/feedbackResult_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/feedbackResult_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/feedbackResult_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/feedbackResult_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(userInfo.getId()); |
| | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.util.GoogleCloudStorageUtil; |
| | | import com.stylefeng.guns.modular.system.util.OBSUploadUtil; |
| | | import com.stylefeng.guns.modular.system.util.OssUploadUtil; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @RequestMapping("/saveApk") |
| | | public Map<String, Object> saveApk(@RequestPart("myfile") MultipartFile myfile, HttpServletRequest request){ |
| | | Map<String, Object> m = new HashMap<>(); |
| | | /*try { |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(file.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath()+"apk\\"; |
| | | file.transferTo(new File(fileSavePath + pictureName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | m.put("imgUrl", gunsProperties.getPictureServerAddress()+"apk/"+pictureName); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | }*/ |
| | | try { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) myfile; |
| | | |
| | | String pictureName = OBSUploadUtil.inputStreamUpload(file); |
| | | String pictureName = GoogleCloudStorageUtil.upload(myfile); |
| | | m.put("imgUrl", pictureName); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | EmailUtil.send(email, language == 1 ? "积分兑换已通过审核" : language == 2 ? "Points redemption approved" : "Approbation de l’échange de points", document.html()); |
| | | |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/complaint_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/complaint_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/complaint_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/complaint_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(tUser.getId()); |
| | |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | @Controller |
| | | @RequestMapping("/tOrderPrivateCar") |
| | | public class TOrderPrivateCarController extends BaseController { |
| | | |
| | | Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | private String PREFIX = "/system/tOrderPrivateCar/"; |
| | | |
| | |
| | | orderPrivateCar.setOrderMoney(money); |
| | | orderPrivateCar.setPayMoney(money); |
| | | orderPrivateCar.setState(7); |
| | | orderPrivateCar.setIsDispute(3); |
| | | orderPrivateCar.setIsDispute(1); |
| | | orderPrivateCar.updateById(); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | public Object frozenOrder(@RequestParam Integer tOrderPrivateCarId) throws Exception { |
| | | TOrderPrivateCar orderPrivateCar = tOrderPrivateCarService.selectById(tOrderPrivateCarId); |
| | | |
| | | //添加已收入明细 |
| | | TDriver tDriver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | if(orderPrivateCar.getIsFrozen() == 1 && orderPrivateCar.getState() < 7){ |
| | | if(orderPrivateCar.getArriveTime()==null){ |
| | | orderPrivateCar.setArriveTime(orderPrivateCar.getStartServiceTime()); |
| | | } |
| | | orderPrivateCar = this.setMoney(orderPrivateCar, 0D, 0D);//计算费用 |
| | | |
| | | //添加已收入明细 |
| | | TCompany company = companyService.selectById(orderPrivateCar.getCompanyId()); |
| | | Double taxi = company.getSpeMoney().doubleValue(); |
| | | Integer language =tDriver.getLanguage(); |
| | | BigDecimal d = null;//企业收入 |
| | | BigDecimal c = null;//司机收入 |
| | | if(company.getIsSpeFixedOrProportional() == 2){//固定 |
| | | d = new BigDecimal(taxi); |
| | | c = orderPrivateCar.getOrderMoney().subtract(d).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | } |
| | | if(company.getIsSpeFixedOrProportional() == 1){//比例 |
| | | Double price = orderPrivateCar.getStartMoney().doubleValue() + orderPrivateCar.getMileageMoney().doubleValue() + orderPrivateCar.getWaitMoney().doubleValue()+ orderPrivateCar.getDurationMoney().doubleValue() + orderPrivateCar.getLongDistanceMoney().doubleValue(); |
| | | d = new BigDecimal(price).multiply(new BigDecimal(taxi).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | c = orderPrivateCar.getOrderMoney().subtract(d).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | } |
| | | if(orderPrivateCar.getIsFrozen()==1){ |
| | | TDriver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).subtract(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).subtract(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setBalance((null != driver.getBalance() ? driver.getBalance() : BigDecimal.ZERO).subtract(c).setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | driver.setFrozenMoney(driver.getFrozenMoney().add(c)); |
| | | driverService.updateById(driver); |
| | | }else{ |
| | | TDriver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setBalance((null != driver.getBalance() ? driver.getBalance() : BigDecimal.ZERO).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | driver.setFrozenMoney(driver.getFrozenMoney().subtract(c)); |
| | | driverService.updateById(driver); |
| | | } |
| | | if (orderPrivateCar.getIsFrozen() == 1){ |
| | | TOrderPrivateCar orderPrivateCar1 = tOrderPrivateCarService.selectById(tOrderPrivateCarId); |
| | | if(orderPrivateCar1.getArriveTime()==null){ |
| | | orderPrivateCar1.setArriveTime(orderPrivateCar1.getStartServiceTime()); |
| | | } |
| | | orderPrivateCar1 = this.setMoney(orderPrivateCar1, 0D, 0D);//计算费用 |
| | | |
| | | orderPrivateCar1.setOrderMoney(orderPrivateCar1.getOrderMoney().add(orderPrivateCar1.getParkMoney()).add(orderPrivateCar1.getRoadTollMoney())); |
| | | orderPrivateCar.setPayManner(1); |
| | | orderPrivateCar.setParkMoney(new BigDecimal(0)); |
| | | orderPrivateCar.setRoadTollMoney(new BigDecimal(0)); |
| | | //判断是否首单免费-免费直接完成 |
| | | Integer orderNumber = tOrderPrivateCarService.selectCount(new EntityWrapper<TOrderPrivateCar>().eq("userId",orderPrivateCar1.getUserId()).last("and (state=8 or state=9)")); |
| | | Integer orderNumber = tOrderPrivateCarService.selectCount(new EntityWrapper<TOrderPrivateCar>().eq("userId",orderPrivateCar.getUserId()).last("and (state=8 or state=9)")); |
| | | |
| | | if(orderNumber<=0){//判断是否是首单 |
| | | //判断是否免单 |
| | | TUser userInfo = userService.selectById(orderPrivateCar1.getUserId()); |
| | | TUser userInfo = userService.selectById(orderPrivateCar.getUserId()); |
| | | if(userInfo.getFreeMoney().doubleValue()>0d){ |
| | | if(orderPrivateCar1.getOrderMoney().compareTo(userInfo.getFreeMoney())<=-1){ |
| | | orderPrivateCar1.setState(8); |
| | | orderPrivateCar1.setIsFree(2); |
| | | if(orderPrivateCar.getOrderMoney().compareTo(userInfo.getFreeMoney())<=0){ |
| | | orderPrivateCar.setState(8); |
| | | orderPrivateCar.setIsFree(2); |
| | | //添加已收入明细 |
| | | TCompany tCompany = companyService.selectById(orderPrivateCar1.getCompanyId()); |
| | | BigDecimal speMoney = tCompany.getSpeMoney(); |
| | | |
| | | if(tCompany.getIsSpeFixedOrProportional() == 2){//固定 |
| | | d = speMoney; |
| | | c = orderPrivateCar1.getOrderMoney().subtract(d);//只有出行金额参与抽成,其余归属司机 |
| | | TCompany company = companyService.selectById(orderPrivateCar.getCompanyId()); |
| | | Double speMoney = company.getSpeMoney().doubleValue(); |
| | | BigDecimal d = null;//企业收入 |
| | | BigDecimal c = null;//司机收入 |
| | | if(company.getIsSpeFixedOrProportional() == 2){//固定 |
| | | d = new BigDecimal(speMoney); |
| | | c = orderPrivateCar.getOrderMoney().subtract(d);//只有出行金额参与抽成,其余归属司机 |
| | | } |
| | | if(tCompany.getIsSpeFixedOrProportional() == 1){//比例 |
| | | BigDecimal price = orderPrivateCar1.getStartMoney().add(orderPrivateCar1.getMileageMoney()).add(new BigDecimal(orderPrivateCar1.getWaitMoney())).add(orderPrivateCar1.getDurationMoney()).add(orderPrivateCar1.getLongDistanceMoney()); |
| | | d = price.multiply(speMoney).divide(new BigDecimal(100), new MathContext(2, RoundingMode.HALF_EVEN)); |
| | | c = orderPrivateCar1.getOrderMoney().subtract(d).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | if(company.getIsSpeFixedOrProportional() == 1){//比例 |
| | | Double price = orderPrivateCar.getStartMoney().add(orderPrivateCar.getMileageMoney()).add(new BigDecimal(orderPrivateCar.getWaitMoney())).add(orderPrivateCar.getDurationMoney()).add(orderPrivateCar.getLongDistanceMoney()).doubleValue(); |
| | | d = new BigDecimal(price).multiply(new BigDecimal(speMoney).divide(new BigDecimal(100), new MathContext(2, RoundingMode.HALF_EVEN))); |
| | | c = orderPrivateCar.getOrderMoney().subtract(d).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | } |
| | | incomeService.saveData(1, orderPrivateCar1.getCompanyId(), 2, orderPrivateCar1.getId(), 1, d.doubleValue()); |
| | | incomeService.saveData(2, orderPrivateCar1.getDriverId(), 2, orderPrivateCar1.getId(), 1, c.doubleValue()); |
| | | TDriver driver = driverService.selectById(orderPrivateCar1.getDriverId()); |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 2, orderPrivateCar.getId(), 1, d.doubleValue()); |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, c.doubleValue()); |
| | | TDriver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | if (null != driver.getBalance()){ |
| | | driver.setBalance(driver.getBalance().add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | }else{ |
| | | driver.setBalance(BigDecimal.ZERO.add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | } |
| | | driver.setBalance((null != driver.getBalance() ? driver.getBalance() : new BigDecimal("0")).add(c).setScale(2, BigDecimal.ROUND_HALF_EVEN)); |
| | | driverService.updateById(driver); |
| | | }else{ |
| | | orderPrivateCar1.setState(7); |
| | | orderPrivateCar1.setOrderMoney(orderPrivateCar1.getOrderMoney().subtract(userInfo.getFreeMoney())); |
| | | orderPrivateCar1.setFreeMoney(userInfo.getFreeMoney()); |
| | | orderPrivateCar.setState(7); |
| | | orderPrivateCar.setOrderMoney(orderPrivateCar.getOrderMoney().subtract(userInfo.getFreeMoney())); |
| | | orderPrivateCar.setFreeMoney(userInfo.getFreeMoney()); |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | orderPrivateCar1.setState(7); |
| | | orderPrivateCar.setState(7); |
| | | } |
| | | |
| | | }else{ |
| | | orderPrivateCar1.setState(7); |
| | | orderPrivateCar.setState(7); |
| | | } |
| | | |
| | | // Map<String, String> map = chinaMobileUtil.midAxbUnBindSend(orderPrivateCar1.getBindId(),orderPrivateCar1.getTelX()); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderPrivateCar1.setTelX(""); |
| | | // orderPrivateCar1.setBindId(""); |
| | | // } |
| | | tOrderPrivateCarService.updateById(orderPrivateCar1); |
| | | tOrderPrivateCarService.updateById(orderPrivateCar); |
| | | |
| | | |
| | | pushUtil.removeTask(orderPrivateCar1.getId(), 1);//删除定时任务,结束推送数据 |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "司机已结束本次行程,谢谢使用" : language == 2 ? |
| | | "The driver has finished the trip,thank you for using I-GO" : "Le chauffeur a terminé le trajet, merci d'utiliser I-GO", orderPrivateCar1.getUserId()); |
| | | TUser userInfo = userService.selectById(orderPrivateCar.getUserId()); |
| | | Integer language1 = userInfo.getLanguage(); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "司机已结束本次行程,谢谢使用" : language1 == 2 ? |
| | | "The driver has finished the trip,thank you for using I-GO" : "Le chauffeur a terminé le trajet, merci d'utiliser I-GO", orderPrivateCar.getUserId()); |
| | | |
| | | //回滚司机状态为空闲 |
| | | TDriver driver = driverService.selectById(orderPrivateCar1.getDriverId()); |
| | | TDriver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setState(2); |
| | | driverService.updateById(driver); |
| | | |
| | | TOrderPrivateCar finalOrderTaxi = orderPrivateCar1; |
| | | TOrderPrivateCar finalOrderTaxi = orderPrivateCar; |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | |
| | | } |
| | | }).start(); |
| | | |
| | | TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar1; |
| | | TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar; |
| | | new Thread(()->{ |
| | | try { |
| | | //上报google |
| | | fleetEngineUtil.reportBillableEvent(finalOrderPrivateCar.getTripId()); |
| | | System.err.println("上报时间:{},tripid:{},created_at:{},completed_at:{}"+ System.currentTimeMillis()+ finalOrderPrivateCar.getTripId()+ |
| | | finalOrderPrivateCar.getInsertTime().getTime()+finalOrderPrivateCar.getEndServiceTime().getTime()); |
| | | log.warn("上报时间:{},tripid:{},created_at:{},completed_at:{}", System.currentTimeMillis(), finalOrderPrivateCar.getTripId(), |
| | | finalOrderPrivateCar.getInsertTime().getTime(), finalOrderPrivateCar.getEndServiceTime().getTime()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | }).start(); |
| | | // 冻结订单需要给司机推送一个消息; |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | pushUtil.frozenOrder(finalOrderPrivateCar.getDriverId(),2); |
| | | pushUtil.pushOrderState(2, finalOrderPrivateCar.getDriverId(), finalOrderPrivateCar.getId(), 1, 7, 0, ""); |
| | | } |
| | | }).start(); |
| | | } |
| | | orderPrivateCar.setIsFrozen(orderPrivateCar.getIsFrozen()==1?2:1); |
| | | tOrderPrivateCarService.updateAllColumnById(orderPrivateCar); |
| | | |
| | | pushUtil.frozenOrder(orderPrivateCar.getDriverId(), 2); |
| | | } |
| | | |
| | | orderPrivateCar.setIsFrozen(orderPrivateCar.getIsFrozen()==1?2:1); |
| | | orderPrivateCar.setIsDispute(1); |
| | | tOrderPrivateCarService.updateById(orderPrivateCar); |
| | | return SUCCESS_TIP; |
| | | } |
| | | @Autowired |
| | |
| | | OrderCancel orderCancel = new OrderCancel(); |
| | | orderCancel.setOrderId(tOrderPrivateCarId); |
| | | orderCancel.setOrderType(1); |
| | | orderCancel.setReason(language == 1 ? "平台取消订单" : language == 2 ? "The platform cancelled the order" : "La plateforme a annulé la commande"); |
| | | orderCancel.setRemark(language == 1 ? "平台取消订单" : language == 2 ? "The platform cancelled the order" : "La plateforme a annulé la commande"); |
| | | orderCancel.setReason("The platform cancelled the order"); |
| | | orderCancel.setRemark("The platform cancelled the order"); |
| | | orderCancel.setUserType(2); |
| | | orderCancel.setState(2); |
| | | orderCancel.setInsertTime(new Date()); |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.stylefeng.guns.modular.system.util.GoogleCloudStorageUtil; |
| | | import com.stylefeng.guns.modular.system.util.OBSUploadUtil; |
| | | import com.stylefeng.guns.modular.system.util.OssUploadUtil ; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | String pictureName = ""; |
| | | try { |
| | | //文件上传,具体根据实际替换 |
| | | pictureName = OBSUploadUtil.inputStreamUpload(picture); |
| | | pictureName = GoogleCloudStorageUtil.upload(picture); |
| | | |
| | | String result = "{'original': '" + picture.getOriginalFilename() + "', 'state': 'SUCCESS', 'url': '" + pictureName + "'}"; |
| | | if (callback == null) { |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | |
| | | |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println("后台 冻结订单 向司机端推送消息"+jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", id.toString()); |
| | | params.add("type", type.toString()); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | params.add("id", String.valueOf(uid)); |
| | | params.add("type", String.valueOf(type)); |
| | | HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); |
| | | String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class); |
| | | String s = internalRestTemplate.postForObject(PushURL.zull_user_url + "/netty/sendMsgToClient",requestEntity , String.class); |
| | | JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); |
| | | if(jsonObject1.getIntValue("code") != 200){ |
| | | System.err.println(jsonObject1.getString("msg")); |
| | |
| | | ByteString audioContents = response.getAudioContent(); |
| | | |
| | | // Write the response to the output file. |
| | | try (OutputStream out = new FileOutputStream("/usr/local/nginx/html/files/audio/" + fileName)) { |
| | | try (OutputStream out = new FileOutputStream("/home/igotechgh/nginx/html/files/audio/" + fileName)) { |
| | | out.write(audioContents.toByteArray()); |
| | | return "http://182.160.16.251:81/files/audio/" + fileName; |
| | | return "https://igo.i-go.group/files/audio/" + fileName; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.util.ObsUploadUtil; |
| | | import com.stylefeng.guns.modular.system.util.GoogleCloudStorageUtil; |
| | | import com.stylefeng.guns.modular.system.util.OBSUploadUtil; |
| | | import com.stylefeng.guns.modular.system.util.OssUploadUtil; |
| | | import org.slf4j.Logger; |
| | |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | if (file.getSize() != 0) { |
| | | ossUpload = OBSUploadUtil.inputStreamUpload(file); |
| | | ossUpload = GoogleCloudStorageUtil.upload(file); |
| | | // ossUpload = ObsUploadUtil.obsUpload(super.getHttpServletRequest(), file); |
| | | m.put("imgUrl", ossUpload); |
| | | } |
| | |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) picture; |
| | | |
| | | String pictureName = OBSUploadUtil.inputStreamUpload(file); |
| | | String pictureName = GoogleCloudStorageUtil.upload(file); |
| | | // String pictureName = ObsUploadUtil.obsUpload(super.getHttpServletRequest(), picture); |
| | | return pictureName; |
| | | } catch (IOException e1) { |
| | | } catch (Exception e1) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | // 文件全路径 |
| | | //pictureName = gunsProperties.getPictureServerAddress() + pictureName; |
| | | // pictureName = ObsUploadUtil.obsUpload(super.getHttpServletRequest(), picture); |
| | | pictureName = OBSUploadUtil.inputStreamUpload(picture); |
| | | pictureName = GoogleCloudStorageUtil.upload(picture); |
| | | |
| | | String result = "{'original': '" + picture.getOriginalFilename() + "', 'state': 'SUCCESS', 'url': '" + pictureName + "'}"; |
| | | if (callback == null) { |
| | |
| | | <select id="getLineList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT model.modelStr,IFNULL(ls.num,0) as shiftNum,su.`name` as insertUser,IFNULL(lc.num,0) as companyNum,ll.* FROM t_line as ll |
| | | LEFT JOIN ( |
| | | SELECT GROUP_CONCAT(sc.`name` SEPARATOR '、') as modelStr,lp.lineId FROM t_line_price as lp |
| | | SELECT GROUP_CONCAT(sc.chineseName SEPARATOR '、') as modelStr,lp.lineId FROM t_line_price as lp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = lp.serverCarModelId |
| | | where sc.type = 2 and lp.state != 3 GROUP BY lp.lineId) as model on model.lineId = ll.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,lineId FROM t_line_shift where state != 3 GROUP BY lineId) as ls on ls.lineId = ll.id |
| | |
| | | |
| | | <!--根据线路ID查询线路价格--> |
| | | <select id="getLinePriceList" resultType="java.util.Map"> |
| | | SELECT sc.`name`,lp.* FROM t_line_price as lp |
| | | SELECT sc.chineseName as `name`,lp.* FROM t_line_price as lp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = lp.serverCarModelId |
| | | where lp.lineId = #{lineId} and lp.state != 3 |
| | | </select> |
| | |
| | | <select id="getCrossCityOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM ( |
| | | SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, ' ', di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | sc.`name` as serverCarModel,ll.`name` as lineName,ot.* FROM t_order_cross_city as ot |
| | | sc.chineseName as serverCarModel,ll.`name` as lineName,ot.* FROM t_order_cross_city as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | |
| | | case when ot.payType = 1 then '微信' |
| | | when ot.payType = 2 then '支付宝' |
| | | when ot.payType = 3 then '余额' else '' end as payTypeStr, |
| | | sc.`name` as serverCarModel, |
| | | sc.chineseName as serverCarModel, |
| | | CONCAT(di.firstName, ' ', di.lastName,'-',di.phone) as driver, |
| | | CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | ll.`name` as lineName, |
| | |
| | | <!--根据条件查询专车订单列表--> |
| | | <select id="getPrivateCarOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | sc.`name` as serverCarModel,ot.* FROM t_order_private_car as ot |
| | | sc.chineseName as serverCarModel,ot.* FROM t_order_private_car as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | |
| | | |
| | | case when ot.isFree = 2 then ot.orderMoney |
| | | when ot.freeMoney > ot.orderMoney then ot.orderMoney else ot.freeMoney end as freeMoney1, |
| | | sc.`name` as serverCarModel, |
| | | sc.chineseName as serverCarModel, |
| | | case when income1.type = 1 then income1.money else 0 end as platIncome, |
| | | case when income1.type = 2 then income1.money else 0 end as companyIncome, |
| | | case when income1.type = 3 then income1.money else 0 end as franchiseeIncome, |
| | |
| | | <!--根据条件查询专车订单列表noPage--> |
| | | <select id="getPrivateCarOrderListNoPage" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | sc.`name` as serverCarModel,ot.* FROM t_order_private_car as ot |
| | | sc.chineseName as serverCarModel,ot.* FROM t_order_private_car as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | |
| | | |
| | | <!--查询专车价格设置--> |
| | | <select id="getSpecialPriceList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.`name`,sc.img,sp.state from t_system_price as sp |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.chineseName as `name`,sc.img,sp.state from t_system_price as sp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = sp.serverCarModelId) as o |
| | | <where> |
| | | o.type = 1 and o.state != 3 and o.companyId = #{companyId} |
| | |
| | | </select> |
| | | <!--查询小件物流价格设置--> |
| | | <select id="getSpecialPriceList1" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.`name`,sc.img,sp.state from t_system_price as sp |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.chineseName as `name`,sc.img,sp.state from t_system_price as sp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = sp.serverCarModelId) as o |
| | | <where> |
| | | o.type = 4 and o.state != 3 and o.companyId = #{companyId} |
| | |
| | | english_discount.text(" Enjoy " + new BigDecimal((100 - aDouble)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() + "% off your trip fare."); |
| | | EmailUtil.send(user.getEmail(), "Discount activities", document1.html()); |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/discount_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/discount_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/discount_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/discount_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(user.getId()); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import com.google.cloud.WriteChannel; |
| | | import com.google.cloud.storage.BlobId; |
| | | import com.google.cloud.storage.BlobInfo; |
| | | import com.google.cloud.storage.Storage; |
| | | import com.google.cloud.storage.StorageOptions; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.nio.ByteBuffer; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.nio.file.Paths; |
| | | |
| | | /** |
| | | * google对象存储 |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/31 9:18 |
| | | */ |
| | | public class GoogleCloudStorageUtil { |
| | | |
| | | |
| | | |
| | | public static String upload(MultipartFile file){ |
| | | // The ID of your GCP project |
| | | // String projectId = "your-project-id"; |
| | | |
| | | // The ID of your GCS bucket |
| | | // String bucketName = "your-unique-bucket-name"; |
| | | |
| | | // The ID of your GCS object |
| | | // String objectName = "your-object-name"; |
| | | |
| | | // The path to your file to upload |
| | | // String filePath = "path/to/your/file" |
| | | String fileName = file.getOriginalFilename(); |
| | | String bucketName = "i-go"; |
| | | Storage storage = StorageOptions.newBuilder().setProjectId("i-go-gcp").build().getService(); |
| | | BlobId blobId = BlobId.of(bucketName, fileName); |
| | | BlobInfo blobInfo = BlobInfo.newBuilder(blobId).build(); |
| | | |
| | | // Optional: set a generation-match precondition to avoid potential race |
| | | // conditions and data corruptions. The request returns a 412 error if the |
| | | // preconditions are not met. |
| | | Storage.BlobWriteOption precondition; |
| | | if (storage.get(bucketName, fileName) == null) { |
| | | // For a target object that does not yet exist, set the DoesNotExist precondition. |
| | | // This will cause the request to fail if the object is created before the request runs. |
| | | precondition = Storage.BlobWriteOption.doesNotExist(); |
| | | } else { |
| | | // If the destination already exists in your bucket, instead set a generation-match |
| | | // precondition. This will cause the request to fail if the existing object's generation |
| | | // changes before the request runs. |
| | | precondition = |
| | | Storage.BlobWriteOption.generationMatch( |
| | | storage.get(bucketName, fileName).getGeneration()); |
| | | } |
| | | try { |
| | | storage.createFrom(blobInfo, file.getInputStream(), precondition); |
| | | System.out.println( |
| | | "File uploaded to bucket " + bucketName + " as " + fileName); |
| | | return "https://storage.cloud.google.com/" + bucketName + "/" + fileName + "?authuser=1"; |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * Fleet Engine API 工具类 |
| | | * |
| | | * @author zhibing.pu |
| | | * @Date 2024/5/17 9:59 |
| | | */ |
| | |
| | | |
| | | static Logger logger = LoggerFactory.getLogger(FleetEngineUtil.class); |
| | | |
| | | private final String SERVICE_ACCOUNT = "odrd-fleetengine-ondemandadmin@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | |
| | | private final String DRIVER_ACCOUNT = "odrd-fleetengine-driversdkuser@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | |
| | | private final String CONSUMER_ACCOUNT = "odrd-fleetengine-consumersdkus@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | |
| | | private final String serverPrivateKeyId = "254e18eefa9fdcca64d5899cdcd793d466c47c7d"; |
| | | |
| | | private final String serverPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfbNAWnukqLKIxItqmSABxsH5glySEHJ2gfL5KsRF0M02e0Z8/KNKZkoh7I6bOMt1fEtttFaWOeq70IdI2WAd5wVazL3upvl5FW4P08ly33LklfGyLljlJ7ChPny9x6OjAaiS0yD9fh7NWti7rZKU7gzcGL8HddNYXgXV5OajvoG3TGdu52WTxce9AUzU6gLPboz/RbGqrdrmgVJVb0EPlhTJf/NSsaiW4NoL8SEzf/pJGYBmqJs97mXwCHTY4avaC+CP/zz9yS8AQEJlApbVT6lSOhYoR0hNOBj5B886EZOssjubO6hQaiwRnGrV2RdpHynqA1iekfGpUGEtWTsqjAgMBAAECggEALyPbMd0iP8y71sCiG4nty7Au5ju62e+mMkbAc9CAwzXKTVxZdLEK+MsJ3TNxBsami47FYC+G6SbgpaJ8iIImD7v5+XjgXZRDRsnlLmAdx2YWPv3YELxGS1PvpX+B5XJDpGWeXfBaQNKc1lZ/cC4t53eIpSUo82UxSvkGNea1S8lR6vIByhNyCQOvLG4yqaxUy0hZi0kge37XrjYMGS+BivBBnDiVlBPLBVbrNBxOf31Lzz+XX0iwXX7Zl2jN759oe0xQyuIGWUSj8xBDIF8nNaJrla7rWVml3sZJh6/3r1Acj0mhZtE0ZMu5hiPGiIXgb1ng30j3dMP4yVPhXrpAtQKBgQDaU01VnHsnHxc0DQHE2vEOPGmPxVS0/JAssePAEUmKEueUogGef91YY+Vm/ItbhLwGjbytnXxe88zRAdB1u07efZ83ey93TrGl2CJUzLHIcgb+Q1tT642rqlfl+q8ep86hcZ+63pDiIPt2Z+HkbKIR0SWf5LIH4flquQOTQufXXQKBgQC674qDsjOJepZjMMN6PkVMcWBYDNmXHnqa5Oto0rZM745UulbXqEFGuBOsXPU7O33Kfz1vbtoluubKZi5B6cFNnPypE2SCfvdObHq4FuTuKPV6lN93SyhZchmSEXEs0PU4cGDRt+RRqQcjft1Wigiy4Y1y1SInCtcaP1hLejEJ/wKBgFAhvwKrGnBzctrB42JTUaJ9/eis7rg28tvUttjp/2nUIndlNt7r41vr3mj8TFHc1/43y4aVhO584THdTpvHkd0LkoKUjglmMsHCIGercZ02bOap5j1Y+XiGXxij995yjN6oi43U3qyAmosM+dYTITEU6JBVKhrGj/rhyTQlnF5pAoGBAKFGmo0mR/pbDbYD0xH6+VSLGCC+7VbIT+SkjUjBSdA0eOo2XUfvfGmj1C1HgbcZi1wRzJH/5CrbBdQmtc/d+QyZ3Q2NkpBXM8uwIWwDLH0gTzDzkZvc9rG8k70GWUrd+EI6Cf3FFjExj9wazqCjs/+IQr2Ijc97NbsKXYW4pOhHAoGAKf5wYk+cn0cVTsyAom0UbGD5Uijqh5732MeqFYs2Rcwx0OErJZo68COSFFF40hJmmIKn7p3qycIyd1FcYlXN1l4s8mEWTGTInRE0OlBU0+jLtIV9pwNgffpbPYcrWZU6s6YVeJ2nDwl+aD+4QvN0rkPTfho9kjgeyF3PW0I2u4E="; |
| | | |
| | | private final String driverPrivateKeyId = "859e85fb3aa4d18b4afaac3e24e8f65700da5cc9"; |
| | | |
| | | private final String driverPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmzL1BqSH+Zh9Fct5mXqe5sYOMTnJtOJh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7MZuARkVmbjLyKVmWLa1JpxH/cTbXGWsS/u7d/pAgL8WwMjeGBfbdDD92x+xWEqq/AUlCRPxeSkTPBech3TBzWtndAd5Z8ZwNG/1lyWhnck63L0huhGI8Zh2BXeILaKBAoGAKK3xq69BvGztPc1QV2w4RJ4RER/kl14gI1LDzd52/veL1cabZk3BKfu2eLWg0MCXnMJNvEgpqQQNFiii+yX+phckIKma6pfDRrSEYwqr/azQ9tPXZTJRqOAtpPyhrNHikD9kQjsm6dGzKxQ3QNnqWOjwkrcGi6/wga5v7Dw2hqsCgYEA2T/kSNQ9dqpVBAkfi2J50hqnfFESPjKeirJJZllqhVqsiV0ly8a8Fz8SjGqTzrq+UErko+QmtSlo5h3Uq9Ln+0CwYfrUL+74q2zLHdS0DpY3QsGTEDJXTxCyy9kO26X2UsM3Ez3YUAkdMwdpVz0uVZtinv2735QZOBxoVQV2kQ8="; |
| | | |
| | | private final String consumerPrivateKeyId = "40acf82cbd5250de2f5123caff40738bdd403b08"; |
| | | |
| | | private final String consumerPrivateKey = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDSwtbSBFgIXna6mWeKFWCK31NXUJH6uGduR1XrODGRedrqrTgr0BdNg8PDo6/zh/T+K0Svor6kgqpwnl9soOdn73oC4Nu+Ad7EiKa38j650jlZdLAr4hR0Ou9Kcnv45x/94auUO8jBz844cu24swLKiPsK9OnX65wVlKRfhhkGFuS/4OI76CmE7NqZDqPOW16o8tBO5TsgPVNkglFAU73fTp0kcHoLauT9QOB0+yZi39mnNXyU+2cL3Ylp5oaQCJpyssDRUqz/EiHa7FxUUgzCadG00+ePf5iYSnZKQRKWoOIawFvcCfcHx8GAl8Nn+79HtVQHB9hLsQ5+jqcdfKPfAgMBAAECggEAE9Ufz912xzrUY1TCKH1Ae3Dub732Lqihmv/9dsfv6ieUURcBvSW0u6eViVhi20DE7hH2QazH0cU18qkEg71UaTRgv9qW8vdMFiRhw9d4zZWZrfBMD6UTlahiEh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LYfC/nwOmqWoOhNPCst2Z7w=="; |
| | | private final static String key = "AIzaSyCG6PsfkaCEc94VK2vIAZk1YYKvOS_Ewts"; |
| | | private final String provider = "i-go-odrd-testing"; |
| | | |
| | | // private final String SERVICE_ACCOUNT = "odrd-fleetengine-ondemandadmin@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | // |
| | | // private final String DRIVER_ACCOUNT = "odrd-fleetengine-driversdkuser@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | // |
| | | // private final String CONSUMER_ACCOUNT = "odrd-fleetengine-consumersdkus@i-go-odrd-testing.iam.gserviceaccount.com"; |
| | | // |
| | | // private final String serverPrivateKeyId = "254e18eefa9fdcca64d5899cdcd793d466c47c7d"; |
| | | // |
| | | // private final String serverPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfbNAWnukqLKIxItqmSABxsH5glySEHJ2gfL5KsRF0M02e0Z8/KNKZkoh7I6bOMt1fEtttFaWOeq70IdI2WAd5wVazL3upvl5FW4P08ly33LklfGyLljlJ7ChPny9x6OjAaiS0yD9fh7NWti7rZKU7gzcGL8HddNYXgXV5OajvoG3TGdu52WTxce9AUzU6gLPboz/RbGqrdrmgVJVb0EPlhTJf/NSsaiW4NoL8SEzf/pJGYBmqJs97mXwCHTY4avaC+CP/zz9yS8AQEJlApbVT6lSOhYoR0hNOBj5B886EZOssjubO6hQaiwRnGrV2RdpHynqA1iekfGpUGEtWTsqjAgMBAAECggEALyPbMd0iP8y71sCiG4nty7Au5ju62e+mMkbAc9CAwzXKTVxZdLEK+MsJ3TNxBsami47FYC+G6SbgpaJ8iIImD7v5+XjgXZRDRsnlLmAdx2YWPv3YELxGS1PvpX+B5XJDpGWeXfBaQNKc1lZ/cC4t53eIpSUo82UxSvkGNea1S8lR6vIByhNyCQOvLG4yqaxUy0hZi0kge37XrjYMGS+BivBBnDiVlBPLBVbrNBxOf31Lzz+XX0iwXX7Zl2jN759oe0xQyuIGWUSj8xBDIF8nNaJrla7rWVml3sZJh6/3r1Acj0mhZtE0ZMu5hiPGiIXgb1ng30j3dMP4yVPhXrpAtQKBgQDaU01VnHsnHxc0DQHE2vEOPGmPxVS0/JAssePAEUmKEueUogGef91YY+Vm/ItbhLwGjbytnXxe88zRAdB1u07efZ83ey93TrGl2CJUzLHIcgb+Q1tT642rqlfl+q8ep86hcZ+63pDiIPt2Z+HkbKIR0SWf5LIH4flquQOTQufXXQKBgQC674qDsjOJepZjMMN6PkVMcWBYDNmXHnqa5Oto0rZM745UulbXqEFGuBOsXPU7O33Kfz1vbtoluubKZi5B6cFNnPypE2SCfvdObHq4FuTuKPV6lN93SyhZchmSEXEs0PU4cGDRt+RRqQcjft1Wigiy4Y1y1SInCtcaP1hLejEJ/wKBgFAhvwKrGnBzctrB42JTUaJ9/eis7rg28tvUttjp/2nUIndlNt7r41vr3mj8TFHc1/43y4aVhO584THdTpvHkd0LkoKUjglmMsHCIGercZ02bOap5j1Y+XiGXxij995yjN6oi43U3qyAmosM+dYTITEU6JBVKhrGj/rhyTQlnF5pAoGBAKFGmo0mR/pbDbYD0xH6+VSLGCC+7VbIT+SkjUjBSdA0eOo2XUfvfGmj1C1HgbcZi1wRzJH/5CrbBdQmtc/d+QyZ3Q2NkpBXM8uwIWwDLH0gTzDzkZvc9rG8k70GWUrd+EI6Cf3FFjExj9wazqCjs/+IQr2Ijc97NbsKXYW4pOhHAoGAKf5wYk+cn0cVTsyAom0UbGD5Uijqh5732MeqFYs2Rcwx0OErJZo68COSFFF40hJmmIKn7p3qycIyd1FcYlXN1l4s8mEWTGTInRE0OlBU0+jLtIV9pwNgffpbPYcrWZU6s6YVeJ2nDwl+aD+4QvN0rkPTfho9kjgeyF3PW0I2u4E="; |
| | | // |
| | | // private final String driverPrivateKeyId = "859e85fb3aa4d18b4afaac3e24e8f65700da5cc9"; |
| | | // |
| | | // private final String driverPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBA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Npi1eDwFqpLrk7CqGnYf3gP8gebbcoguhyiZB7MZuARkVmbjLyKVmWLa1JpxH/cTbXGWsS/u7d/pAgL8WwMjeGBfbdDD92x+xWEqq/AUlCRPxeSkTPBech3TBzWtndAd5Z8ZwNG/1lyWhnck63L0huhGI8Zh2BXeILaKBAoGAKK3xq69BvGztPc1QV2w4RJ4RER/kl14gI1LDzd52/veL1cabZk3BKfu2eLWg0MCXnMJNvEgpqQQNFiii+yX+phckIKma6pfDRrSEYwqr/azQ9tPXZTJRqOAtpPyhrNHikD9kQjsm6dGzKxQ3QNnqWOjwkrcGi6/wga5v7Dw2hqsCgYEA2T/kSNQ9dqpVBAkfi2J50hqnfFESPjKeirJJZllqhVqsiV0ly8a8Fz8SjGqTzrq+UErko+QmtSlo5h3Uq9Ln+0CwYfrUL+74q2zLHdS0DpY3QsGTEDJXTxCyy9kO26X2UsM3Ez3YUAkdMwdpVz0uVZtinv2735QZOBxoVQV2kQ8="; |
| | | // |
| | | // private final String consumerPrivateKeyId = "40acf82cbd5250de2f5123caff40738bdd403b08"; |
| | | // |
| | | // private final String consumerPrivateKey = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDSwtbSBFgIXna6mWeKFWCK31NXUJH6uGduR1XrODGRedrqrTgr0BdNg8PDo6/zh/T+K0Svor6kgqpwnl9soOdn73oC4Nu+Ad7EiKa38j650jlZdLAr4hR0Ou9Kcnv45x/94auUO8jBz844cu24swLKiPsK9OnX65wVlKRfhhkGFuS/4OI76CmE7NqZDqPOW16o8tBO5TsgPVNkglFAU73fTp0kcHoLauT9QOB0+yZi39mnNXyU+2cL3Ylp5oaQCJpyssDRUqz/EiHa7FxUUgzCadG00+ePf5iYSnZKQRKWoOIawFvcCfcHx8GAl8Nn+79HtVQHB9hLsQ5+jqcdfKPfAgMBAAECggEAE9Ufz912xzrUY1TCKH1Ae3Dub732Lqihmv/9dsfv6ieUURcBvSW0u6eViVhi20DE7hH2QazH0cU18qkEg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z6vd+dcsUlXM0fi37bGZkKBD0JGGt5OljM1qJG15x/LYfC/nwOmqWoOhNPCst2Z7w=="; |
| | | // private final String provider = "i-go-odrd-testing"; |
| | | |
| | | private final String SERVICE_ACCOUNT = "odrd-fleetengine-ondemandadmin@i-go-gcp.iam.gserviceaccount.com"; |
| | | |
| | | private final String DRIVER_ACCOUNT = "odrd-fleetengine-driversdkuser@i-go-gcp.iam.gserviceaccount.com"; |
| | | |
| | | private final String CONSUMER_ACCOUNT = "odrd-fleetengine-consumersdkus@i-go-gcp.iam.gserviceaccount.com"; |
| | | |
| | | private final String provider = "i-go-gcp"; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取jwt token |
| | | * |
| | | * @param type 0=服务端,1=乘客,2=司机 |
| | | * @return |
| | | */ |
| | | public Map<String, Object> fleetEngineAuth(int type, String id){ |
| | | try { |
| | | //谷歌云服务器使用这部分代码 |
| | | // AuthTokenMinter minter = AuthTokenMinter.builder() |
| | | // //服务端签名 |
| | | // .setServerSigner(ImpersonatedSigner.create(SERVICE_ACCOUNT)) |
| | | // //司机端签名 |
| | | // .setDriverSigner(ImpersonatedSigner.create(DRIVER_ACCOUNT)) |
| | | // //乘客端签名 |
| | | // .setConsumerSigner(ImpersonatedSigner.create(CONSUMER_ACCOUNT)) |
| | | // .build(); |
| | | AuthTokenMinter minter = AuthTokenMinter.builder() |
| | | //服务端签名 |
| | | .setServerSigner(LocalSigner.create(SERVICE_ACCOUNT, serverPrivateKeyId, serverPrivateKey)) |
| | | .setServerSigner(ImpersonatedSigner.create(SERVICE_ACCOUNT)) |
| | | //司机端签名 |
| | | .setDriverSigner(LocalSigner.create(DRIVER_ACCOUNT, driverPrivateKeyId, driverPrivateKey)) |
| | | .setDriverSigner(ImpersonatedSigner.create(DRIVER_ACCOUNT)) |
| | | //乘客端签名 |
| | | .setConsumerSigner(LocalSigner.create(CONSUMER_ACCOUNT, consumerPrivateKeyId, consumerPrivateKey)) |
| | | .setConsumerSigner(ImpersonatedSigner.create(CONSUMER_ACCOUNT)) |
| | | .build(); |
| | | // AuthTokenMinter minter = AuthTokenMinter.builder() |
| | | // //服务端签名 |
| | | // .setServerSigner(LocalSigner.create(SERVICE_ACCOUNT, serverPrivateKeyId, serverPrivateKey)) |
| | | // //司机端签名 |
| | | // .setDriverSigner(LocalSigner.create(DRIVER_ACCOUNT, driverPrivateKeyId, driverPrivateKey)) |
| | | // //乘客端签名 |
| | | // .setConsumerSigner(LocalSigner.create(CONSUMER_ACCOUNT, consumerPrivateKeyId, consumerPrivateKey)) |
| | | // .build(); |
| | | |
| | | String jwt = ""; |
| | | Long expirationTimestamp = 0L; |
| | |
| | | return map; |
| | | } catch (SigningTokenException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (SignerInitializationException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String getToken(){ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加车辆 |
| | | * |
| | | * @param maximumCapacity 这辆车可以搭载的乘客总数 |
| | | * @param licensePlate 车牌号 |
| | | * @param id 车辆id |
| | |
| | | |
| | | /** |
| | | * 上报google可结算订单 |
| | | * |
| | | * @param tripId 行程id |
| | | * @return |
| | | */ |
| | |
| | | post.body(body.toJSONString()); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //上线客户测试和上线运营开放 |
| | | // HttpResponse response = post.execute(); |
| | | // if(200 != response.getStatus()){ |
| | |
| | | // } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 修改车辆信息 |
| | | * |
| | | * @param maximumCapacity |
| | | * @param licensePlate |
| | | * @param id |
| | |
| | | |
| | | /** |
| | | * 获取车辆信息 |
| | | * |
| | | * @param id 车辆id |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取最后一个数字 |
| | | * |
| | | * @param str |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 创建新的行程 |
| | | * |
| | | * @param vehicleId 车辆id |
| | | * @param numberOfPassengers 人数 |
| | | * @param tripId 订单id |
| | |
| | | |
| | | /** |
| | | * 修改行程 |
| | | * |
| | | * @param tripStatus 行程状态 |
| | | * @param vehicleId 车辆id |
| | | * @param numberOfPassengers 人数 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取行程信息 |
| | | * |
| | | * @param tripId 订单id |
| | | * @return |
| | | */ |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | public class PushURL { |
| | | public static String order_push_url = "http://182.160.16.251:80/driver/base/order/pushOrderState"; |
| | | public static String driver_auth_url = "http://182.160.16.251:80/driver/base/driver/sendsms"; |
| | | public static String withdraw_auth_url = "http://182.160.16.251:80/driver/base/withdrawal/withdrawalAudit"; |
| | | public static String cancel_order_url = "http://182.160.16.251:80/user/base/order/sendOrderState"; |
| | | public static String freeze_user_url = "http://182.160.16.251:80/user/base/user/freeze"; |
| | | public static String zull_user_url = "http://182.160.16.251:80"; |
| | | public static String order_push_url = "http://127.0.0.1:5000/driver/base/order/pushOrderState"; |
| | | public static String driver_auth_url = "http://127.0.0.1:5000/driver/base/driver/sendsms"; |
| | | public static String withdraw_auth_url = "http://127.0.0.1:5000/driver/base/withdrawal/withdrawalAudit"; |
| | | public static String cancel_order_url = "http://127.0.0.1:5000/user/base/order/sendOrderState"; |
| | | public static String freeze_user_url = "http://127.0.0.1:5000/user/base/user/freeze"; |
| | | public static String zull_user_url = "http://127.0.0.1:5000"; |
| | | |
| | | // public static String order_push_url = "http://express.feimadache.com:80/driver/base/order/pushOrderState"; |
| | | // public static String driver_auth_url = "http://express.feimadache.com:80/driver/base/driver/sendsms"; |
| | |
| | | socketFactoryClass: javax.net.ssl.SSLSocketFactory # 配饰 SSL 加密工厂 |
| | | debug: true |
| | | from: i-gotech@i-go.group # 发送方邮件,配在yml中可方便更改 |
| | | template-path: /usr/local/nginx/html/mailbox/ |
| | | template-path: /home/igotechgh/nginx/html/mailbox/ |
| | | |
| | | --- |
| | | #支付回调地址 |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/igotravel2.0?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B0 |
| | | username: root |
| | | url: jdbc:mysql://172.16.0.4:3306/igotravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B0 |
| | | username: i-go |
| | | password: HjKbXilb9zajmXbl |
| | | db-name: guns #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | |
| | | |
| | | --- |
| | | |
| | | filePath: /usr/local/server/orderPostionFile/ #存储订单轨迹文件路径 |
| | | filePath: /home/igotechgh/orderPostionFile/ #存储订单轨迹文件路径 |
| | | |
| | | #quartz配置 |
| | | spring: |
| | |
| | | socketFactoryClass: javax.net.ssl.SSLSocketFactory # 配饰 SSL 加密工厂 |
| | | debug: true |
| | | from: i-gotech@i-go.group # 发送方邮件,配在yml中可方便更改 |
| | | template-path: /usr/local/nginx/html/mailbox/ |
| | | template-path: /home/igotechgh/nginx/html/mailbox/ |
| | | |
| | | --- |
| | | #支付回调地址 |
| | | callbackPath: http://182.160.16.251:8010 |
| | | callbackPath: https://igo.i-go.group:8080 |
| | | |
| | | --- |
| | |
| | | socketFactoryClass: javax.net.ssl.SSLSocketFactory # 配饰 SSL 加密工厂 |
| | | debug: true |
| | | from: i-gotech@i-go.group # 发送方邮件,配在yml中可方便更改 |
| | | template-path: /usr/local/nginx/html/mailbox/ |
| | | template-path: /home/igotechgh/nginx/html/mailbox/ |
| | | |
| | | --- |
| | | #支付回调地址 |
| | |
| | | <contextName>logback</contextName> |
| | | |
| | | <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 --> |
| | | <property name="log.path" value="/usr/local/server/logs/admin"/> |
| | | <property name="log.path" value="/home/igotechgh/app/log/admin"/> |
| | | |
| | | <!--0. 日志格式和颜色渲染 --> |
| | | <!-- 彩色日志依赖的渲染类 --> |
| | |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="xjModel" name="xjModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in xjModelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="xjModel" name="xjModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in xjModelList){ |
| | | <option value="${obj.id}"${obj.id == xjModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.id}"${obj.id == xjModel ? 'selected=selected' : ''}>${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="xjModel" name="xjModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in xjModelList){ |
| | | <option value="${obj.id}" ${obj.id == xjModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | <option value="${obj.id}" ${obj.id == xjModel ? 'selected=selected' : ''}>${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="serverModelId" > |
| | | <option value="">选择车型</option> |
| | | @for(obj in carmodelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="serverModelId" > |
| | | <option value="">选择车型</option> |
| | | @for(obj in carmodelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <#SelectCon id="serverCarModelId" name="车型" > |
| | | <option value="">全部</option> |
| | | @for(obj in carmodelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | |
| | | <#SelectCon id="serverCarModelId" name="车型" > |
| | | <option value="">全部</option> |
| | | @for(obj in carmodelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | <option value="${obj.id}">${obj.chineseName}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | |
| | | <version>2.9.0</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-tomcat</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>javax.servlet</groupId> |
| | | <artifactId>javax.servlet-api</artifactId> |
| | | <version>3.1.0</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-starter-tomcat</artifactId>--> |
| | | <!-- <scope>provided</scope>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>javax.servlet</groupId>--> |
| | | <!-- <artifactId>javax.servlet-api</artifactId>--> |
| | | <!-- <version>3.1.0</version>--> |
| | | <!-- <scope>provided</scope>--> |
| | | <!-- </dependency>--> |
| | | |
| | | |
| | | <!-- netty --> |
| | |
| | | server: |
| | | port: 80 |
| | | port: 5000 |
| | | spring: |
| | | application: |
| | | name: zuul-gateway #服务名称 |