Commit 982e7701 by ZhangYunfei

新增修改用户手机号功能

parent 72636f02
......@@ -66,6 +66,15 @@ public class MemberController extends AbstractController {
memberService.updatephone(params,request,response);
return R.ok();
}
/**
* 获取验证码
*/
@RequestMapping("/authApi/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = memberService.getVerificationCode(params,request,response);
return R.ok();
}
/**
* 列表
......
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.TimescodeChphoneEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Mapper
@Component
public interface TimescodeChphoneDao extends BaseMapper<TimescodeChphoneEntity> {
}
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.TimescodeChphoneIpEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Mapper
@Component
public interface TimescodeChphoneIpDao extends BaseMapper<TimescodeChphoneIpEntity> {
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Data
@AllArgsConstructor
@TableName("timescode_chPhone")
public class TimescodeChphoneEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId(type = IdType.INPUT)
private String phone;
/**
* $column.comments
*/
private String date;
/**
* $column.comments
*/
private Integer times;
/**
* $column.comments
*/
private Integer timesValidate;
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Data
@AllArgsConstructor
@TableName("timescode_chPhone_ip")
public class TimescodeChphoneIpEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId(type = IdType.INPUT)
private String ip;
/**
* $column.comments
*/
private String date;
/**
* $column.comments
*/
private Integer timesIp;
}
......@@ -25,5 +25,7 @@ public interface MemberService extends IService<MemberEntity> {
void updatephone(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
}
......@@ -103,7 +103,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
//写入session
HttpSession session = request.getSession();
session.setAttribute("subjoin",pass);//验证码
session.setAttribute("tel",pass);//手机号
session.setAttribute("tel",phone);//手机号
session.setAttribute("date",System.currentTimeMillis());//毫秒值
//发送状态
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.office.modules.manage.dao.TimescodeChphoneDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="io.office.modules.manage.entity.TimescodeChphoneEntity" id="timescodeChphoneMap">
<result property="phone" column="phone"/>
<result property="date" column="date"/>
<result property="times" column="times"/>
<result property="timesValidate" column="times_validate"/>
</resultMap>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.office.modules.manage.dao.TimescodeChphoneIpDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="io.office.modules.manage.entity.TimescodeChphoneIpEntity" id="timescodeChphoneIpMap">
<result property="ip" column="ip"/>
<result property="date" column="date"/>
<result property="timesIp" column="times_ip"/>
</resultMap>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment