灵动sdk接入

master
zhangshanxue 2020-07-26 23:42:10 +08:00
parent 04779e01c1
commit 6ea74bd854
1 changed files with 7 additions and 8 deletions

View File

@ -64,7 +64,7 @@ public class MHTRechargeController {
// } // }
String response = "SUCCESS"; String response = "SUCCESS";
try { try {
String consumerid = parameterMap.get("consumerid"); // String consumerid = parameterMap.get("consumerid");
String ext =parameterMap.get("ext"); String ext =parameterMap.get("ext");
String gameCurrency ="0"; String gameCurrency ="0";
String mhtOrderAmt =parameterMap.get("mhtOrderAmt"); String mhtOrderAmt =parameterMap.get("mhtOrderAmt");
@ -72,8 +72,7 @@ public class MHTRechargeController {
String orderNo =parameterMap.get("orderNo"); String orderNo =parameterMap.get("orderNo");
String time =parameterMap.get("time"); String time =parameterMap.get("time");
String sign = parameterMap.get("sign"); String sign = parameterMap.get("sign");
String temp = "consumerid" + "=" + consumerid + "&" + String temp = "ext" + "=" + ext;
"ext" + "=" + ext;
String stringBuilder = "ext" + "=" + ext + "&" + String stringBuilder = "ext" + "=" + ext + "&" +
"mhtOrderAmt" + "=" + mhtOrderAmt + "&" + "mhtOrderAmt" + "=" + mhtOrderAmt + "&" +
"orderDetail" + "=" + orderDetail + "&" + "orderDetail" + "=" + orderDetail + "&" +
@ -88,7 +87,7 @@ public class MHTRechargeController {
String goodID; String goodID;
String uid; String uid;
if(ext.isEmpty()){ if(ext.isEmpty()){
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",consumerid,sig); LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ",orderNo,sig);
return "FAIL"; return "FAIL";
} }
@ -100,12 +99,12 @@ public class MHTRechargeController {
uid = split1[0]; uid = split1[0];
goodID = split1[1]; goodID = split1[1];
if(null==uid||uid.isEmpty()||null==goodID||goodID.isEmpty()){ if(null==uid||uid.isEmpty()||null==goodID||goodID.isEmpty()){
LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ,EXT={}",consumerid,sig,ext); LOGGER.info("callback==>roleUid={},sin derify fail,mine sign={} ,EXT={}",orderNo,sig,ext);
} }
CUserInfo cUserInfo = cuserDao.findUserInfo(Integer.valueOf(consumerid)); CUserInfo cUserInfo = cuserDao.findUserInfo(Integer.valueOf(uid));
if(cUserInfo == null){ if(cUserInfo == null){
LOGGER.info( "该用户无此角色"+consumerid); LOGGER.info( "该用户无此角色"+uid);
return "FAIL"; return "FAIL";
} }
@ -121,7 +120,7 @@ public class MHTRechargeController {
cPayOrder.setOrderId(orderNo); cPayOrder.setOrderId(orderNo);
cPayOrder.setServerId(cUserInfo.getServerid()); cPayOrder.setServerId(cUserInfo.getServerid());
cPayOrder.setDelivery_time(date); cPayOrder.setDelivery_time(date);
cPayOrder.setUserId(consumerid); cPayOrder.setUserId(uid);
Result result = null; Result result = null;
String userAddress = cuserDao.findUserAddress(cUserInfo.getId()); String userAddress = cuserDao.findUserAddress(cUserInfo.getId());
if (userAddress != null) { if (userAddress != null) {