后端:修复支付成功回调订单时,错误的修改状态

pull/1/head
YunaiV 2019-04-22 21:55:44 +08:00
parent f46a4f7010
commit 8e38bf000c
2 changed files with 5 additions and 5 deletions

View File

@ -11,14 +11,14 @@ const cacheKeys = {
/// 设置 loginToken分为 accessToken 和 refreshToken
export function setLoginToken(accessToken, refreshToken) {
setLocalStorage(cacheKeys.accessTokenKey, accessToken);
setLocalStorage(cacheKeys.refreshTokenKey, refreshToken);
setLocalStorage(cacheKeys.ACCESS_TOKEN, accessToken);
setLocalStorage(cacheKeys.REFRESH_TOKEN, refreshToken);
}
export function getLoginToken() {
const res = {};
res[cacheKeys.accessTokenKey] = getLocalStorage(cacheKeys.accessTokenKey);
res[cacheKeys.refreshTokenKey] = getLocalStorage(cacheKeys.refreshTokenKey);
res[cacheKeys.ACCESS_TOKEN] = getLocalStorage(cacheKeys.ACCESS_TOKEN);
res[cacheKeys.REFRESH_TOKEN] = getLocalStorage(cacheKeys.REFRESH_TOKEN);
return res;
}

View File

@ -611,7 +611,7 @@ public class OrderServiceImpl implements OrderService {
return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_PAY_AMOUNT_ERROR.getCode()).getMessage();
}
OrderDO updateOrderObj = new OrderDO()
.setStatus(OrderStatusEnum.ALREADY_SHIPMENT.getValue())
.setStatus(OrderStatusEnum.WAIT_SHIPMENT.getValue())
.setPayAmount(payAmount)
.setPaymentTime(new Date());
int updateCount = orderMapper.updateByIdAndStatus(order.getId(), order.getStatus(), updateOrderObj);