瑞吉外卖实战学习--16、登录短信验证

gitee网址本项目采用的技术是:springboot + mybatisPlus本篇文章采用的验证方式是阿里短信验证 使用链接阿里短信发送的使用教程。
摘要由CSDN通过智能技术生成

前言

本项目gitee位置:gitee网址
本项目采用的技术是:springboot + mybatisPlus
本篇文章采用的验证方式是阿里短信验证 使用链接阿里短信发送的使用教程
在这里插入图片描述

环境准备(根据mybatisPlus 规范实体类和接口)

1、User实体类

package com.example.ruiji_demo.entity;

/**
 * @author jitwxs
 * @date 2024年04月06日 21:14
 */
public class User {
   
    private  static final long serialVersionUID=1L;

    private Long id;

    private String name;

    private String phone;

    private String sex;

    private String idNumber;

    private String avatar;

    private Integer status;
}

2、mapper文件

package com.example.ruiji_demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.ruiji_demo.entity.User;

public interface UserMapper extends BaseMapper<User> {
   
}

3、service文件

package com.example.ruiji_demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.ruiji_demo.entity.User;

public interface UserService extends IService<User> {
   
}

4、impl文件

package com.example.ruiji_demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.ruiji_demo.entity.User;
import com.example.ruiji_demo.mapper.UserMapper;
import com.example.ruiji_demo.service.UserService;

/**
 * @author jitwxs
 * @date 2024年04月06日 21:18
 */
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
   
}

5、随机生成验证码的工具类

package com.example.ruiji_demo.utils;

import java.util.Random;

/**
 * @author jitwxs
 * @date 2024年04月06日 21:25
 */
public class ValidateCodeUtils {
   
    
  • 14
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值