|
@@ -8,10 +8,7 @@ import com.ljsd.jieling.thrift.idl.Result;
|
|
|
import com.ljsd.jieling.thrift.pool.ThriftClient;
|
|
import com.ljsd.jieling.thrift.pool.ThriftClient;
|
|
|
import com.ljsd.pojo.ResMsg;
|
|
import com.ljsd.pojo.ResMsg;
|
|
|
import com.ljsd.redis.RedisKey;
|
|
import com.ljsd.redis.RedisKey;
|
|
|
-import com.ljsd.util.BaseGlobal;
|
|
|
|
|
-import com.ljsd.util.StringUtils;
|
|
|
|
|
-import com.ljsd.util.TimeUtil;
|
|
|
|
|
-import com.ljsd.util.XmlParser;
|
|
|
|
|
|
|
+import com.ljsd.util.*;
|
|
|
import com.mongodb.BasicDBObject;
|
|
import com.mongodb.BasicDBObject;
|
|
|
import com.mongodb.DBObject;
|
|
import com.mongodb.DBObject;
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
@@ -54,12 +51,10 @@ public class PayCallbackController extends HttpServlet {
|
|
|
request.setCharacterEncoding("UTF-8");
|
|
request.setCharacterEncoding("UTF-8");
|
|
|
response.setCharacterEncoding("UTF-8");
|
|
response.setCharacterEncoding("UTF-8");
|
|
|
response.setContentType("application/json; charset=utf-8");
|
|
response.setContentType("application/json; charset=utf-8");
|
|
|
-// String uid = request.getParameter("userId");
|
|
|
|
|
|
|
+ LOGGER.info("PayCallbackController json params = {}",RequestLogger.logRequestParams(request));
|
|
|
String sign = request.getParameter("sign");
|
|
String sign = request.getParameter("sign");
|
|
|
String nt_data = request.getParameter("nt_data");
|
|
String nt_data = request.getParameter("nt_data");
|
|
|
String md5Sign = request.getParameter("md5Sign");
|
|
String md5Sign = request.getParameter("md5Sign");
|
|
|
- LOGGER.info("PayCallbackController sign = {}, nt_data = {}, md5Sign = {}, app_id = {}", sign, nt_data,
|
|
|
|
|
- md5Sign, request.getParameter("app_id"));
|
|
|
|
|
ResMsg resMsg = new ResMsg();
|
|
ResMsg resMsg = new ResMsg();
|
|
|
resMsg.setCode(1);
|
|
resMsg.setCode(1);
|
|
|
DBObject payInfo = new BasicDBObject();
|
|
DBObject payInfo = new BasicDBObject();
|
|
@@ -124,21 +119,7 @@ public class PayCallbackController extends HttpServlet {
|
|
|
Result result = ThriftClient.deliveryRecharge((int) payInfo.get("uid"), (String) payInfo.get("pay_item"), (String) payInfo.get("open_id"),
|
|
Result result = ThriftClient.deliveryRecharge((int) payInfo.get("uid"), (String) payInfo.get("pay_item"), (String) payInfo.get("open_id"),
|
|
|
(String) payInfo.get("billno"), Long.parseLong((String) payInfo.get("creattime")), (int) payInfo.get("money"));
|
|
(String) payInfo.get("billno"), Long.parseLong((String) payInfo.get("creattime")), (int) payInfo.get("money"));
|
|
|
|
|
|
|
|
-// URIBuilder uriBuilder = new URIBuilder("http://127.0.0.1:7915/deliveryRecharge");
|
|
|
|
|
-// uriBuilder.addParameter("uid", (String) payInfo.get("uid"));
|
|
|
|
|
-// uriBuilder.addParameter("goodsId", (String) payInfo.get("pay_item"));
|
|
|
|
|
-// uriBuilder.addParameter("openId", (String) payInfo.get("open_id"));
|
|
|
|
|
-// uriBuilder.addParameter("orderId", (String) payInfo.get("cporderId"));
|
|
|
|
|
-// uriBuilder.addParameter("orderTime", (String) payInfo.get("creattime"));
|
|
|
|
|
-// uriBuilder.addParameter("amount", String.valueOf((int) payInfo.get("money")));
|
|
|
|
|
-//
|
|
|
|
|
-// HttpGet httpGet = new HttpGet(uriBuilder.build().toString());
|
|
|
|
|
-// CloseableHttpResponse resp = httpClient.execute(httpGet);
|
|
|
|
|
-
|
|
|
|
|
-// String result = EntityUtils.toString(resp.getEntity());
|
|
|
|
|
LOGGER.info("deliveryRecharge result = {}", result);
|
|
LOGGER.info("deliveryRecharge result = {}", result);
|
|
|
-
|
|
|
|
|
-// resp.close();
|
|
|
|
|
if (result == null || result.resultCode != 1) {
|
|
if (result == null || result.resultCode != 1) {
|
|
|
resMsg.setCode(1);
|
|
resMsg.setCode(1);
|
|
|
resMsg.setMsg("发货失败");
|
|
resMsg.setMsg("发货失败");
|