generated from root/miduo_server
发货修改
parent
d7d6029e33
commit
40ee81df65
|
@ -1,6 +1,7 @@
|
|||
package com.jmfy.controller;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.jmfy.dto.CPOrder;
|
||||
import com.jmfy.dto.CPayOrder;
|
||||
import com.jmfy.dto.CUserDao;
|
||||
import com.jmfy.dto.CUserInfo;
|
||||
|
@ -113,16 +114,29 @@ public class MHTHwRechargeController {
|
|||
try {
|
||||
String consumerid = data.getConsumerId();
|
||||
String consumerName = data.getConsumerName();
|
||||
String cpOrderId = "0";
|
||||
String serverId = "0";
|
||||
String orderNo = data.getOrderNo();
|
||||
String[] split1 = consumerid.split("_");
|
||||
if(split1.length==2){
|
||||
if(split1.length==4){
|
||||
consumerid = split1[0];
|
||||
consumerName = split1[1];
|
||||
cpOrderId = split1[2];
|
||||
serverId = split1[3];
|
||||
LOGGER.info("callback==>roleUid={},consumerName={}",consumerid,consumerName);
|
||||
}else{
|
||||
LOGGER.info("参数结构不对{}",consumerid);
|
||||
return "FAIL";
|
||||
}
|
||||
|
||||
CUserInfo cUserInfo = cuserDao.findUserInfo(Integer.valueOf(consumerid));
|
||||
if (cUserInfo == null) {
|
||||
LOGGER.info("该用户无此角色" + consumerid);
|
||||
LOGGER.info("该用户无此角色{}" , consumerid);
|
||||
return "FAIL";
|
||||
}
|
||||
CPOrder cpOrder = cuserDao.findCpOrderInfo(serverId,cpOrderId);
|
||||
if (cpOrder == null) {
|
||||
LOGGER.info("{}区服无此cp订单发起,或已完成此订单==>{}",serverId, cpOrderId);
|
||||
return "FAIL";
|
||||
}
|
||||
|
||||
|
@ -155,7 +169,7 @@ public class MHTHwRechargeController {
|
|||
LOGGER.info("serviceKey : " + serviceKey);
|
||||
try {
|
||||
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
||||
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(), consumerName, consumerid, orderNo, 0, (int)(Double.valueOf(data.getMhtOrderAmt())*10000));
|
||||
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(), consumerName, consumerid, orderNo+"_"+cpOrderId, 0, (int)(Double.valueOf(data.getMhtOrderAmt())*10000));
|
||||
} catch (Exception e) {
|
||||
LOGGER.info("callback=>", e);
|
||||
} finally {
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package com.jmfy.dto;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2021/5/11
|
||||
* @discribe 和游戏服保持一致
|
||||
*/
|
||||
public class CPOrder {
|
||||
|
||||
private String cpOrderNum;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String goodsId;
|
||||
|
||||
|
||||
public CPOrder(String cpOrderNum, String createTime, String goodsId) {
|
||||
this.cpOrderNum = cpOrderNum;
|
||||
this.createTime = createTime;
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getCpOrderNum() {
|
||||
return cpOrderNum;
|
||||
}
|
||||
|
||||
public void setCpOrderNum(String cpOrderNum) {
|
||||
this.cpOrderNum = cpOrderNum;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(String goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
}
|
|
@ -11,4 +11,5 @@ public interface CUserDao {
|
|||
|
||||
CPayOrder getCpayOrderByOrderId(String pOrderId);
|
||||
|
||||
CPOrder findCpOrderInfo(String serverId,String cpOrderId);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.jmfy.dto.impl;
|
||||
|
||||
import com.jmfy.dto.CPOrder;
|
||||
import com.jmfy.dto.CPayOrder;
|
||||
import com.jmfy.dto.CUserDao;
|
||||
import com.jmfy.dto.CUserInfo;
|
||||
|
@ -59,4 +60,9 @@ public class CUserDaoImpl implements CUserDao {
|
|||
public CPayOrder getCpayOrderByOrderId(String pOrderId) {
|
||||
return RedisUtil.getInstence().getObject(RedisUserKey.C_PAYORDER,pOrderId,CPayOrder.class,-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPOrder findCpOrderInfo(String serverId, String cpOrderId) {
|
||||
return RedisUtil.getInstence().getObject(serverId+RedisUserKey.Delimiter_colon+RedisUserKey.CP_ORDER,cpOrderId,CPOrder.class,-1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,6 @@ public class RedisUserKey {
|
|||
public final static String Delimiter_colon = ":";
|
||||
public static final String USER_LOGIN_URL = "USER_LOGIN_URL";
|
||||
public final static String C_PAYORDER = "C_PAYORDER";
|
||||
public final static String CP_ORDER = "CP_ORDER";
|
||||
public final static String C_PAYORDER_MAP = "C_PAYORDER_MAP";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue