Commit 176783e3 authored by yaobaizheng's avatar yaobaizheng

发送次数 zset计算 还有swagger上不能用 /

parent b62a85f1
......@@ -181,7 +181,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
RedisUtil.delZset(key, 0, startTime.getTime());
Long count = RedisUtil.countZset(key, startTime.getTime(), now.getTime());
if (count == null || count <= limitSms) {
RedisUtil.addZset(key, phone, now.getTime());
RedisUtil.addZset(key, now.getTime(), now.getTime());
} else {
throw new ServiceException("短信发送频繁,每日短信发送次数为" + limitSms);
}
......
......@@ -19,7 +19,7 @@ import javax.validation.constraints.Size;
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ApiModel(value = "忘记/修改密码")
@ApiModel(value = "忘记 修改密码")
public class ForgetVo {
@NotEmpty(message = "密码不能为空")
......
......@@ -23,8 +23,8 @@ import javax.validation.constraints.Size;
public class RegisterVo {
@NotEmpty(message = "密码不能为空")
@Size(min = 6,max = 12,message = "密码长度需要在6到12之间")
@Pattern(regexp = "^[a-zA-Z0-9_]{6,12}$", message = "密码只能包含字母和数字")
@Size(min = 6,max = 20,message = "密码长度需要在6到20之间")
@Pattern(regexp = "^[a-zA-Z0-9~!@#$%^&*()_+?]{6,20}$", message = "密码长度必须大于等于6位,小于等于20")
@ApiModelProperty(value = "密码",required = true)
private String password;
@NotEmpty(message = "手机号不能为空")
......@@ -36,8 +36,8 @@ public class RegisterVo {
private String code;
@NotEmpty(message = "密码不能为空")
@Size(min = 6,max = 12,message = "密码长度需要在6到12之间")
@Pattern(regexp = "^[a-zA-Z0-9_]{6,12}$", message = "密码只能包含字母和数字")
@Size(min = 6,max = 20,message = "密码长度需要在6到20之间")
@Pattern(regexp = "^[a-zA-Z0-9~!@#$%^&*()_+?]{6,20}$", message = "密码长度必须大于等于6位,小于等于20")
@ApiModelProperty(value = "确认密码",required = true)
private String checkPassword;
}
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