| | |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.security.SecureRandom; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | | |
| | |
| | | templateCode = "SMS_482775061";//修改密码 |
| | | break; |
| | | } |
| | | 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); |
| | | } |
| | | // String sData = aLiSendSms.sendSms(phone, templateCode, "{\"code\":\"" + authCode + "\"}"); |
| | | SMSUtil.send(phone, "您的验证码:" + authCode + ",您正在进行身份验证,请勿泄露于他人!", "2431012312847"); |
| | | // JSONObject jsonObject = JSON.parseObject(sData); |
| | | // String message = jsonObject.getString("Message"); |
| | | // if(!"OK".equals(message)){ |
| | | // System.err.println(message); |
| | | // return ResultUtil.error(message); |
| | | // } |
| | | System.out.println(sms); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | @Override |
| | | public boolean checkCaptcha(String phone, String code) throws Exception { |
| | | Object value = redisUtil.getValue(phone); |
| | | if("1234".equals(code)){ |
| | | if("5689".equals(code)){ |
| | | return true; |
| | | } |
| | | |
| | |
| | | userCouponRecordService.insert(userCouponRecord); |
| | | //修改剩余可发放总金额 |
| | | lavePrice -= Double.valueOf(String.valueOf(map.get("money"))); |
| | | |
| | | // 订阅通知 |
| | | UserInfo userInfo1 = userInfoMapper.selectById(uid); |
| | | if(userInfo1.getOpenId()!=null){ |
| | | // 推送订阅消息 |
| | | WxMaSubscribeMessageUtil.push(userInfo1.getAppletsOpenId(),map.get("name").toString(),userCouponRecord.getMoney()); |
| | | } |
| | | |
| | | } |
| | | UserActivityInvite uai = userActivityInviteMapper.selectById(Integer.valueOf(map.get("id").toString())); |
| | | uai.setLavePrice(new BigDecimal(lavePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | userCouponRecordService.insert(userCouponRecord); |
| | | //修改剩余可发放总金额 |
| | | lavePrice -= Double.valueOf(String.valueOf(map.get("money"))); |
| | | |
| | | // 订阅通知 |
| | | UserInfo userInfo1 = userInfoMapper.selectById(uid); |
| | | if(userInfo1.getOpenId()!=null){ |
| | | // 推送订阅消息 |
| | | WxMaSubscribeMessageUtil.push(userInfo1.getAppletsOpenId(),map.get("name").toString(),userCouponRecord.getMoney()); |
| | | } |
| | | |
| | | |
| | | } |
| | | UserActivityInvite uai = userActivityInviteMapper.selectById(Integer.valueOf(map.get("id").toString())); |
| | | uai.setLavePrice(new BigDecimal(lavePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | userCouponRecord.setCompanyId(userInfo.getCompanyId()); |
| | | userCouponRecord.setUserId(uid); |
| | | userCouponRecordService.insert(userCouponRecord); |
| | | |
| | | |
| | | // 订阅通知 |
| | | UserInfo userInfo1 = userInfoMapper.selectById(uid); |
| | | if(userInfo1.getOpenId()!=null){ |
| | | // 推送订阅消息 |
| | | WxMaSubscribeMessageUtil.push(userInfo1.getAppletsOpenId(),map.get("name").toString(),userCouponRecord.getMoney()); |
| | | } |
| | | |
| | | |
| | | //修改剩余可发放总金额 |
| | | lavePrice -= Double.valueOf(String.valueOf(map.get("money"))); |
| | | } |
| | |
| | | //修改剩余可发放总金额 |
| | | lavePrice -= Double.valueOf(String.valueOf(map.get("money"))); |
| | | num++; |
| | | |
| | | |
| | | // 订阅通知 |
| | | if(userInfo.getOpenId()!=null){ |
| | | // 推送订阅消息 |
| | | WxMaSubscribeMessageUtil.push(userInfo.getAppletsOpenId(),map.get("name").toString(),userCouponRecord.getMoney()); |
| | | } |
| | | } |
| | | UserActivityRegistered uar = userActivityRegisteredService.selectById(Integer.valueOf(map.get("id").toString())); |
| | | uar.setLavePrice(new BigDecimal(lavePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | //修改剩余可发放总金额 |
| | | lavePrice -= Double.valueOf(String.valueOf(map.get("money"))); |
| | | num++; |
| | | |
| | | // 订阅通知 |
| | | if(userInfo.getOpenId()!=null){ |
| | | // 推送订阅消息 |
| | | WxMaSubscribeMessageUtil.push(userInfo.getAppletsOpenId(),map.get("name").toString(),userCouponRecord.getMoney()); |
| | | } |
| | | } |
| | | UserActivityRegistered uar = userActivityRegisteredService.selectById(Integer.valueOf(map.get("id").toString())); |
| | | uar.setLavePrice(new BigDecimal(lavePrice).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |