添加支付密码
This commit is contained in:
@@ -58,9 +58,10 @@ public class PayController {
|
||||
@GetMapping("accountPay")
|
||||
public Result accountPay(@RequestHeader("token") String token,
|
||||
@RequestParam("orderId") String orderId,
|
||||
@RequestParam("memberId") String memberId
|
||||
@RequestParam("memberId") String memberId,
|
||||
@RequestParam("pwd") String pwd
|
||||
) {
|
||||
return payService.accountPay(orderId, memberId, token);
|
||||
return payService.accountPay(orderId, memberId, token,pwd);
|
||||
}
|
||||
|
||||
@RequestMapping("groupOrderPay")
|
||||
|
||||
@@ -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