增加 判断是否支付成功的检验逻辑 member/isPayed
This commit is contained in:
@@ -13,7 +13,6 @@ import com.sv.service.api.config.WechatPayService;
|
||||
import com.ydd.framework.core.common.Pagination;
|
||||
import com.ydd.framework.core.exception.ServiceException;
|
||||
import com.ydd.framework.core.service.impl.BaseServiceImpl;
|
||||
import com.ydd.oms.entity.enums.PayStatusEnum;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -168,13 +168,6 @@ public class OrderService extends BaseServiceImpl {
|
||||
orderMapper.updatePrepayId(orderSn,prepayId);
|
||||
}
|
||||
|
||||
/**
|
||||
* api
|
||||
*/
|
||||
public Order findByOrderSn(String orderSn, Integer memberId) {
|
||||
return orderMapper.findOrderSn(orderSn, memberId);
|
||||
}
|
||||
|
||||
/**
|
||||
* api 支付成功
|
||||
*
|
||||
@@ -259,7 +252,7 @@ public class OrderService extends BaseServiceImpl {
|
||||
order.setPayType(payTypeEnum.value);
|
||||
order.setPrice(price);
|
||||
order.setPayTime(new Date());
|
||||
order.setPayStatus(PayStatusEnum.PAYED.value.intValue());
|
||||
order.setPayStatus(PayStatusEnum.PAYED.value);
|
||||
order.setType(OrderTypeEnum.BASKETBALL_ORDER.value);
|
||||
order.setPlatformId(venue.getPlatformId());
|
||||
order.setMemberId(memberId);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class WechatPayService extends BaseServiceImpl {
|
||||
if (params.get("return_code").equals("SUCCESS")) {
|
||||
if (params.get("result_code").equals("SUCCESS")) {
|
||||
String orderSn = params.get("out_trade_no");
|
||||
Order order = orderService.findByOrderSn(orderSn,null);
|
||||
Order order = orderService.findOrderSn(orderSn,null);
|
||||
if (order.getPayStatus().intValue() > 0) {
|
||||
//已支付 不需要在判断
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user