订单查询

master
zhangshanxue 2020-09-01 15:47:24 +08:00
parent 1ac5f0f9bd
commit 75a45fd121
4 changed files with 48 additions and 6 deletions

View File

@ -58,6 +58,10 @@ public class MHTHwRechargeController {
return process(request,"02738d4f8aad8f4860c3916be35dc89b");
}
@RequestMapping(value = "/MHTHwIosTestCallback")
public String MHTHwIosTestCallback(HttpServletRequest request) throws Exception {
return process(request,"5f620985bd0be3d5e5fe66a289aaadc1");
}
private String process(HttpServletRequest request,String appsecret) throws Exception{
@ -130,6 +134,8 @@ public class MHTHwRechargeController {
cPayOrder.setServerId(cUserInfo.getServerid());
cPayOrder.setDelivery_time(date);
cPayOrder.setUserId(consumerid);
cPayOrder.setAmount(data.getMhtOrderAmt());
cPayOrder.setGoodsId(consumerName);
Result result = null;
String userAddress = cuserDao.findUserAddress(cUserInfo.getId());
if (userAddress != null) {
@ -143,7 +149,7 @@ public class MHTHwRechargeController {
LOGGER.info("serviceKey : " + serviceKey);
try {
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(), consumerName, consumerid, orderNo, 0, 0);
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(), consumerName, consumerid, orderNo, 0, (int)(Double.valueOf(data.getMhtOrderAmt())*100));
} catch (Exception e) {
LOGGER.info("callback=>", e);
} finally {

View File

@ -137,6 +137,8 @@ public class MHTRechargeController {
cPayOrder.setServerId(cUserInfo.getServerid());
cPayOrder.setDelivery_time(date);
cPayOrder.setUserId(uid);
cPayOrder.setAmount(mhtOrderAmt);
cPayOrder.setGoodsId(goodID);
Result result = null;
String userAddress = cuserDao.findUserAddress(cUserInfo.getId());
if (userAddress != null) {
@ -150,7 +152,7 @@ public class MHTRechargeController {
LOGGER.info("serviceKey : " + serviceKey);
try {
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(),goodID,uid, orderNo,0,0);
result = rPCClient.getClient().deliveryRecharge(cUserInfo.getId(),goodID,uid, orderNo,0,(int)(Double.valueOf(mhtOrderAmt)*100));
} catch (Exception e) {
LOGGER.info("callback=>",e);
}finally {

View File

@ -21,11 +21,21 @@ public class CPayOrder {
@Field(value = "userId")
private String userId;//充值回调中的userId
@Field(value = "roleId")
private String roleId;
@Field(value = "goodsId")
private String goodsId;
@Field(value = "cpOrderId")
private String cpOrderId;//原厂订单号通常为google或者ios充值才有充值回调中的remark
@Field(value = "recharge_type")
private String recharge_type ; //
@Field(value = "amount")
private int amount;// 充值回调中的amount,单位为分
private String amount;// 充值回调中的amount,单位为分
public String getOrderId() {
return orderId;
@ -68,14 +78,38 @@ public class CPayOrder {
this.cpOrderId = cpOrderId;
}
public int getAmount() {
public String getAmount() {
return amount;
}
public void setAmount(int amount) {
public void setAmount(String amount) {
this.amount = amount;
}
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getGoodsId() {
return goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public String getRecharge_type() {
return recharge_type;
}
public void setRecharge_type(String recharge_type) {
this.recharge_type = recharge_type;
}
@Override
public String toString() {
return "CPayOrder{" +

View File

@ -26,7 +26,7 @@ public class CUserInfo {
private String openId;
@Field(value = "serverid")
@Field(value = "serverId")
private int serverid;
@Field(value = "createTime")