余额支付密码开关校验
This commit is contained in:
@@ -94,6 +94,6 @@ public class UserInfo implements Serializable {
|
|||||||
|
|
||||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
private Integer usePayTwd;
|
private Integer usePayPwd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
|
|||||||
throw new ApiNotPrintException("验证码错误");
|
throw new ApiNotPrintException("验证码错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
userInfo.setUsePayTwd(userInfoPwdEditDTO.getUsePayPwd());
|
userInfo.setUsePayPwd(userInfoPwdEditDTO.getUsePayPwd());
|
||||||
userInfo.setPayPwd(SecureUtil.md5(userInfoPwdEditDTO.getPayPwd()));
|
userInfo.setPayPwd(SecureUtil.md5(userInfoPwdEditDTO.getPayPwd()));
|
||||||
boolean b = updateById(userInfo);
|
boolean b = updateById(userInfo);
|
||||||
if (b) {
|
if (b) {
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class PayServiceImpl implements PayService {
|
|||||||
AssertUtil.isNull(shopUser, "会员不存在");
|
AssertUtil.isNull(shopUser, "会员不存在");
|
||||||
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
|
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
|
||||||
AssertUtil.isNull(userInfo, "用户信息不存在");
|
AssertUtil.isNull(userInfo, "用户信息不存在");
|
||||||
if (userInfo.getUsePayTwd() == 1 ) {
|
if (userInfo.getUsePayPwd() == 1 ) {
|
||||||
if (userInfo.getPayPwd() == null || !userInfo.getPayPwd().equals(MD5Util.md5AsHex(payParam.getPwd()))) {
|
if (userInfo.getPayPwd() == null || !userInfo.getPayPwd().equals(MD5Util.md5AsHex(payParam.getPwd()))) {
|
||||||
return CzgResult.failure("支付密码错误");
|
return CzgResult.failure("支付密码错误");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user