public JSONObject createNotifyInfo(PayOrder payOrder, boolean isFirst) { String url = createNotifyUrl(payOrder, "2"); if(isFirst) { int result = baseInsertMchNotify(payOrder.getPayOrderId(), payOrder.getMchId(), payOrder.getMchOrderNo(), PayConstant.MCH_NOTIFY_TYPE_PAY, url); _log.info("增加商户通知记录,orderId={},result:{}", payOrder.getPayOrderId(), result); } int count = 0; if(!isFirst) { MchNotify mchNotify = baseSelectMchNotify(payOrder.getPayOrderId()); if(mchNotify != null) count = mchNotify.getNotifyCount(); } JSONObject object = new JSONObject(); object.put("method", "GET"); object.put("url", url); object.put("orderId", payOrder.getPayOrderId()); object.put("count", count); object.put("createTime", System.currentTimeMillis()); return object; }
public JSONObject createNotifyInfo(RefundOrder refundOrder, boolean isFirst) { String url = createNotifyUrl(refundOrder, "2"); if(isFirst) { int result = baseInsertMchNotify(refundOrder.getRefundOrderId(), refundOrder.getMchId(), refundOrder.getMchRefundNo(), PayConstant.MCH_NOTIFY_TYPE_REFUND, url); _log.info("增加商户通知记录,orderId={},result:{}", refundOrder.getRefundOrderId(), result); } int count = 0; if(!isFirst) { MchNotify mchNotify = baseSelectMchNotify(refundOrder.getRefundOrderId()); if(mchNotify != null) count = mchNotify.getNotifyCount(); } JSONObject object = new JSONObject(); object.put("method", "GET"); object.put("url", url); object.put("orderId", refundOrder.getRefundOrderId()); object.put("count", count); object.put("createTime", System.currentTimeMillis()); return object; }
public JSONObject createNotifyInfo(TransOrder transOrder, boolean isFirst) { String url = createNotifyUrl(transOrder, "2"); if(isFirst) { int result = baseInsertMchNotify(transOrder.getTransOrderId(), transOrder.getMchId(), transOrder.getMchTransNo(), PayConstant.MCH_NOTIFY_TYPE_TRANS, url); _log.info("增加商户通知记录,orderId={},result:{}", transOrder.getTransOrderId(), result); } int count = 0; if(!isFirst) { MchNotify mchNotify = baseSelectMchNotify(transOrder.getTransOrderId()); if(mchNotify != null) count = mchNotify.getNotifyCount(); } JSONObject object = new JSONObject(); object.put("method", "GET"); object.put("url", url); object.put("orderId", transOrder.getTransOrderId()); object.put("count", count); object.put("createTime", System.currentTimeMillis()); return object; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode()); result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode()); result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); result = prime * result + ((getNotifyCount() == null) ? 0 : getNotifyCount().hashCode()); result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getLastNotifyTime() == null) ? 0 : getLastNotifyTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } }
@Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } MchNotify other = (MchNotify) that; return (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) && (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo())) && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) && (this.getNotifyCount() == null ? other.getNotifyCount() == null : this.getNotifyCount().equals(other.getNotifyCount())) && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getLastNotifyTime() == null ? other.getLastNotifyTime() == null : this.getLastNotifyTime().equals(other.getLastNotifyTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); }