区分第三方充值还是非第三方充值

master
gaojie 2019-03-26 14:45:41 +08:00
parent 4811b4b200
commit 07e1d0fe86
3 changed files with 12 additions and 5 deletions

View File

@ -59,8 +59,11 @@ public class RechargeController {
ResultVo resultVo = new ResultVo("1038", "该用户无此角色"); ResultVo resultVo = new ResultVo("1038", "该用户无此角色");
return JsonUtil.getInstence().getGson().toJson(resultVo); return JsonUtil.getInstence().getGson().toJson(resultVo);
} }
int itemNum = Integer.parseInt(activityExtra)+Integer.parseInt(stone); int isOfficial = 1; // 0: 官方充值 1:第三方充值
String payitem = "1002#"+ itemNum+"#1"; if (YsjConstant.GOOGLE.equals(payType) ||YsjConstant.APPSTORE.equals(payType) || YsjConstant.TSTORE.equals(payType) ){
isOfficial = 0;
}
CPayOrder cPayOrder = cuserDao.getCpayOrderByOrderId(pOrderId); CPayOrder cPayOrder = cuserDao.getCpayOrderByOrderId(pOrderId);
ResultVo resultVo; ResultVo resultVo;
if (cPayOrder != null) { if (cPayOrder != null) {
@ -82,7 +85,7 @@ public class RechargeController {
cPayOrder.setCreditId(creditId); cPayOrder.setCreditId(creditId);
Result result = null; Result result = null;
String userAddress = cuserDao.findUserInfo(Integer.parseInt(serverCode), Integer.parseInt(creditId)); String userAddress = cuserDao.findUserInfo(Integer.parseInt(serverCode), Integer.parseInt(creditId));
LOGGER.info("userAddress={},payitem={} ",userAddress,payitem); LOGGER.info("userAddress={} ",userAddress);
if (userAddress != null) { if (userAddress != null) {
String[] split = userAddress.split(":"); String[] split = userAddress.split(":");
String ip = split[0]; String ip = split[0];
@ -93,7 +96,7 @@ public class RechargeController {
LOGGER.info("serviceKey : " + serviceKey); LOGGER.info("serviceKey : " + serviceKey);
try { try {
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey); rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
result = rPCClient.getClient().deliveryRecharge(Integer.parseInt(creditId), payitem,productId, Double.parseDouble(amount)); result = rPCClient.getClient().deliveryRecharge(Integer.parseInt(creditId),stone,productId, amount,activityExtra,isOfficial);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -30,4 +30,8 @@ public class YsjConstant {
public static String TW_ANDROID_GameCode= "twysj"; public static String TW_ANDROID_GameCode= "twysj";
public static String GOOGLE = "google";
public static String APPSTORE = "appstore";
public static String TSTORE = "tstore";
} }

View File

@ -16,6 +16,6 @@ service RPCRequestIFace{
Result testdeliveryGood(1:i32 userId, 2:string payitem) throws (1:common.InvalidOperException ouch); Result testdeliveryGood(1:i32 userId, 2:string payitem) throws (1:common.InvalidOperException ouch);
Result deliveryRecharge(1:i32 userId, 2:string rewardItems,3: string productId,4: double amount) throws (1:common.InvalidOperException ouch); Result deliveryRecharge(1:i32 userId, 2:string stone,3: string productId,4: string amount,5: string activityExtra, 6:i32 isOfficial) throws (1:common.InvalidOperException ouch);
Result sendMail(1:i32 userId, 2:string rewardItems,3:string title,4:string content) throws (1:common.InvalidOperException ouch); Result sendMail(1:i32 userId, 2:string rewardItems,3:string title,4:string content) throws (1:common.InvalidOperException ouch);
} }