| | |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.constant.RedisConstants; |
| | | import com.ruoyi.common.core.exception.GlobalException; |
| | | import com.ruoyi.order.api.entity.Order; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | sendSmsUtil.loginId); |
| | | } |
| | | |
| | | @Override |
| | | public String dispatchOrder(Order order) { |
| | | // 发送验证码 |
| | | String phone = order.getReservationPhone(); |
| | | String[] arr = {order.getOrderNumber()}; |
| | | sendSmsUtil.sendSms(new SendSmsUtil.SendSmsRequest(phone, sendSmsUtil.reservationId, arr)); |
| | | return "发送成功!"; |
| | | } |
| | | |
| | | private String sendPhoneCode(String phone, String redisKey, String templateId) { |
| | | // 生成随机 6位数字 验证码 |
| | | String phoneCode = RandomUtil.randomNumbers(6); |