bruce

fix

......@@ -97,16 +97,16 @@ public class PickPayBiz {
public Boolean isValidNotify(Map<String, String> result) {
if (UnionPayUtil.checkSign(result)) {
OutpropApplyPayInfo update = new OutpropApplyPayInfo();
String tradeNo = result.get("billNo");
update.setTradeNo(tradeNo);
if (result.get("billStatus").equals(UnionConstants.NOTIFY_PAY_STATUS)) {
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
TransactionStatus status = transactionManager.getTransaction(def);
try {
String tradeNo = result.get("billNo");
OutpropApplyPayInfo info = outpropApplyPayDao.selectByTradeNo(tradeNo);
if (!info.getStatus().equals("2")) {
OutpropApplyPayInfo update = new OutpropApplyPayInfo();
update.setTradeNo(tradeNo);
update.setStatus("2");
outpropApplyPayDao.update(update);
......@@ -129,14 +129,10 @@ public class PickPayBiz {
transactionManager.rollback(status);
}
} else if (result.get("billStatus").equals("REFUND")) {
OutpropApplyPayInfo update = new OutpropApplyPayInfo();
update.setTradeNo(result.get("billNo"));
update.setStatus("4");//退款
outpropApplyPayDao.update(update);
return true;
} else {
OutpropApplyPayInfo update = new OutpropApplyPayInfo();
update.setTradeNo(result.get("billNo"));
update.setStatus("3");//支付失败
outpropApplyPayDao.update(update);
return true;
......