| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.FileWriter; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | redisUtil.setStrValue(phone, authCode, 5 * 60);//设置五分钟过期 |
| | | switch (language){ |
| | | case 1: |
| | | sms = "您的验证码为:" + authCode + ",该验证码5分钟内有效,请勿泄漏于他人!"; |
| | | // sms = "您的验证码为:" + authCode + ",该验证码5分钟内有效,请勿泄漏于他人!"; |
| | | sms = "Your verification code is " + authCode + ", it is valid within 5 minutes, please do not reveal it to others."; |
| | | break; |
| | | case 2: |
| | | sms = "Your verification code is " + authCode + ",it is valid within 5 minutes, please do not reveal it to others."; |
| | | sms = "Your verification code is " + authCode + ", it is valid within 5 minutes, please do not reveal it to others."; |
| | | break; |
| | | case 3: |
| | | sms = "Votre code de validation est " + authCode + "et il est valide pendant 5 minutes. Veuillez ne pas le révéler à d’autres personnes."; |
| | | sms = "Votre code de validation est " + authCode + " et il est valide pendant 5 minutes. Veuillez ne pas le révéler à d’autres personnes."; |
| | | break; |
| | | } |
| | | smsUtil.sendCellulantMessage(phone, sms); |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 校验短信验证码 |
| | |
| | | |
| | | //用户所属企业 |
| | | if(null != lat && null != lng){ |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(lat, lat); |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(lat, lat, null); |
| | | AddressComponentsVo[] addressComponentsVos = reverseGeocode.getAddressComponentsVos(); |
| | | String[] citys = new String[addressComponentsVos.length]; |
| | | for (int i = 0; i < addressComponentsVos.length; i++) { |
| | |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "注册成功" : language == 2 ? "Registered successfully" : "Enregistré avec succès", 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/registration_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/registration_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/registration_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/registration_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(uid); |
| | |
| | | } |
| | | EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense", 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/invitation_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/invitation_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/invitation_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/invitation_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(driver.getId()); |
| | |
| | | } |
| | | EmailUtil.send(userInfo1.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(uid); |
| | |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "注册成功" : language == 2 ? "Registered successfully" : "Enregistré avec succès", 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/registration_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/registration_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/registration_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/registration_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(uid); |
| | |
| | | } |
| | | EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense", 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/invitation_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/invitation_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/invitation_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/invitation_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(driver.getId()); |
| | |
| | | } |
| | | EmailUtil.send(userInfo1.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(uid); |
| | |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "注册成功" : language == 2 ? "Registered successfully" : "Enregistré avec succès", 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/registration_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/registration_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/registration_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/registration_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(uid); |
| | |
| | | |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(uid); |
| | |
| | | } |
| | | //用户所属企业 |
| | | if(null != lat && null != lng){ |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(lat, lng); |
| | | ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(lat, lng, null); |
| | | if(null != reverseGeocode){ |
| | | AddressComponentsVo[] addressComponentsVos = reverseGeocode.getAddressComponentsVos(); |
| | | String[] citys = new String[addressComponentsVos.length]; |
| | |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "注册成功" : language == 2 ? "Registered successfully" : "Enregistré avec succès", 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/registration_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/registration_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/registration_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/registration_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(uid); |
| | |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(uid); |
| | |
| | | @Override |
| | | public Map<String, Object> queryUser(Integer language, String phone) throws Exception { |
| | | Map<String, Object> map = userInfoMapper.queryUserInfo(null, phone); |
| | | if(null == map){ |
| | | return null; |
| | | } |
| | | if(null != map.get("birthday")){ |
| | | String birthday = map.get("birthday").toString(); |
| | | map.put("birthday", DateUtil.conversionFormat(language, birthday)); |
| | |
| | | checkoutRequest.setRequestDescription("Account top-up"); |
| | | checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelUserBalance"); |
| | | checkoutRequest.setPendingRedirectUrl(""); |
| | | checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); |
| | | checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html"); |
| | | return TinggPayUtil.checkoutRequest(checkoutRequest); |
| | | } |
| | | |
| | |
| | | checkoutRequest.setRequestDescription("Account top-up"); |
| | | checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelUserBalance"); |
| | | checkoutRequest.setPendingRedirectUrl(""); |
| | | checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); |
| | | checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html"); |
| | | checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html"); |
| | | return TinggPayUtil.checkoutRequest(checkoutRequest); |
| | | } |
| | | return ResultUtil.success(""); |
| | |
| | | |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "重置密码" : language == 2 ? "Reset password" : "Réinitialiser le mot de passe", 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/password_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/password_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/password_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/password_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(uid); |
| | |
| | | String endTime = ""; |
| | | if(null != map.get("startTime")){ |
| | | startTime = map.get("startTime").toString(); |
| | | map.put("startTime", DateUtil.conversionFormat(language, startTime)); |
| | | startTime = DateUtil.conversionFormat(language, startTime); |
| | | } |
| | | if(null != map.get("endTime")){ |
| | | endTime = map.get("endTime").toString(); |
| | | map.put("endTime", DateUtil.conversionFormat(language, endTime)); |
| | | endTime = DateUtil.conversionFormat(language, endTime); |
| | | } |
| | | double fullMoney = 0; |
| | | if(null != map.get("bcompanyId")){ |
| | |
| | | Element french_number = document1.getElementById("french_number"); |
| | | french_number.text("Vous avez reçu " + list.size() + " coupons."); |
| | | Element french_date = document1.getElementById("french_date"); |
| | | french_date.text("Vous devriez les utiliser du" + startTime + " au " + endTime + ", voir le détail sur la plate-forme I-GO."); |
| | | french_date.text("Vous devriez les utiliser du " + startTime + " au " + endTime + ", voir le détail sur la plate-forme I-GO."); |
| | | Element french_remark = document1.getElementById("french_remark"); |
| | | french_remark.text("Remarque! Le coupon n'est valable que pour le tarif d'au moins GHS " + fullMoney + " par trajet."); |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(userInfo.getId()); |
| | |
| | | uar.setLavePrice(new BigDecimal(lavePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | userActivityRegisteredService.updateById(uar); |
| | | |
| | | if(ToolUtil.isNotEmpty(userInfo.getEmail())){ |
| | | if(0 < num && ToolUtil.isNotEmpty(userInfo.getEmail())){ |
| | | String path1 = templatePath + "user/coupon.html"; |
| | | Document document1 = Jsoup.parse(new File(path1), "UTF-8"); |
| | | if(language == 1){ |
| | |
| | | Element french_number = document1.getElementById("french_number"); |
| | | french_number.text("Vous avez reçu " + num + " coupons."); |
| | | Element french_date = document1.getElementById("french_date"); |
| | | french_date.text("Vous devriez les utiliser du" + startTime + " au " + endTime + ", voir le détail sur la plate-forme I-GO."); |
| | | french_date.text("Vous devriez les utiliser du " + startTime + " au " + endTime + ", voir le détail sur la plate-forme I-GO."); |
| | | Element french_remark = document1.getElementById("french_remark"); |
| | | french_remark.text("Remarque! Le coupon n'est valable que pour le tarif d'au moins GHS " + fullMoney + " par trajet."); |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "优惠券到账" : language == 2 ? "Coupon is in" : "Le coupon est arrivé sur le compte", 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(userInfo.getId()); |