| | |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.DriverActivityRegisteredMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DriverMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserActivityInviteMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | |
| | | |
| | | @Resource |
| | | private DriverActivityRegisteredMapper driverActivityRegisteredMapper; |
| | | |
| | | @Resource |
| | | private DriverActivityHistoryMapper driverActivityHistoryMapper; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | |
| | | bigDecimal = bigDecimal.add(new BigDecimal(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money")))); |
| | | } |
| | | DriverActivityHistory dah = new DriverActivityHistory(); |
| | | dah.setActivityId(Integer.valueOf(map.get("id").toString())); |
| | | dah.setDriverId(uid); |
| | | dah.setType(2); |
| | | DriverActivityHistory driverActivityHistory = driverActivityHistoryMapper.selectOne(dah); |
| | | driverActivityHistory.setCarryOut(2); |
| | | driverActivityHistoryMapper.updateById(driverActivityHistory); |
| | | } |
| | | driver.setActivityMoney(bigDecimal.add(new BigDecimal(driver.getActivityMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveActivityMoney(bigDecimal.add(new BigDecimal(driver.getLaveActivityMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | if(null != userInfo1 && uid.compareTo(userInfo1.getId()) != 0){ |
| | | return ResultUtil.error(language == 1 ? "邮箱已被使用" : language == 2 ? "E-mail address is already in use." : "L’adresse e-mail est déjà utilisée."); |
| | | } |
| | | |
| | | // if(null != userInfo1){ |
| | | // userInfo1.setOpenId(userInfo.getOpenId()); |
| | | // userInfo1.setUnionid(userInfo.getUnionid()); |
| | | // userInfo1.setAppletsOpenId(userInfo.getAppletsOpenId()); |
| | | // userInfo1.setAvatar(userInfo.getAvatar()); |
| | | // userInfo1.setSex(userInfo.getSex()); |
| | | // userInfo1.setNickName(userInfo.getNickName()); |
| | | // this.updateById(userInfo1); |
| | | // |
| | | // this.deleteById(userInfo.getId());//删除原有数据 |
| | | // //还原之前账号领取的注册优惠券 |
| | | // List<UserCouponRecord> list = userCouponRecordService.selectList(new EntityWrapper<UserCouponRecord>().eq("userId", userInfo.getId())); |
| | | // for(UserCouponRecord ucr : list){ |
| | | // if(ucr.getActivityType() == 1){//赠送 |
| | | // |
| | | // } |
| | | // if(ucr.getActivityType() == 2){//注册 |
| | | // UserActivityRegistered userActivityRegistered = userActivityRegisteredService.selectById(ucr.getCouponActivityId()); |
| | | // userActivityRegistered.setLaveNum(userActivityRegistered.getLaveNum() + 1); |
| | | // userActivityRegistered.setLavePrice(userActivityRegistered.getLavePrice() + ucr.getMoney()); |
| | | // userActivityRegisteredService.updateById(userActivityRegistered); |
| | | // } |
| | | // if(ucr.getActivityType() == 3){//邀请 |
| | | // |
| | | // } |
| | | // if(ucr.getActivityType() == 4){//充值 |
| | | // |
| | | // } |
| | | // userCouponRecordService.deleteById(ucr.getId()); |
| | | // } |
| | | // |
| | | // |
| | | // //获取新的token等数据 |
| | | // String token = this.getToken(userInfo1, ""); |
| | | // LoginWarpper loginWarpper = new LoginWarpper(); |
| | | // loginWarpper.setId(userInfo1.getId()); |
| | | // loginWarpper.setToken(token); |
| | | // loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | // loginWarpper.setPhone(2); |
| | | // loginWarpper.setEmail(userInfo1.getEmail()); |
| | | // return ResultUtil.success(loginWarpper); |
| | | // } |
| | | |
| | | userInfo.setEmail(email); |
| | | userInfo.setUpdateTime(new Date()); |
| | | userInfo.setUpdateUser(userInfo.getId()); |
| | | this.updateById(userInfo); |
| | | // if(type == 1){//注册成功后发送邮件 |
| | | //// EmailUtil.getMimeMessage(email, "注册账户", ""); |
| | | // } |
| | | return ResultUtil.success(new LoginWarpper()); |
| | | } |
| | | |