package com.iplatform.pay;
|
|
import com.iplatform.model.po.S_pay_notify;
|
import com.iplatform.pay.service.PlatformOrderServiceImpl;
|
import com.walker.pay.PayStatus;
|
import com.walker.pay.callback.AbstractOrderCallback;
|
|
public abstract class PlatformOrderCallback extends AbstractOrderCallback {
|
|
/**
|
* 是否已经存在该订单通知。
|
* @param s_pay_notify 通知记录
|
// * @param notifyId
|
* @return
|
*/
|
protected boolean isAlreadySuccessNotify(S_pay_notify s_pay_notify){
|
// long orderId = Long.parseLong(notifyValue.getOrderId());
|
// S_pay_notify exist = this.orderService.get(new S_pay_notify(orderId));
|
if(s_pay_notify != null && s_pay_notify.getPay_status().equals(PayStatus.Success.getIndex())){
|
logger.warn("订单通知已经接收,而且支付成功,不再重复处理,notifyId = {}, orderId = {}", s_pay_notify.getNotify_id(), s_pay_notify.getOrder_id());
|
return true;
|
}
|
return false;
|
}
|
|
/**
|
* 根据订单id查询已存在的通知记录。
|
* @param orderId
|
* @return
|
*/
|
protected S_pay_notify getExistNotifyRecord(long orderId){
|
return this.orderService.get(new S_pay_notify(orderId));
|
}
|
|
public void setOrderService(PlatformOrderServiceImpl orderService) {
|
this.orderService = orderService;
|
}
|
|
protected PlatformOrderServiceImpl orderService;
|
}
|