| | |
| | | sb.append((int) (random.nextDouble() * 10)); |
| | | } |
| | | String authCode = sb.toString(); |
| | | String sms = "短信验证码【" + authCode + "】已发到您的手机,验证码将在5分钟后失效,请及时登录!"; |
| | | String sms = "您的验证码是:" + authCode + ",请勿将验证码透露给他人!"; |
| | | |
| | | //发送验证码短信 |
| | | redisUtil.setStrValue(phone, authCode, 5 * 60);//设置五分钟过期 |
| | |
| | | templateCode = "c230a6b92504473c97c17741e1cc0b9d";//修改密码 |
| | | break; |
| | | } |
| | | aLiSendSms.sendSms(phone, "SMS_467580138", "{\"code\":\"" + authCode + "\"}"); |
| | | // HuaWeiSMSUtil.sendSms("[\"" + authCode + "\"]", phone, "8822061324669", templateCode); |
| | | // String sData = aLiSendSms.sendSms(phone, templateCode, "{\"code\":\"" + authCode + "\"}"); |
| | | //// JSONObject jsonObject = JSON.parseObject(sData); |
| | | //// String message = jsonObject.getString("Message"); |
| | | //// if(!"OK".equals(message)){ |
| | | //// System.err.println(message); |
| | | //// return ResultUtil.error(message); |
| | | //// } |
| | | SmsUtil.sendZTHYSms(phone, sms); |
| | | System.out.println(sms); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | userInfo.setConsumption(0D); |
| | | userInfo.setBalance(0D); |
| | | userInfo.setState(1); |
| | | userInfo.setAvatar("http://bao-weiqing.oss-cn-hangzhou.aliyuncs.com/img/ad02d59ae74342359270f62a024fa9c6.png"); |
| | | userInfo.setAvatar("https://anhenew.obs.cn-north-4.myhuaweicloud.com/admin/cca63b23e3a84c89a01e5204c1819497.png"); |
| | | |
| | | //用户所属企业 |
| | | if(null != registAreaCode){ |
| | |
| | | userInfo.setConsumption(0D); |
| | | userInfo.setBalance(0D); |
| | | userInfo.setState(1); |
| | | userInfo.setAvatar("http://bao-weiqing.oss-cn-hangzhou.aliyuncs.com/img/ad02d59ae74342359270f62a024fa9c6.png"); |
| | | |
| | | userInfo.setAvatar("https://anhenew.obs.cn-north-4.myhuaweicloud.com/admin/cca63b23e3a84c89a01e5204c1819497.png"); |
| | | |
| | | this.insert(userInfo); |
| | | |
| | |
| | | userInfo.setConsumption(0D); |
| | | userInfo.setBalance(0D); |
| | | userInfo.setState(1); |
| | | userInfo.setAvatar("http://bao-weiqing.oss-cn-hangzhou.aliyuncs.com/img/ad02d59ae74342359270f62a024fa9c6.png"); |
| | | userInfo.setAvatar("https://anhenew.obs.cn-north-4.myhuaweicloud.com/admin/cca63b23e3a84c89a01e5204c1819497.png"); |
| | | |
| | | //用户所属企业 |
| | | if(null != registAreaCode){ |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryUserInfo(Integer uid) throws Exception { |
| | | public Map<String, Object> queryUserInfo(String code, Integer uid) throws Exception { |
| | | Map<String, String> map = weChatUtil.code2Session(code); |
| | | UserInfo userInfo = userInfoMapper.selectById(uid); |
| | | if(ToolUtil.isEmpty(userInfo.getAppletsOpenId())){ |
| | | userInfo.setAppletsOpenId(map.get("openid")); |
| | | userInfoMapper.updateById(userInfo); |
| | | } |
| | | return userInfoMapper.queryUserInfo(uid, null); |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getDefaultName(){ |
| | | int num = this.selectCount(new EntityWrapper<UserInfo>().ne("flag", 3)) + 1000001; |
| | | return "HQ" + String.valueOf(num).substring(1); |
| | | return "AH" + String.valueOf(num).substring(1); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | private synchronized void addCoupon(UserInfo userInfo) throws Exception{ |
| | | //添加优惠券 |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(userInfo.getCompanyId()); |
| | | List<Map<String, Object>> list = userActivityRegisteredService.query(null == userInfo.getCompanyId() ? 1 : userInfo.getCompanyId()); |
| | | int num = 0; |
| | | for(Map<String, Object> map : list){ |
| | | if(null != map){ |