| | |
| | | * @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); |
| | |
| | | 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){ |
| | |
| | | userInfo.setFirstName(firstName); |
| | | } |
| | | this.updateById(userInfo); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | |
| | | * 完成余额充值后的处理 |
| | | * @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){ |
| | |
| | | this.addCoupon(userInfo.getId(), query.getAmount(), userInfo.getCompanyId(), query.getId(), language);//添加优惠券 |
| | | |
| | | }else{ |
| | | System.err.println("预支付数据异常(userId = " + id + ")"); |
| | | System.err.println("预支付数据异常(paymentRecordId = " + paymentRecordId + ")"); |
| | | } |
| | | |
| | | } |