添加支付密码
This commit is contained in:
@@ -294,7 +294,7 @@ public class PayService {
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result accountPay(String orderId, String memberId, String token) {
|
||||
public Result accountPay(String orderId, String memberId, String token,String pwd) {
|
||||
if (ObjectUtil.isEmpty(orderId) || ObjectUtil.isEmpty(memberId)) {
|
||||
return Result.fail("参数错误");
|
||||
}
|
||||
@@ -305,6 +305,19 @@ public class PayService {
|
||||
}
|
||||
|
||||
|
||||
TbUserInfo userInfo= tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getUserId()));
|
||||
if(ObjectUtil.isEmpty(userInfo)){
|
||||
return Result.fail("未获取到用户信息");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(!userInfo.getPwd().equals(MD5Utils.md5(pwd))){
|
||||
return Result.fail("支付密码错误");
|
||||
}
|
||||
|
||||
|
||||
if (!"unpaid".equals(orderInfo.getStatus()) && !"paying".equals(orderInfo.getStatus()) ) {
|
||||
return Result.fail("订单出状态异常");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user