|
|
package com.sunyo.energy.location.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.internal.$Gson$Preconditions;
|
|
|
import com.sunyo.energy.location.controller.response.ResultJson;
|
|
|
import com.sunyo.energy.location.dao.PayRecordsMapper;
|
|
|
import com.sunyo.energy.location.dao.PayResponseMapper;
|
...
|
...
|
@@ -107,7 +108,12 @@ public class PayRseponeController { |
|
|
payResponse.setPaytype(PAYTYPE);
|
|
|
payResponse.setSign(SIGN);
|
|
|
try {
|
|
|
|
|
|
int msg = 0;
|
|
|
/**
|
|
|
* 解决建行反馈多次原因
|
|
|
*/
|
|
|
if(payResponseMapperl.count(ORDERID) == 0){
|
|
|
int i = payResponseMapperl.insertSelective(payResponse);
|
|
|
log.info("插入数据库{},信息{}",i, payResponse);
|
|
|
if (i > 0) {
|
...
|
...
|
@@ -125,15 +131,10 @@ public class PayRseponeController { |
|
|
if ("Y".equals(SUCCESS)) {
|
|
|
payRecords.setOrdernumber(ORDERID);
|
|
|
payRecords.setReamke3("1");
|
|
|
} else {
|
|
|
payRecords.setOrdernumber(ORDERID);
|
|
|
payRecords.setReamke3("0");
|
|
|
}
|
|
|
/**
|
|
|
* 修改订单支付状态
|
|
|
*/
|
|
|
payRecordsMapper.updateOrderStatus(payRecords);
|
|
|
|
|
|
// 查询是水还是电
|
|
|
boolean selectType = payRecordsMapper.selectType(ORDERID);
|
|
|
if (selectType) {
|
...
|
...
|
@@ -210,8 +211,22 @@ public class PayRseponeController { |
|
|
}
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
payRecords.setOrdernumber(ORDERID);
|
|
|
payRecords.setReamke3("0");
|
|
|
/**
|
|
|
* 修改订单支付状态
|
|
|
*/
|
|
|
payRecordsMapper.updateOrderStatus(payRecords);
|
|
|
}
|
|
|
}
|
|
|
return i == 1 ? new ResultJson("200", "支付回执信息接受成功") : new ResultJson("500", "支付回执信息接受失败");
|
|
|
}else {
|
|
|
return 1 == 1 ? new ResultJson("200", "2次调用") : new ResultJson("500", "2次调用");
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
log.info("系统异常-----------");
|
...
|
...
|
@@ -219,4 +234,5 @@ public class PayRseponeController { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|