generated from root/miduo_server
添加参数
parent
69701121ab
commit
dde63b41f4
|
@ -12,6 +12,7 @@ import com.jmfy.util.MD5Util;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@ -34,16 +35,149 @@ public class HaoGameRechargeController {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(HaoGameRechargeController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(HaoGameRechargeController.class);
|
||||||
|
|
||||||
|
class Extra{
|
||||||
|
private String platform;
|
||||||
|
private String ccId;
|
||||||
|
private String roleId;
|
||||||
|
private String productId;
|
||||||
|
private String extension;
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
public String getPlatform() {
|
||||||
|
return platform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatform(String platform) {
|
||||||
|
this.platform = platform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCcId() {
|
||||||
|
return ccId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCcId(String ccId) {
|
||||||
|
this.ccId = ccId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoleId() {
|
||||||
|
return roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleId(String roleId) {
|
||||||
|
this.roleId = roleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductId() {
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductId(String productId) {
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExtension() {
|
||||||
|
return extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtension(String extension) {
|
||||||
|
this.extension = extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerId() {
|
||||||
|
return serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerId(String serverId) {
|
||||||
|
this.serverId = serverId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HaoGameParam {
|
||||||
|
private String outtradeno;
|
||||||
|
private String tradeno;
|
||||||
|
private String status;
|
||||||
|
private String timeend;
|
||||||
|
private String amount;
|
||||||
|
private String openid;
|
||||||
|
private Extra extra;
|
||||||
|
private String sign;
|
||||||
|
|
||||||
|
public String getOuttradeno() {
|
||||||
|
return outtradeno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOuttradeno(String outtradeno) {
|
||||||
|
this.outtradeno = outtradeno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTradeno() {
|
||||||
|
return tradeno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTradeno(String tradeno) {
|
||||||
|
this.tradeno = tradeno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTimeend() {
|
||||||
|
return timeend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeend(String timeend) {
|
||||||
|
this.timeend = timeend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAmount() {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmount(String amount) {
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenid() {
|
||||||
|
return openid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenid(String openid) {
|
||||||
|
this.openid = openid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Extra getExtra() {
|
||||||
|
return extra;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtra(Extra extra) {
|
||||||
|
this.extra = extra;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSign() {
|
||||||
|
return sign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSign(String sign) {
|
||||||
|
this.sign = sign;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/haoGameCallback")
|
@RequestMapping(value = "/haoGameCallback")
|
||||||
public String haoGameCallback(HttpServletRequest request) throws Exception {
|
public String haoGameCallback(HttpServletRequest request, @RequestBody HaoGameParam haoGamePram) throws Exception {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMapYX(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMapYX(request);
|
||||||
if (parameterMap.isEmpty()) {
|
if (parameterMap.isEmpty()) {
|
||||||
LOGGER.info("data is null");
|
LOGGER.info("data is null");
|
||||||
return "data is null";
|
return "data is null";
|
||||||
}
|
}
|
||||||
for (Map.Entry<String, String> entry : parameterMap.entrySet()) {
|
|
||||||
LOGGER.info("haoGameCallback parameterMap key={} v={}", entry.getKey(), entry.getValue());
|
LOGGER.info("haoGameCallback parameterMap getOuttradeno={} getTradeno={} getAmount={} getExtra={} getOpenid={} ", haoGamePram.getOuttradeno(), haoGamePram.getTradeno(), haoGamePram.getAmount(),
|
||||||
}
|
haoGamePram.getExtra(), haoGamePram.getOpenid());
|
||||||
|
|
||||||
String outtradeno = parameterMap.get("outtradeno");
|
String outtradeno = parameterMap.get("outtradeno");
|
||||||
String orderId = parameterMap.get("tradeno");
|
String orderId = parameterMap.get("tradeno");
|
||||||
String status = parameterMap.get("status");
|
String status = parameterMap.get("status");
|
||||||
|
|
Loading…
Reference in New Issue