From 7558a21c1ae1b48b0888f3e3906eb4ba6a68b06f Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期四, 03 八月 2023 11:30:34 +0800 Subject: [PATCH] 修改bug --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java | 96 ++++++----- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java | 12 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java | 10 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OpenCityBusinessServiceImpl.java | 8 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java | 45 ++++- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReportLossServiceImpl.java | 4 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java | 156 +++++++++--------- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java | 12 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml | 2 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java | 4 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java | 2 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml | 6 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java | 12 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java | 60 +++--- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml | 6 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java | 17 + 16 files changed, 247 insertions(+), 205 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java index 9f9817e..2a2f053 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java @@ -236,23 +236,23 @@ if(null == uid){ return ResultUtil.tokenErr(); } - String name = language == 1 ? "专车订单" : language == 2 ? "Private car order" : "Commande de voiture exclusive"; + String name = language == 1 ? "打车" : language == 2 ? "Ride" : "Course"; pageNum = (pageNum - 1) * size; List<Map<String, Object>> maps = orderCancelService.queryCancel(uid, 2); for (Map<String, Object> map : maps) { Integer orderType = Integer.valueOf(map.get("orderType").toString()); if(1 == orderType){ - map.put("name", language == 1 ? "专车订单取消" : language == 2 ? "Private car order cancelled" : "Annulation de commande de voiture exclusive"); + map.put("name", language == 1 ? "打车订单取消" : language == 2 ? "Ride order cancelled" : "Commande de trajet annulée"); } if(4 == orderType){ - map.put("name", language == 1 ? "市内小件物流订单取消" : language == 2 ? "The small parts logistics order in the city has been cancelled" : "Annulation de commande pour la logistique de petites pièces dans la ville"); + map.put("name", language == 1 ? "包裹订单取消" : language == 2 ? "Parcel order cancellation" : "Annulation de commande de colis"); } } List<Map<String, Object>> list = orderPrivateCarService.queryMyTravelRecord(uid);//专车 for (Map<String, Object> map : list) { map.put("name", name); } - name = language == 1 ? "市内小件物流" : language == 2 ? "Small parts logistics in the city" : "Logistique de petites pièces dans la ville"; + name = language == 1 ? "包裹" : language == 2 ? "Package" : "Livraison"; List<Map<String, Object>> list3 = orderLogisticsService.queryMyTravelRecord(uid);//小件物流 for (Map<String, Object> map : list3) { map.put("name", name); @@ -902,7 +902,7 @@ OrderCancel orderCancel = orderCancelService.selectById(id); OrderLogistics orderLogistics = orderLogisticsService.selectById(orderCancel.getOrderId()); PaymentRecord query = paymentRecordService.query(1, orderLogistics.getUserId(), 1, orderLogistics.getId(), orderLogistics.getType(), 1, 2); - transactionDetailsService.saveData(orderLogistics.getUserId(), "小件物流取消退款", query.getAmount(), 1, 1, 1, 4, orderLogistics.getId()); + transactionDetailsService.saveData(orderLogistics.getUserId(), "包裹取消退款", query.getAmount(), 1, 1, 1, 4, orderLogistics.getId()); results.setBeepTransactionID(beepTransactionID); results.setPayerTransactionID(payerTransactionID); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java index 53c205f..744bbb1 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java @@ -209,24 +209,24 @@ String path = templatePath + "user/mainbox.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + nickName + ","); Element content_chinese = document.getElementById("content_chinese"); content_chinese.text(authCode); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_english"); user_chinese.text("Hello " + nickName + ","); Element content_chinese = document.getElementById("content_english"); content_chinese.text(authCode); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + nickName + ","); Element content_french = document.getElementById("content_french"); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java index fe85d30..b78fc67 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java @@ -1554,7 +1554,7 @@ orderPrivateCarMapper.insert(orderPrivateCar); //添加消息 - systemNoticeService.addSystemNotice(1, "您的专车订单已下单成功,我们正在为您指派司机,请稍后!", orderPrivateCar.getUserId(), 1); + systemNoticeService.addSystemNotice(1, "您的打车订单已下单成功,我们正在为您指派司机,请稍后!", orderPrivateCar.getUserId(), 1); BaseWarpper baseWarpper = new BaseWarpper(); baseWarpper.setId(orderPrivateCar.getId()); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml index efa2b4c..9b7c802 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml @@ -167,7 +167,7 @@ select (payMoney * -1) as money, DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, - if(type = 4, '同城小件物流订单', '跨城小件物流') as name, + if(type = 4, '包裹订单', '跨城小件物流') as name, UNIX_TIMESTAMP(insertTime) as insertTime from t_order_logistics where payMoney != 0 and userId = #{uid} and state not in (7, 10) @@ -176,7 +176,7 @@ select (a.payMoney * -1) as money, DATE_FORMAT(a.payTime, '%Y-%m-%d %H:%i') as time, - if(b.type = 4, '同城小件物流订单', '跨城小件物流') as name, + if(b.type = 4, '包裹订单', '跨城小件物流') as name, UNIX_TIMESTAMP(a.payTime) as insertTime from t_order_logistics_spread a left join t_order_logistics b on (a.orderLogisticsId = b.id) @@ -193,7 +193,7 @@ startAddress as startAddress, endAddress as endAddress, payMoney as payMoney, - if(type = 4, '同城小件物流订单', '跨城小件物流订单') as orderName, + if(type = 4, '包裹流订单', '跨城小件物流订单') as orderName, if(invoiceId is null, 1, 2) as invoice, unix_timestamp(insertTime) as insertTime, `type` as orderType diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java index 61efbb1..680ee35 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java @@ -294,8 +294,9 @@ this.insert(orderLogistics); //添加消息 - systemNoticeService.addSystemNotice(1, language == 1 ? "您的市内小件物流订单已下单成功,我们正在为您指派司机,请稍后!" : - language == 2 ? "Your local small parts logistics order has been successfully placed, we are assigning you a driver, please wait!" : "Votre commande de city small pieces logistics a été passée avec succès. Nous vous assignons un chauffeur. Plus tard!", orderLogistics.getUserId(), 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您的市内包裹订单已下单成功,我们正在为您指派司机,请稍后!" : + language == 2 ? "Your parcel order has been successfully placed, we are assigning a driver for you, please wait!" + : "Votre commande de colis a bien été passée, nous vous assignons un chauffeur, veuillez patienter!", orderLogistics.getUserId(), 1); BaseWarpper baseWarpper = new BaseWarpper(); baseWarpper.setId(orderLogistics.getId()); @@ -549,7 +550,7 @@ userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 //添加交易明细 - transactionDetailsService.saveData(uid, "小件物流下单支付", orderMoney, 2, 1, 1, 4, orderId); + transactionDetailsService.saveData(uid, "包裹下单支付", orderMoney, 2, 1, 1, 4, orderId); userInfoService.updateById(userInfo); orderLogistics.setState(1);//小件物流先支付后司机抢单 @@ -564,8 +565,8 @@ SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf2.format(orderLogistics.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderLogistics.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -584,8 +585,8 @@ end_address_chinese.text(orderLogistics.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf2.format(orderLogistics.getTravelTime()) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -604,8 +605,8 @@ end_address_english.text(orderLogistics.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text(sdf2.format(orderLogistics.getTravelTime()) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); Element xcf_french = document.getElementById("xcf_french"); @@ -624,7 +625,7 @@ end_address_french.text(orderLogistics.getEndAddress()); } - EmailUtil.send(userInfo.getEmail(), language == 1 ? "市内小件物流收据" : language == 2 ? "Delivery receipt for small parts in the city" : "Réception logistique de petites pièces dans la ville", document.html()); + EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Parcel receipt" : "Réception de colis", document.html()); } // TODO: 2020/5/24 这里需要给司机和用户推送订单状态 @@ -634,9 +635,9 @@ pushUtil.pushOrderState(1, orderLogistics.getUserId(), orderLogistics.getId(), orderLogistics.getType(), orderLogistics.getState(), 0); } }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单支付,谢谢使用!" : language == 2 - ? "You have successfully completed the small parts logistics order payment, thank you for using!" : - "Vous avez complété avec succès le paiement de la commande small pieces logistics. Merci d’utiliser!", uid, 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单支付,谢谢使用!" : language == 2 + ? "You have successfully completed the parcel order payment, thank you for using!" : + "Vous avez terminé avec succès le paiement de la commande de colis, merci de l’utiliser!", uid, 1); this.pushOrder(orderLogistics);//推单 } @@ -645,7 +646,7 @@ userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 //添加交易明细 - transactionDetailsService.saveData(uid, "小件物流下单支付", orderMoney, 2, 1, 1, 4, orderId); + transactionDetailsService.saveData(uid, "包裹下单支付", orderMoney, 2, 1, 1, 4, orderId); userInfoService.updateById(userInfo); orderLogistics.setState(1);//小件物流先支付后司机抢单 @@ -659,8 +660,8 @@ SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf2.format(orderLogistics.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderLogistics.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -679,8 +680,8 @@ end_address_chinese.text(orderLogistics.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf2.format(orderLogistics.getTravelTime()) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -699,8 +700,8 @@ end_address_english.text(orderLogistics.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text(sdf2.format(orderLogistics.getTravelTime()) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); Element xcf_french = document.getElementById("xcf_french"); @@ -719,7 +720,7 @@ end_address_french.text(orderLogistics.getEndAddress()); } - EmailUtil.send(userInfo.getEmail(), language == 1 ? "市内小件物流收据" : language == 2 ? "Delivery receipt for small parts in the city" : "Réception logistique de petites pièces dans la ville", document.html()); + EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Parcel receipt" : "Réception de colis", document.html()); } @@ -732,9 +733,9 @@ } }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单支付,谢谢使用!" : language == 2 - ? "You have successfully completed the small parts logistics order payment, thank you for using!" : - "Vous avez complété avec succès le paiement de la commande small pieces logistics. Merci d’utiliser!", uid, 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单支付,谢谢使用!" : language == 2 + ? "You have successfully completed the parcel order payment, thank you for using!" : + "Vous avez terminé avec succès le paiement de la commande de colis, merci de l’utiliser!", uid, 1); this.pushOrder(orderLogistics);//推单 } @@ -811,7 +812,7 @@ userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 //添加交易明细 - transactionDetailsService.saveData(uid, "小件物流补差价", orderMoney, 2, 1, 1, 4, orderId); + transactionDetailsService.saveData(uid, "包裹补差价", orderMoney, 2, 1, 1, 4, orderId); userInfoService.updateById(userInfo); orderLogistics.setState(12);//已支付差价 @@ -857,9 +858,9 @@ } }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单差价支付,谢谢使用!" : language == 2 - ? "You have successfully completed the price difference payment of small parts logistics order, thank you for using!" - : "Vous avez complété avec succès le paiement de la différence de prix de la commande de petites pièces logistiques, merci d’utiliser!", uid, 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单差价支付,谢谢使用!" : language == 2 + ? "You have successfully completed the difference payment of parcel order, thank you for using!" + : "Vous avez complété avec succès le paiement de la différence de commande de colis, merci de l’utiliser!", uid, 1); } if(payType == 4){//现金支付 @@ -867,7 +868,7 @@ userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 //添加交易明细 - transactionDetailsService.saveData(uid, "小件物流补差价", orderMoney, 2, 1, 1, 4, orderId); + transactionDetailsService.saveData(uid, "包裹补差价", orderMoney, 2, 1, 1, 4, orderId); userInfoService.updateById(userInfo); orderLogistics.setState(12);//已支付差价 @@ -914,9 +915,9 @@ } }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单差价支付,谢谢使用!" : language == 2 - ? "You have successfully completed the price difference payment of small parts logistics order, thank you for using!" - : "Vous avez complété avec succès le paiement de la différence de prix de la commande de petites pièces logistiques, merci d’utiliser!", uid, 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单差价支付,谢谢使用!" : language == 2 + ? "You have successfully completed the difference payment of parcel order, thank you for using!" + : "Vous avez complété avec succès le paiement de la différence de commande de colis, merci de l’utiliser!", uid, 1); } @@ -953,8 +954,8 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf.format(orderLogistics.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderLogistics.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -973,8 +974,8 @@ end_address_chinese.text(orderLogistics.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf.format(orderLogistics.getTravelTime()) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -993,8 +994,8 @@ end_address_english.text(orderLogistics.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text(sdf.format(orderLogistics.getTravelTime()) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); Element xcf_french = document.getElementById("xcf_french"); @@ -1027,9 +1028,9 @@ }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单支付,谢谢使用!" : language == 2 - ? "You have successfully completed the small parts logistics order payment, thank you for using!" : - "Vous avez complété avec succès le paiement de la commande small pieces logistics. Merci d’utiliser!", orderLogistics.getUserId(), 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单支付,谢谢使用!" : language == 2 + ? "You have successfully completed the parcel order payment, thank you for using!" : + "Vous avez terminé avec succès le paiement de la commande de colis, merci de l’utiliser!", orderLogistics.getUserId(), 1); this.pushOrder(orderLogistics);//推单 }else{ @@ -1061,7 +1062,7 @@ userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 //添加交易明细 - transactionDetailsService.saveData(orderLogistics.getUserId(), "小件物流补差价", orderMoney, 2, 1, 1, 4, id); + transactionDetailsService.saveData(orderLogistics.getUserId(), "包裹补差价", orderMoney, 2, 1, 1, 4, id); userInfoService.updateById(userInfo); orderLogistics.setState(12);//已支付差价 @@ -1102,9 +1103,9 @@ } }).start(); - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成小件物流订单差价支付,谢谢使用!" : language == 2 - ? "You have successfully completed the price difference payment of small parts logistics order, thank you for using!" - : "Vous avez complété avec succès le paiement de la différence de prix de la commande de petites pièces logistiques, merci d’utiliser!", orderLogistics.getUserId(), 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功完成包裹订单差价支付,谢谢使用!" : language == 2 + ? "You have successfully completed the difference payment of parcel order, thank you for using!" + : "Vous avez complété avec succès le paiement de la différence de commande de colis, merci de l’utiliser!", orderLogistics.getUserId(), 1); }else{ System.err.println("预支付数据异常(orderId = " + id + ")"); } @@ -1276,7 +1277,7 @@ integer = orderCancel.getId(); //添加交易明细 - transactionDetailsService.saveData(orderLogistics.getUserId(), "小件物流取消退款", orderLogistics.getPayMoney(), 1, 1, 1, 4, orderLogistics.getId()); + transactionDetailsService.saveData(orderLogistics.getUserId(), "包裹取消退款", orderLogistics.getPayMoney(), 1, 1, 1, 4, orderLogistics.getId()); } if(null != orderLogistics.getDriverId()){ @@ -1289,7 +1290,8 @@ } //添加消息 - systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消小件物流订单,谢谢使用!" : language == 2 ? "You have successfully cancelled the small logistics order, thank you for using" : "Vous avez annulé avec succès la petite commande logistique, merci d'utiliser", orderLogistics.getUserId(), 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消包裹订单,谢谢使用!" : language == 2 ? "You have successfully cancelled your parcel order, thank you for using!" + : "Vous avez annulé avec succès votre commande de colis, merci de l’utiliser!", orderLogistics.getUserId(), 1); Map<String, Object> map = new HashMap<>(); map.put("id", integer); return ResultUtil.success(map); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml index 7904ced..823e67a 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml @@ -355,7 +355,7 @@ startAddress as startAddress, endAddress as endAddress, payMoney as payMoney, - ('专车订单') as orderName, + ('打车订单') as orderName, if(invoiceId is null, 1, 2) as invoice, unix_timestamp(insertTime) as insertTime, (1) as orderType @@ -458,7 +458,7 @@ select (payMoney * -1) as money, DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, - ('专车订单') as name, + ('打车订单') as name, UNIX_TIMESTAMP(insertTime) as insertTime from t_order_private_car where payMoney != 0 and userId = #{uid} and state in (8, 9, 10, 11, 12) </select> @@ -468,7 +468,7 @@ select redPacketMoney as money, DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, - ('专车订单') as name, + ('打车订单') as name, UNIX_TIMESTAMP(insertTime) as insertTime from t_order_private_car where userId = #{uid} and state in (8, 9) and redPacketId is not null </select> diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java index cb1954a..aed3ee2 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java @@ -431,9 +431,9 @@ //添加消息 - systemNoticeService.addSystemNotice(1, language == 1 ? "您的专车订单已下单成功,我们正在为您指派司机,请稍后!" : - language == 2 ? "Your private car order has been successfully placed, we are assigning a driver for you, please wait!" : - "Votre commande de voiture exclusive a été passée avec succès. Nous vous assignons un chauffeur. Plus tard!", orderPrivateCar.getUserId(), 1); + systemNoticeService.addSystemNotice(1, language == 1 ? "您的打车订单已下单成功,我们正在为您指派司机,请稍后!" : + language == 2 ? "Your ride order has been successfully placed, we are assigning a driver for you, please wait!" : + "Votre commande a bien été passée, nous vous assignons un chauffeur, veuillez patienter!", orderPrivateCar.getUserId(), 1); BaseWarpper baseWarpper = new BaseWarpper(); baseWarpper.setState(orderPrivateCar.getState()); @@ -1008,8 +1008,8 @@ } Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf.format(orderPrivateCar.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderPrivateCar.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -1038,8 +1038,8 @@ end_address_chinese.text(orderPrivateCar.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf.format(orderPrivateCar.getTravelTime()) + ",You spent GHS " + orderPrivateCar.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -1068,8 +1068,8 @@ end_address_english.text(orderPrivateCar.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text("Vous consommez GHS " + orderPrivateCar.getPayMoney() + " sur votre commande i-go1 le " + sdf.format(orderPrivateCar.getTravelTime())); Element xcf_french = document.getElementById("xcf_french"); @@ -1098,7 +1098,7 @@ end_address_french.text(orderPrivateCar.getEndAddress()); } - EmailUtil.send(userInfo.getEmail(), language == 1 ? "专车收据" : language == 2 ? "Private car receipt" : "Reçu de voiture privée", document.html()); + EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de Ride", document.html()); } @@ -1180,8 +1180,8 @@ } Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf.format(orderPrivateCar.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderPrivateCar.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -1210,8 +1210,8 @@ end_address_chinese.text(orderPrivateCar.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf.format(orderPrivateCar.getTravelTime()) + ",You spent GHS " + orderPrivateCar.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -1240,8 +1240,8 @@ end_address_english.text(orderPrivateCar.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text("Vous consommez GHS " + orderPrivateCar.getPayMoney() + " sur votre commande i-go1 le " + sdf.format(orderPrivateCar.getTravelTime())); Element xcf_french = document.getElementById("xcf_french"); @@ -1270,7 +1270,7 @@ end_address_french.text(orderPrivateCar.getEndAddress()); } - EmailUtil.send(userInfo.getEmail(), language == 1 ? "专车收据" : language == 2 ? "Private car receipt" : "Reçu de voiture privée", document.html()); + EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de Ride", document.html()); } @@ -1375,24 +1375,24 @@ Document document = Jsoup.parse(new File(path), "UTF-8"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); Element time_chinese = document.getElementById("time_chinese"); time_chinese.text("此活动有效期在" + sdf.format(query.getInsertTime()) + "至" + sdf.format(query.getEndTime()) + ",详情请查看I-GO平台"); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_english = document.getElementById("user_english"); user_english.text("Hello " + userInfo.getNickName() + ","); Element time_english = document.getElementById("time_english"); time_english.text("You could use it from" + sdf.format(query.getInsertTime()) + "to" + sdf.format(query.getEndTime()) + ",check more details on the app."); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); Element time_french = document.getElementById("time_french"); @@ -1544,8 +1544,8 @@ } Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(sdf.format(orderPrivateCar.getTravelTime()) + ",您在I-GO1个订单消费GHS " + orderPrivateCar.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); @@ -1574,8 +1574,8 @@ end_address_chinese.text(orderPrivateCar.getEndAddress()); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element title_english = document.getElementById("title_english"); title_english.text(sdf.format(orderPrivateCar.getTravelTime()) + ",You spent GHS " + orderPrivateCar.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); @@ -1604,8 +1604,8 @@ end_address_english.text(orderPrivateCar.getEndAddress()); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element title_french = document.getElementById("title_french"); title_french.text("Vous consommez GHS " + orderPrivateCar.getPayMoney() + " sur votre commande i-go1 le " + sdf.format(orderPrivateCar.getTravelTime())); Element xcf_french = document.getElementById("xcf_french"); @@ -1634,7 +1634,7 @@ end_address_french.text(orderPrivateCar.getEndAddress()); } - EmailUtil.send(userInfo.getEmail(), language == 1 ? "专车收据" : language == 2 ? "Private car receipt" : "Reçu de voiture privée", document.html()); + EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de Ride", document.html()); } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java index 355b8e3..adfe944 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java @@ -2,6 +2,9 @@ import com.google.code.kaptcha.Constants; import com.google.code.kaptcha.Producer; +import com.google.code.kaptcha.impl.DefaultKaptcha; +import com.google.code.kaptcha.util.Config; +import com.google.code.kaptcha.util.Configurable; import com.stylefeng.guns.config.properties.GunsProperties; import com.stylefeng.guns.core.util.FileUtil; import com.stylefeng.guns.modular.system.util.RedisUtil; @@ -17,6 +20,7 @@ import javax.servlet.http.HttpSession; import java.awt.image.BufferedImage; import java.io.IOException; +import java.util.Properties; /** * 验证码生成 @@ -43,13 +47,13 @@ */ @RequestMapping("") public void index(HttpServletRequest request, HttpServletResponse response,String phone) { - String substring = phone.substring(0, 1); - if("0".equals(substring)){ - phone = "233" + phone.substring(1); - } - if(phone.indexOf("233") < 0){ - phone = "233" + phone; - } +// String substring = phone.substring(0, 1); +// if("0".equals(substring)){ +// phone = "233" + phone.substring(1); +// } +// if(phone.indexOf("233") < 0){ +// phone = "233" + phone; +// } HttpSession session = request.getSession(); @@ -72,10 +76,33 @@ // store the text in the session session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); - redisUtil.setStrValue(phone+"_Code",capText); +// redisUtil.setStrValue(phone+"_Code",capText); // create the image with the text - BufferedImage bi = producer.createImage(capText); + Properties properties = new Properties(); + // 设置边框 + properties.setProperty("kaptcha.border", "no"); + // 设置颜色 + properties.setProperty("kaptcha.border.color", "105,179,90"); + // 设置字体颜色 + properties.setProperty("kaptcha.textproducer.font.color", "blue"); + // 设置宽度 + properties.setProperty("kaptcha.image.width", "125"); + // 高度 + properties.setProperty("kaptcha.image.height", "42"); + // 设置session.key + properties.setProperty("kaptcha.session.key", "code"); + // 设置文本长度 + properties.setProperty("kaptcha.textproducer.char.length", "4"); + // 设置字体 + properties.setProperty("kaptcha.textproducer.font.names", "宋体,楷体,微软雅黑"); + //字体大小 + properties.setProperty("kaptcha.textproducer.font.size", "35"); + + Config config = new Config(properties); + DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); + defaultKaptcha.setConfig(config); + BufferedImage bi = defaultKaptcha.createImage(capText); ServletOutputStream out = null; try { out = response.getOutputStream(); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml index 67467a9..b10608d 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml @@ -56,7 +56,7 @@ (money * -1) as money, DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, orderType, - CONCAT(if(orderType = 1, '专车', if(orderType = 2, '出租车', if(orderType = 3, '跨城', if(orderType = 4, '同城小件物流', if(orderType = 5, '跨城小件物流', '包车'))))), '订单取消') as name, + CONCAT(if(orderType = 1, '打车', if(orderType = 2, '出租车', if(orderType = 3, '跨城', if(orderType = 4, '包裹', if(orderType = 5, '跨城小件物流', '包车'))))), '订单取消') as name, UNIX_TIMESTAMP(insertTime) as insertTime from t_order_cancel where state = 2 and userType = 1 and money is not null and userId = #{uid} <choose> diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java index 7941a98..3366caf 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java @@ -72,20 +72,20 @@ String path = templatePath + "user/complaint.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(language == 1){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element chinese_user = document.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo.getNickName() + ","); } if(language == 2){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); } if(language == 3){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element french_user = document.getElementById("french_user"); french_user.text("Bonjour " + userInfo.getNickName() + ","); } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java index ba4d363..a956753 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java @@ -140,7 +140,7 @@ baseWarpper.setId(d.getType()); switch (d.getType()){ case 1: - baseWarpper.setName(language == 1 ? "专车" : language == 2 ? "Private car" : "véhicules"); + baseWarpper.setName(language == 1 ? "打车" : language == 2 ? "Ride" : "Course"); break; case 2: baseWarpper.setName("出租车"); @@ -149,7 +149,7 @@ baseWarpper.setName("跨城出行"); break; case 4: - baseWarpper.setName(language == 1 ? "市内小件物流" : language == 2 ? "Small parts logistics in the city" : "Logistique de petites pièces dans la ville"); + baseWarpper.setName(language == 1 ? "包裹" : language == 2 ? "Package" : "Livraison"); break; case 5: baseWarpper.setName("跨城小件物流"); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java index 5d1fd3c..e2cd42c 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java @@ -76,20 +76,20 @@ String path = templatePath + "user/feedback.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_english = document.getElementById("user_english"); user_english.text("Hello " + userInfo.getNickName() + ","); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OpenCityBusinessServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OpenCityBusinessServiceImpl.java index bfa631c..5ea842b 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OpenCityBusinessServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OpenCityBusinessServiceImpl.java @@ -47,7 +47,7 @@ BaseWarpper baseWarpper = new BaseWarpper(); switch (b.getBusinessType()){ case 1: - baseWarpper.setName(language == 1 ? "专车" : language == 2 ? "special car" : "voiture spéciale"); + baseWarpper.setName(language == 1 ? "打车" : language == 2 ? "Ride" : "Course"); baseWarpper.setId(1); break; // case 2: @@ -59,7 +59,7 @@ // baseWarpper.setId(3); // break; case 4: - baseWarpper.setName(language == 1 ? "市内小件物流" : language == 2 ? "Small logistics in the city" : "Petite logistique en ville"); + baseWarpper.setName(language == 1 ? "包裹" : language == 2 ? "Package" : "Livraison"); baseWarpper.setId(4); break; // case 5: @@ -94,7 +94,7 @@ BaseWarpper baseWarpper = new BaseWarpper(); switch (b.getBusinessType()){ case 1: - baseWarpper.setName(language == 1 ? "专车" : language == 2 ? "special car" : "voiture spéciale"); + baseWarpper.setName(language == 1 ? "打车" : language == 2 ? "Ride" : "Course"); baseWarpper.setId(1); break; // case 2: @@ -106,7 +106,7 @@ // baseWarpper.setId(3); // break; case 4: - baseWarpper.setName(language == 1 ? "市内小件物流" : language == 2 ? "Small logistics in the city" : "Petite logistique en ville"); + baseWarpper.setName(language == 1 ? "包裹" : language == 2 ? "Package" : "Livraison"); baseWarpper.setId(4); break; // case 5: diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReportLossServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReportLossServiceImpl.java index f06273e..a33eb8e 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReportLossServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReportLossServiceImpl.java @@ -92,8 +92,8 @@ if(ToolUtil.isNotEmpty(userInfo.getEmail())){ String path = templatePath + "user/reportLoss.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); EmailUtil.send(userInfo.getEmail(), "Report loss of goods", document.html()); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java index 18b8ee7..b4f607e 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java @@ -233,20 +233,20 @@ String path = templatePath + "user/register.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_english = document.getElementById("user_english"); user_english.text("Hello " + userInfo.getNickName() + ","); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); } @@ -274,14 +274,14 @@ String path1 = templatePath + "driver/index.html"; Document document1 = Jsoup.parse(new File(path1), "UTF-8"); if(1 == language){ - document1.getElementById("english").attr("style", "display: none;"); - document1.getElementById("french").attr("style", "display: none;"); - document1.getElementById("invite").attr("style", "display: none;"); - document1.getElementById("settle").attr("style", "display: none;"); - document1.getElementById("pass").attr("style", "display: none;"); - document1.getElementById("bill").attr("style", "display: none;"); - document1.getElementById("reward").attr("style", "display: none;"); - document1.getElementById("rewardToday").attr("style", "display: none;"); + document1.getElementById("english").remove(); + document1.getElementById("french").remove(); + document1.getElementById("invite").remove(); + document1.getElementById("settle").remove(); + document1.getElementById("pass").remove(); + document1.getElementById("bill").remove(); + document1.getElementById("reward").remove(); + document1.getElementById("rewardToday").remove(); Element user_user = document1.getElementById("user_user"); user_user.text("您好 " + driver.getFirstName() + " " + driver.getLastName() + ","); @@ -289,14 +289,14 @@ user_content.text("您已成功邀请一位用户注册I-GO,获得奖励GHS " + bigDecimal.doubleValue() + ",请查收"); } if(2 == language){ - document1.getElementById("chinese").attr("style", "display: none;"); - document1.getElementById("french").attr("style", "display: none;"); - document1.getElementById("invite1").attr("style", "display: none;"); - document1.getElementById("settle1").attr("style", "display: none;"); - document1.getElementById("pass1").attr("style", "display: none;"); - document1.getElementById("bill1").attr("style", "display: none;"); - document1.getElementById("reward1").attr("style", "display: none;"); - document1.getElementById("rewardToday1").attr("style", "display: none;"); + document1.getElementById("chinese").remove(); + document1.getElementById("french").remove(); + document1.getElementById("invite1").remove(); + document1.getElementById("settle1").remove(); + document1.getElementById("pass1").remove(); + document1.getElementById("bill1").remove(); + document1.getElementById("reward1").remove(); + document1.getElementById("rewardToday1").remove(); Element user1_user = document1.getElementById("user1_user"); user1_user.text("Hello " + driver.getFirstName() + " " + driver.getLastName() + ","); @@ -304,14 +304,14 @@ user1_content.text("You have succeeded to invite a rider to register with I-GO, so you received a GHS " + bigDecimal.doubleValue() + " bonus, please check your balance."); } if(3 == language){ - document1.getElementById("chinese").attr("style", "display: none;"); - document1.getElementById("english").attr("style", "display: none;"); - document1.getElementById("invite1").attr("style", "display: none;"); - document1.getElementById("settle1").attr("style", "display: none;"); - document1.getElementById("pass1").attr("style", "display: none;"); - document1.getElementById("bill1").attr("style", "display: none;"); - document1.getElementById("reward1").attr("style", "display: none;"); - document1.getElementById("rewardToday1").attr("style", "display: none;"); + document1.getElementById("chinese").remove(); + document1.getElementById("english").remove(); + document1.getElementById("invite1").remove(); + document1.getElementById("settle1").remove(); + document1.getElementById("pass1").remove(); + document1.getElementById("bill1").remove(); + document1.getElementById("reward1").remove(); + document1.getElementById("rewardToday1").remove(); Element user2_user = document1.getElementById("user2_user"); user2_user.text("Bonjour " + driver.getFirstName() + " " + driver.getLastName() + ","); @@ -364,8 +364,8 @@ String path1 = templatePath + "user/coupon.html"; Document document1 = Jsoup.parse(new File(path1), "UTF-8"); if(language == 1){ - document1.getElementById("english").attr("style", "display: none;"); - document1.getElementById("french").attr("style", "display: none;"); + document1.getElementById("english").remove(); + document1.getElementById("french").remove(); Element chinese_user = document1.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo1.getNickName() + ","); Element chinese_number = document1.getElementById("chinese_number"); @@ -374,8 +374,8 @@ chinese_date.text("此活动有效期在" + startTime + "至" + endTime + ",详情请查看I-GO平台"); } if(language == 2){ - document1.getElementById("chinese").attr("style", "display: none;"); - document1.getElementById("french").attr("style", "display: none;"); + document1.getElementById("chinese").remove(); + document1.getElementById("french").remove(); Element english_user = document1.getElementById("english_user"); english_user.text("Hello " + userInfo1.getNickName() + ","); Element english_number = document1.getElementById("english_number"); @@ -384,8 +384,8 @@ english_date.text("You could use them from" + startTime + "to" + endTime); } if(language == 3){ - document1.getElementById("chinese").attr("style", "display: none;"); - document1.getElementById("english").attr("style", "display: none;"); + document1.getElementById("chinese").remove(); + document1.getElementById("english").remove(); Element french_user = document1.getElementById("french_user"); french_user.text("Bonjour " + userInfo1.getNickName() + ","); Element french_number = document1.getElementById("french_number"); @@ -553,20 +553,20 @@ String path = templatePath + "user/register.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_english = document.getElementById("user_english"); user_english.text("Hello " + userInfo.getNickName() + ","); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); } @@ -636,8 +636,8 @@ String path = templatePath + "user/coupon.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(language == 1){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element chinese_user = document.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo.getNickName() + ","); Element chinese_number = document.getElementById("chinese_number"); @@ -646,8 +646,8 @@ chinese_date.text("此活动有效期在" + startTime + "至" + endTime + ",详情请查看I-GO平台"); } if(language == 2){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); Element english_number = document.getElementById("english_number"); @@ -656,8 +656,8 @@ english_date.text("You could use them from" + startTime + "to" + endTime); } if(language == 3){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element french_user = document.getElementById("french_user"); french_user.text("Bonjour " + userInfo.getNickName() + ","); Element french_number = document.getElementById("french_number"); @@ -755,20 +755,20 @@ String path = templatePath + "user/register.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_english = document.getElementById("user_english"); user_english.text("Hello " + userInfo.getNickName() + ","); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); } @@ -838,8 +838,8 @@ String path = templatePath + "user/coupon.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(language == 1){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element chinese_user = document.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo.getNickName() + ","); Element chinese_number = document.getElementById("chinese_number"); @@ -848,8 +848,8 @@ chinese_date.text("此活动有效期在" + startTime + "至" + endTime + ",详情请查看I-GO平台"); } if(language == 2){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); Element english_number = document.getElementById("english_number"); @@ -858,8 +858,8 @@ english_date.text("You could use them from" + startTime + "to" + endTime); } if(language == 3){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element french_user = document.getElementById("french_user"); french_user.text("Bonjour " + userInfo.getNickName() + ","); Element french_number = document.getElementById("french_number"); @@ -1208,20 +1208,20 @@ String path = templatePath + "user/passwordReset.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(1 == language){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_chinese"); user_chinese.text("您好 " + userInfo.getNickName() + ","); } if(2 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element user_chinese = document.getElementById("user_english"); user_chinese.text("Hello " + userInfo.getNickName() + ","); } if(3 == language){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element user_french = document.getElementById("user_french"); user_french.text("Bonjour " + userInfo.getNickName() + ","); } @@ -1463,8 +1463,8 @@ String path = templatePath + "user/coupon.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(language == 1){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element chinese_user = document.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo.getNickName() + ","); Element chinese_number = document.getElementById("chinese_number"); @@ -1473,8 +1473,8 @@ chinese_date.text("此活动有效期在" + startTime + "至" + endTime + ",详情请查看I-GO平台"); } if(language == 2){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); Element english_number = document.getElementById("english_number"); @@ -1483,8 +1483,8 @@ english_date.text("You could use them from" + startTime + "to" + endTime); } if(language == 3){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element french_user = document.getElementById("french_user"); french_user.text("Bonjour " + userInfo.getNickName() + ","); Element french_number = document.getElementById("french_number"); @@ -1588,8 +1588,8 @@ String path = templatePath + "user/coupon.html"; Document document = Jsoup.parse(new File(path), "UTF-8"); if(language == 1){ - document.getElementById("english").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("english").remove(); + document.getElementById("french").remove(); Element chinese_user = document.getElementById("chinese_user"); chinese_user.text("您好 " + userInfo.getNickName() + ","); Element chinese_number = document.getElementById("chinese_number"); @@ -1598,8 +1598,8 @@ chinese_date.text("此活动有效期在" + startTime + "至" + endTime + ",详情请查看I-GO平台"); } if(language == 2){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("french").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); Element english_user = document.getElementById("english_user"); english_user.text("Hello " + userInfo.getNickName() + ","); Element english_number = document.getElementById("english_number"); @@ -1608,8 +1608,8 @@ english_date.text("You could use them from" + startTime + "to" + endTime); } if(language == 3){ - document.getElementById("chinese").attr("style", "display: none;"); - document.getElementById("english").attr("style", "display: none;"); + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); Element french_user = document.getElementById("french_user"); french_user.text("Bonjour " + userInfo.getNickName() + ","); Element french_number = document.getElementById("french_number"); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java index 31c06b5..469ef05 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java @@ -1,5 +1,7 @@ package com.stylefeng.guns.modular.system.util; +import com.sun.mail.smtp.SMTPSSLTransport; + import javax.mail.*; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; @@ -86,8 +88,19 @@ msg.setContent(mm_text_image); //设置邮件的发送时间,默认立即发送 msg.setSentDate(new Date()); - - Transport.send(msg); + Transport transport = session.getTransport(); + transport.connect(); + transport.sendMessage(msg, msg.getAllRecipients()); + transport.close(); return true; } + + + public static void main(String[] args) { + try { + EmailUtil.send("393733352@qq.com", "验证码", "<html><span style=\"color:red;\">123456</span></html>"); + } catch (Exception e) { + e.printStackTrace(); + } + } } -- Gitblit v1.7.1