From 1f2d9d3b687b80965412f0dd9410dc5c2cc3202d Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期四, 20 七月 2023 15:32:08 +0800 Subject: [PATCH] 更新代码 --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) 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 03c065d..45402a0 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 @@ -272,7 +272,7 @@ document1.getElementById("rewardToday").attr("style", "display: none;"); Element user_user = document1.getElementById("user_user"); - user_user.text("您好 " + driver.getName() + ","); + user_user.text("您好 " + driver.getFirstName() + " " + driver.getLastName() + ","); Element user_content = document1.getElementById("user_content"); user_content.text("您已成功邀请一位用户注册I-GO,获得奖励GHS " + bigDecimal.doubleValue() + ",请查收"); } @@ -287,7 +287,7 @@ document1.getElementById("rewardToday1").attr("style", "display: none;"); Element user1_user = document1.getElementById("user1_user"); - user1_user.text("Hello " + driver.getName() + ","); + user1_user.text("Hello " + driver.getFirstName() + " " + driver.getLastName() + ","); Element user1_content = document1.getElementById("user1_content"); 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."); } @@ -302,7 +302,7 @@ document1.getElementById("rewardToday1").attr("style", "display: none;"); Element user2_user = document1.getElementById("user2_user"); - user2_user.text("Bonjour " + driver.getName() + ","); + user2_user.text("Bonjour " + driver.getFirstName() + " " + driver.getLastName() + ","); Element user2_content = document1.getElementById("user2_content"); user2_content.text("Vous avez invité avec succès un utilisateur à s’inscrire à i-go pour recevoir une récompense GHS " + bigDecimal.doubleValue() + ". Veuillez vérifier"); } @@ -1106,7 +1106,7 @@ public ResultUtil depositBalance(Integer payType, String bankCardId, Double money, Integer uid, Integer type, Integer language) throws Exception { UserInfo userInfo = userInfoMapper.selectById(uid); if(money.compareTo(0D) <= 0){ - return ResultUtil.error("支付金额必须大于0元"); + return ResultUtil.error("支付金额必须大于0元", ""); } if(payType == 1){//手机支付 Integer integer = paymentRecordService.saveData(2, uid, 1, null, null, 1, money, "", 1);//添加预支付数据 @@ -1124,8 +1124,8 @@ checkoutRequest.setRequestDescription("Account top-up"); checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelUserBalance"); checkoutRequest.setPendingRedirectUrl(""); - checkoutRequest.setSuccessRedirectUrl("https://10pz685243.zicp.fun"); - checkoutRequest.setFailRedirectUrl("https://www.baidu.com"); + checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); + checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); return TinggPayUtil.checkoutRequest(checkoutRequest); } @@ -1145,11 +1145,11 @@ checkoutRequest.setRequestDescription("Account top-up"); checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelUserBalance"); checkoutRequest.setPendingRedirectUrl(""); - checkoutRequest.setSuccessRedirectUrl("https://10pz685243.zicp.fun"); - checkoutRequest.setFailRedirectUrl("https://www.baidu.com"); + checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html"); + checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html"); return TinggPayUtil.checkoutRequest(checkoutRequest); } - return ResultUtil.success(); + return ResultUtil.success(""); } @@ -1230,7 +1230,7 @@ * @throws Exception */ @Override - public void updateInfo(String avatar, String nickname, Integer sex, Date birthday, String email, String lastName, String firstName, Integer uid) throws Exception { + public ResultUtil updateInfo(String avatar, String nickname, Integer sex, Date birthday, String email, String code, String lastName, String firstName, Integer uid, Integer language) throws Exception { UserInfo userInfo = this.selectById(uid); if(ToolUtil.isNotEmpty(avatar)){ userInfo.setAvatar(avatar); @@ -1245,6 +1245,10 @@ userInfo.setBirthday(birthday); } if(null != email){ + String value = redisUtil.getValue(email); + if(ToolUtil.isEmpty(value) || code.equals(value)){ + return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide"); + } userInfo.setEmail(email); } if(null != lastName){ @@ -1254,6 +1258,7 @@ userInfo.setFirstName(firstName); } this.updateById(userInfo); + return ResultUtil.success(); } @@ -1273,11 +1278,10 @@ * 完成余额充值后的处理 * @param id 用户id * @param order_id 工行订单id - * @param type 支付类型(1=微信,2=支付宝) * @throws Exception */ @Override - public void payCancelUserBalance(Integer id, String order_id, Integer paymentRecordId, Integer type, Integer language) throws Exception { + public void payCancelUserBalance(Integer id, String order_id, Integer paymentRecordId, Integer language) throws Exception { PaymentRecord query = paymentRecordService.selectById(paymentRecordId); UserInfo userInfo = this.selectById(query.getUserId()); if(null != query){ @@ -1294,7 +1298,7 @@ this.addCoupon(userInfo.getId(), query.getAmount(), userInfo.getCompanyId(), query.getId(), language);//添加优惠券 }else{ - System.err.println("预支付数据异常(userId = " + id + ")"); + System.err.println("预支付数据异常(paymentRecordId = " + paymentRecordId + ")"); } } -- Gitblit v1.7.1