密码强度调整 PC端新增安全检查调整
This commit is contained in:
parent
f3be062ec3
commit
6571a71346
|
|
@ -3,6 +3,7 @@ package com.rzyc.advice;
|
|||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
|
|
@ -23,6 +24,7 @@ import java.util.List;
|
|||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@Profile({"dev","test"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
@Profile({"dev","test","yun"})
|
||||
@Profile({"dev","test"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1173,6 +1173,8 @@ public class MinWorkController extends BaseController{
|
|||
}
|
||||
}
|
||||
SysUser sysUser = super.getUser(sysUserId);
|
||||
|
||||
zhiFaRen = sysUser.getChinaname();
|
||||
//隐患来源
|
||||
String htsource = super.getUnitName(sysUserId);
|
||||
BookEntCheck bookEntCheck = new BookEntCheck();
|
||||
|
|
@ -1393,6 +1395,7 @@ public class MinWorkController extends BaseController{
|
|||
ChkBillDetailWithBLOBs billDetail = chkBillDetailMapper.selectByPrimaryKey(checkDetail.getChkbilldetailid());
|
||||
if(null != billDetail){
|
||||
checkDetail.setBookentcheckdetailid(RandomNumber.getUUid());
|
||||
checkDetail.setBookentcheckid(bookEntCheckId);
|
||||
checkDetail.setCheckitemno(checkItemIndex);
|
||||
checkDetail.setChkbilldetailid(billDetail.getChkbilldetailid());
|
||||
checkDetail.setCheckobjectname(billDetail.getCheckobjectname());
|
||||
|
|
|
|||
|
|
@ -994,6 +994,8 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
@ResponseBody
|
||||
public SingleResult<String> changeUser(@Valid ChangeUserDto changeUserDto)throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
|
||||
if(PasswdFactory.passwdVerify(changeUserDto.getSyspassword())){
|
||||
SysUser sysUser = new SysUser();
|
||||
BeanUtils.copyProperties(sysUser,changeUserDto);
|
||||
System.out.println("sysUser -> "+JSONArray.toJSONString(sysUser));
|
||||
|
|
@ -1061,6 +1063,11 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
result.setMessage(Message.HAS_USERNAME);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
result.setCode(Code.ERROR.getCode());
|
||||
result.setMessage(Message.PASSWD_NOT);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import java.security.MessageDigest;
|
|||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Base64;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Author: itsnows
|
||||
|
|
@ -34,5 +35,24 @@ public class PasswdFactory {
|
|||
return passwd;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证密码是否符合要求
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2023/11/17 10:49
|
||||
*/
|
||||
public static Boolean passwdVerify(String passwd)throws Exception{
|
||||
String regular = "^(?=.*[a-zA-Z])(?=.*\\d).{10,}$";
|
||||
return Pattern.matches(regular, passwd);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
System.out.println(PasswdFactory.passwdVerify("abcd123456"));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,125 +34,24 @@ public class Message {
|
|||
*/
|
||||
public static final String MA_TYPE_ERROR = "模块分类type为null";
|
||||
|
||||
/**
|
||||
* 没有该模块分类
|
||||
*/
|
||||
public static final String NO_MA_TYPE = "没有该模块分类";
|
||||
/**
|
||||
* 模块子分类为null
|
||||
*/
|
||||
public static final String SL_TYPE_ERROR = "模块子分类为null";
|
||||
/**
|
||||
* 没有该模块子分类
|
||||
*/
|
||||
public static final String NO_SL_TYPE = "没有该模块子分类";
|
||||
|
||||
public static final String NO_USER = "没有该用户";
|
||||
|
||||
public static final String DRIVER_NOT_ATTESTATION = "请先司机认证!";
|
||||
|
||||
public static final String NOT_ENT = "企业数据异常";
|
||||
|
||||
|
||||
/**
|
||||
* 解密错误
|
||||
*/
|
||||
public static final String DECRYPT_ERROR = "解密错误";
|
||||
|
||||
public static final String PASSWORD_ERROR = "密码错误";
|
||||
|
||||
public static final String PASSWORD_OR_ACCOUNT_ERROR = "账户或密码错误";
|
||||
|
||||
public static final String NOT_AUTH = "没有权限";
|
||||
|
||||
public static final String CODE_ERROT = "验证码错误";
|
||||
|
||||
public static final String REGISTERED = "该手机已注册";
|
||||
|
||||
public static final String REGISTERED_USER = "该账号已注册";
|
||||
|
||||
public static final String CODE_TIME_OUT = "验证码已过期";
|
||||
|
||||
public static final String THUMBSUP_SUCCESS = "点赞成功";
|
||||
|
||||
public static final String THUMBSUP_FAIL = "点赞失败";
|
||||
|
||||
public static final String CANCLE_THUMBSUP_SUCCESS = "取消赞成功";
|
||||
|
||||
public static final String OLD_PASSWORD_ERROR = "旧密码输入错误";
|
||||
|
||||
public static final String USER_TOKEN = "该账号在其他地方登录";
|
||||
|
||||
public static final String SIGNINED = "您已签到";
|
||||
|
||||
public static final String SIG_ERROR = "签名错误";
|
||||
|
||||
public static final String BLACKED = "已加入黑名单";
|
||||
|
||||
public static final String JOINED = "已报名";
|
||||
|
||||
public static final String BOXED = "盒子已被绑定";
|
||||
|
||||
public static final String NOT_JOIN = "不能参加自己发布的约骑";
|
||||
|
||||
public static final String COUPON_ERROT = "优惠券出错";
|
||||
|
||||
public static final String HAS_MOBILE = "已绑定的手机号";
|
||||
|
||||
public static final String HAS_USERNAME = "用户名已存在";
|
||||
|
||||
public static final String HAS_BIND = "已绑定第三方账号";
|
||||
|
||||
public static final String BOXID_ERROR = "盒子编号错误";
|
||||
|
||||
public static final String NOT_BIND_BOX = "未绑定盒子";
|
||||
|
||||
public static final String DELETE_FAIL = "删除失败";
|
||||
|
||||
public static final String PERSON = "约骑报名人数已满";
|
||||
|
||||
public static final String DIFFERENCE_PASSWORD = "密码和确认密码不同,请重新输入";
|
||||
|
||||
public static final String SEND_CODE_ERROR = "验证码发送失败";
|
||||
|
||||
public static final String SEND_CODE_SUCCESS = "验证码发送成功";
|
||||
|
||||
public static final String ADD_GOOD_SOURCE_SUCCESS = "新增发货单成功";
|
||||
|
||||
public static final String ADD_SUBACCOUNT_SUCCESS = "新增子账号成功";
|
||||
|
||||
public static final String CHANGE_SUBACCOUNT_SUCCESS = "子账号修改成功";
|
||||
|
||||
public static final String CODE_LOGIN_SUCCESS = "验证码登录成功";
|
||||
|
||||
public static final String REGISTER_SUCCESS = "注册成功";
|
||||
|
||||
public static final String LOGIN_SUCCESS = "登录成功";
|
||||
|
||||
public static final String CHANGE_CARRIER_SUCCESS = "承运人修改成功";
|
||||
|
||||
public static final String ADD_CIRRIER_SUCCESS = "新增承运商成功";
|
||||
|
||||
public static final String ATTESTATION_SUCCES = "认证成功";
|
||||
|
||||
public static final String ADDDRIVER_SUCCESS = "添加司机成功";
|
||||
|
||||
public static final String CHANGEDRIVER_SUCCESS = "修改司机成功";
|
||||
|
||||
public static final String ENABLE_SUCCESS = "启用成功";
|
||||
|
||||
public static final String DISABLE_SUCCESS = "禁用成功";
|
||||
|
||||
public static final String ADDCAR_SUCCESS = "新增运输工具成功";
|
||||
|
||||
public static final String ORDER_DISPUTE_ADOPT = "价争议审核成功";
|
||||
|
||||
public static final String ORDER_DISPUTE_FAIL = "价争议审核成功";
|
||||
|
||||
public static final String PASSWORD_CHANGE_SUCCESS = "密码修改成功";
|
||||
|
||||
public static final String HSE_ENTUSER = "还存在下级岗位,不能禁用";
|
||||
|
||||
public static final String HAS_ENT = "企业名已存在,请重新输入。";
|
||||
|
||||
public static final String HAS_CHKGOV = "清单名已存在,请重新输入。";
|
||||
|
|
@ -176,4 +75,6 @@ public class Message {
|
|||
public static final String NOT_ONLY_INSPECTION_CYCLE = "已经存在周期巡检,仅仅允许一个";
|
||||
|
||||
public static final String MOBILE_IS_CREATED="法人手机号已存在";
|
||||
|
||||
public static final String PASSWD_NOT="密码强度不足,请使用字母数组组合,且长度需超过10位";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user