mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-15 15:28:41 +08:00
支付订单,新增金额校验,新增打印日志
This commit is contained in:
@@ -102,6 +102,9 @@ public class PayController extends BaseController {
|
|||||||
if (StringUtils.isBlank(memberId)) {
|
if (StringUtils.isBlank(memberId)) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
|
||||||
}
|
}
|
||||||
|
if (dto.getPayAmount() == null) {
|
||||||
|
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||||
|
}
|
||||||
dto.setMemberId(memberId);
|
dto.setMemberId(memberId);
|
||||||
dto.setLockValue(lockValue);
|
dto.setLockValue(lockValue);
|
||||||
// redis锁
|
// redis锁
|
||||||
@@ -113,10 +116,10 @@ public class PayController extends BaseController {
|
|||||||
// Map<String, Object> map = orderService.payOrder(dto);
|
// Map<String, Object> map = orderService.payOrder(dto);
|
||||||
response = new RestApiResponse<>(map);
|
response = new RestApiResponse<>(map);
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
logger.warn("支付订单 warn", e);
|
logger.warn("支付订单 warn param:{}", dto.toString(), e);
|
||||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("支付订单 error", e);
|
logger.error("支付订单 error param:{}", dto.toString(), e);
|
||||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_ORDER_PAY_ERROR);
|
response = new RestApiResponse<>(ReturnCodeEnum.CODE_ORDER_PAY_ERROR);
|
||||||
} finally {
|
} finally {
|
||||||
// 支付订单解锁
|
// 支付订单解锁
|
||||||
|
|||||||
Reference in New Issue
Block a user