| | |
| | | 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.*; |
| | |
| | | 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.*; |
| | |
| | | |
| | | @Resource |
| | | private DriverActivityRegisteredMapper driverActivityRegisteredMapper; |
| | | |
| | | @Resource |
| | | private DriverActivityHistoryMapper driverActivityHistoryMapper; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 校验短信验证码 |
| | |
| | | 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()); |
| | | } |
| | | |
| | |
| | | @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)); |
| | |
| | | UserInfo userInfo = this.selectById(query.getUserId()); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(Integer.valueOf(query.getUserId()), "余额充值", query.getAmount(), 2, 1, 1, 5, null); |
| | | transactionDetailsService.saveData(Integer.valueOf(query.getUserId()), "余额充值", query.getAmount(), 2, 1, 1, 5, paymentRecordId); |
| | | double v = new BigDecimal(userInfo.getBalance()).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | userInfo.setBalance(v); |
| | | this.updateById(userInfo); |
| | |
| | | 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")){ |