灵动网页支付
parent
bc50b90957
commit
3ef43a64a7
|
@ -23,7 +23,7 @@ public class CoreService implements RPCRequestIFace.Iface {
|
|||
|
||||
|
||||
@Override
|
||||
public Result deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, TException {
|
||||
public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, TException {
|
||||
try {
|
||||
LOGGER.info("deliveryRecharge start",uid );
|
||||
return BuyGoodsLogic.sendGoods(uid, goodsId, openId, orderId, orderTime, amount);
|
||||
|
|
|
@ -25,6 +25,6 @@ public class TestBuyGiftGoodsHandler extends BaseHandler {
|
|||
}
|
||||
|
||||
PlayerInfoProto.TestBuyGiftGoodsRequest testBuyGiftGoodsRequest = PlayerInfoProto.TestBuyGiftGoodsRequest.parseFrom(netData.parseClientProtoNetData());
|
||||
BuyGoodsLogic.testBuyGoods(iSession,testBuyGiftGoodsRequest.getGoodsId());
|
||||
BuyGoodsLogic.testBuyGoods(iSession,String.valueOf(testBuyGiftGoodsRequest.getGoodsId()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,11 @@ public class DeathPathLogic {
|
|||
|
||||
private int status = 0;
|
||||
|
||||
public int getStatus() {
|
||||
//跨线程调有问题
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否在开启状态
|
||||
*/
|
||||
|
@ -512,6 +517,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
//清除排行信息
|
||||
public static void deleteDeathPathInfo() throws Exception {
|
||||
|
||||
//todo 邮件自动发奖
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
|
|
|
@ -68,7 +68,7 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
|
||||
|
||||
public static void testBuyGoods(ISession session,int goodsId) throws Exception {
|
||||
public static void testBuyGoods(ISession session,String goodsId) throws Exception {
|
||||
int uid = session.getUid();
|
||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||
if(sRechargeCommodityConfig == null){
|
||||
|
@ -89,11 +89,38 @@ public class BuyGoodsLogic {
|
|||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,System.currentTimeMillis()+"",result.getResultCode(),price*10);
|
||||
}
|
||||
|
||||
public static Result sendGoods(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws Exception {
|
||||
public static boolean isNumeric(String str) {
|
||||
try {
|
||||
new BigDecimal(str).toString();
|
||||
} catch (Exception e) {
|
||||
return false;//异常
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Result sendGoods(int uid, String sdkGoodsId, String openId, String orderId, long orderTime, int amount) throws Exception {
|
||||
Result resultRes = new Result();
|
||||
LOGGER.info("send to uid={},the goods={},openID={},orderId={},orderTime={},amount={}",uid,goodsId,openId,orderId,orderTime,amount);
|
||||
LOGGER.info("send to uid={},the goods={},openID={},orderId={},orderTime={},amount={}",uid,sdkGoodsId,openId,orderId,orderTime,amount);
|
||||
User user = UserManager.getUser(uid);
|
||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||
|
||||
int goodsId = 0;
|
||||
SRechargeCommodityConfig sRechargeCommodityConfig;
|
||||
if(isNumeric(sdkGoodsId)){
|
||||
goodsId = Integer.valueOf(sdkGoodsId);
|
||||
sRechargeCommodityConfig =SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||
}else {
|
||||
sRechargeCommodityConfig = SRechargeCommodityConfig.sdkRechargeCommodityConfigMap.get(sdkGoodsId);
|
||||
sRechargeCommodityConfig.getId();
|
||||
}
|
||||
|
||||
|
||||
if(null ==sRechargeCommodityConfig){
|
||||
LOGGER.error("the uid={},the goodId={},good config null",uid,goodsId);
|
||||
resultRes.setResultCode(0);
|
||||
resultRes.setResultMsg("good config null");
|
||||
return resultRes;
|
||||
}
|
||||
|
||||
|
||||
//check money
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* Structs can also be exceptions, if they are nasty.
|
||||
*/
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class InvalidOperException extends TException implements org.apache.thrift.TBase<InvalidOperException, InvalidOperException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidOperException> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperException");
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class RPCMatchRequestIFace {
|
||||
|
||||
public interface Iface {
|
||||
|
|
|
@ -34,12 +34,12 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class RPCRequestIFace {
|
||||
|
||||
public interface Iface {
|
||||
|
||||
public Result deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException;
|
||||
public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException;
|
||||
|
||||
public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class RPCRequestIFace {
|
|||
|
||||
public interface AsyncIface {
|
||||
|
||||
public void deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
|
@ -73,13 +73,13 @@ public class RPCRequestIFace {
|
|||
super(iprot, oprot);
|
||||
}
|
||||
|
||||
public Result deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException
|
||||
public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException
|
||||
{
|
||||
send_deliveryRecharge(uid, goodsId, openId, orderId, orderTime, amount);
|
||||
return recv_deliveryRecharge();
|
||||
}
|
||||
|
||||
public void send_deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws org.apache.thrift.TException
|
||||
public void send_deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws org.apache.thrift.TException
|
||||
{
|
||||
deliveryRecharge_args args = new deliveryRecharge_args();
|
||||
args.setUid(uid);
|
||||
|
@ -144,7 +144,7 @@ public class RPCRequestIFace {
|
|||
super(protocolFactory, clientManager, transport);
|
||||
}
|
||||
|
||||
public void deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
checkReady();
|
||||
deliveryRecharge_call method_call = new deliveryRecharge_call(uid, goodsId, openId, orderId, orderTime, amount, resultHandler, this, ___protocolFactory, ___transport);
|
||||
this.___currentMethod = method_call;
|
||||
|
@ -153,12 +153,12 @@ public class RPCRequestIFace {
|
|||
|
||||
public static class deliveryRecharge_call extends org.apache.thrift.async.TAsyncMethodCall {
|
||||
private int uid;
|
||||
private int goodsId;
|
||||
private String goodsId;
|
||||
private String openId;
|
||||
private String orderId;
|
||||
private long orderTime;
|
||||
private int amount;
|
||||
public deliveryRecharge_call(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
public deliveryRecharge_call(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
super(client, protocolFactory, transport, resultHandler, false);
|
||||
this.uid = uid;
|
||||
this.goodsId = goodsId;
|
||||
|
@ -422,7 +422,7 @@ public class RPCRequestIFace {
|
|||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_args");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.I32, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField OPEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("openId", org.apache.thrift.protocol.TType.STRING, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4);
|
||||
private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5);
|
||||
|
@ -435,7 +435,7 @@ public class RPCRequestIFace {
|
|||
}
|
||||
|
||||
public int uid; // required
|
||||
public int goodsId; // required
|
||||
public String goodsId; // required
|
||||
public String openId; // required
|
||||
public String orderId; // required
|
||||
public long orderTime; // required
|
||||
|
@ -516,9 +516,8 @@ public class RPCRequestIFace {
|
|||
|
||||
// isset id assignments
|
||||
private static final int __UID_ISSET_ID = 0;
|
||||
private static final int __GOODSID_ISSET_ID = 1;
|
||||
private static final int __ORDERTIME_ISSET_ID = 2;
|
||||
private static final int __AMOUNT_ISSET_ID = 3;
|
||||
private static final int __ORDERTIME_ISSET_ID = 1;
|
||||
private static final int __AMOUNT_ISSET_ID = 2;
|
||||
private byte __isset_bitfield = 0;
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
|
@ -526,7 +525,7 @@ public class RPCRequestIFace {
|
|||
tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.OPEN_ID, new org.apache.thrift.meta_data.FieldMetaData("openId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
|
@ -544,7 +543,7 @@ public class RPCRequestIFace {
|
|||
|
||||
public deliveryRecharge_args(
|
||||
int uid,
|
||||
int goodsId,
|
||||
String goodsId,
|
||||
String openId,
|
||||
String orderId,
|
||||
long orderTime,
|
||||
|
@ -554,7 +553,6 @@ public class RPCRequestIFace {
|
|||
this.uid = uid;
|
||||
setUidIsSet(true);
|
||||
this.goodsId = goodsId;
|
||||
setGoodsIdIsSet(true);
|
||||
this.openId = openId;
|
||||
this.orderId = orderId;
|
||||
this.orderTime = orderTime;
|
||||
|
@ -569,7 +567,9 @@ public class RPCRequestIFace {
|
|||
public deliveryRecharge_args(deliveryRecharge_args other) {
|
||||
__isset_bitfield = other.__isset_bitfield;
|
||||
this.uid = other.uid;
|
||||
this.goodsId = other.goodsId;
|
||||
if (other.isSetGoodsId()) {
|
||||
this.goodsId = other.goodsId;
|
||||
}
|
||||
if (other.isSetOpenId()) {
|
||||
this.openId = other.openId;
|
||||
}
|
||||
|
@ -588,8 +588,7 @@ public class RPCRequestIFace {
|
|||
public void clear() {
|
||||
setUidIsSet(false);
|
||||
this.uid = 0;
|
||||
setGoodsIdIsSet(false);
|
||||
this.goodsId = 0;
|
||||
this.goodsId = null;
|
||||
this.openId = null;
|
||||
this.orderId = null;
|
||||
setOrderTimeIsSet(false);
|
||||
|
@ -621,27 +620,28 @@ public class RPCRequestIFace {
|
|||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public int getGoodsId() {
|
||||
public String getGoodsId() {
|
||||
return this.goodsId;
|
||||
}
|
||||
|
||||
public deliveryRecharge_args setGoodsId(int goodsId) {
|
||||
public deliveryRecharge_args setGoodsId(String goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
setGoodsIdIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetGoodsId() {
|
||||
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GOODSID_ISSET_ID);
|
||||
this.goodsId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field goodsId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetGoodsId() {
|
||||
return EncodingUtils.testBit(__isset_bitfield, __GOODSID_ISSET_ID);
|
||||
return this.goodsId != null;
|
||||
}
|
||||
|
||||
public void setGoodsIdIsSet(boolean value) {
|
||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GOODSID_ISSET_ID, value);
|
||||
if (!value) {
|
||||
this.goodsId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
|
@ -752,7 +752,7 @@ public class RPCRequestIFace {
|
|||
if (value == null) {
|
||||
unsetGoodsId();
|
||||
} else {
|
||||
setGoodsId((Integer)value);
|
||||
setGoodsId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -797,7 +797,7 @@ public class RPCRequestIFace {
|
|||
return Integer.valueOf(getUid());
|
||||
|
||||
case GOODS_ID:
|
||||
return Integer.valueOf(getGoodsId());
|
||||
return getGoodsId();
|
||||
|
||||
case OPEN_ID:
|
||||
return getOpenId();
|
||||
|
@ -860,12 +860,12 @@ public class RPCRequestIFace {
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_goodsId = true;
|
||||
boolean that_present_goodsId = true;
|
||||
boolean this_present_goodsId = true && this.isSetGoodsId();
|
||||
boolean that_present_goodsId = true && that.isSetGoodsId();
|
||||
if (this_present_goodsId || that_present_goodsId) {
|
||||
if (!(this_present_goodsId && that_present_goodsId))
|
||||
return false;
|
||||
if (this.goodsId != that.goodsId)
|
||||
if (!this.goodsId.equals(that.goodsId))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -917,7 +917,7 @@ public class RPCRequestIFace {
|
|||
if (present_uid)
|
||||
list.add(uid);
|
||||
|
||||
boolean present_goodsId = true;
|
||||
boolean present_goodsId = true && (isSetGoodsId());
|
||||
list.add(present_goodsId);
|
||||
if (present_goodsId)
|
||||
list.add(goodsId);
|
||||
|
@ -1038,7 +1038,11 @@ public class RPCRequestIFace {
|
|||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("goodsId:");
|
||||
sb.append(this.goodsId);
|
||||
if (this.goodsId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.goodsId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("openId:");
|
||||
|
@ -1118,8 +1122,8 @@ public class RPCRequestIFace {
|
|||
}
|
||||
break;
|
||||
case 2: // GOODS_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.goodsId = iprot.readI32();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.goodsId = iprot.readString();
|
||||
struct.setGoodsIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
|
@ -1175,9 +1179,11 @@ public class RPCRequestIFace {
|
|||
oprot.writeFieldBegin(UID_FIELD_DESC);
|
||||
oprot.writeI32(struct.uid);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(GOODS_ID_FIELD_DESC);
|
||||
oprot.writeI32(struct.goodsId);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.goodsId != null) {
|
||||
oprot.writeFieldBegin(GOODS_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.goodsId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.openId != null) {
|
||||
oprot.writeFieldBegin(OPEN_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.openId);
|
||||
|
@ -1235,7 +1241,7 @@ public class RPCRequestIFace {
|
|||
oprot.writeI32(struct.uid);
|
||||
}
|
||||
if (struct.isSetGoodsId()) {
|
||||
oprot.writeI32(struct.goodsId);
|
||||
oprot.writeString(struct.goodsId);
|
||||
}
|
||||
if (struct.isSetOpenId()) {
|
||||
oprot.writeString(struct.openId);
|
||||
|
@ -1260,7 +1266,7 @@ public class RPCRequestIFace {
|
|||
struct.setUidIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.goodsId = iprot.readI32();
|
||||
struct.goodsId = iprot.readString();
|
||||
struct.setGoodsIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class Result implements org.apache.thrift.TBase<Result, Result._Fields>, java.io.Serializable, Cloneable, Comparable<Result> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Result");
|
||||
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
echo off
|
||||
echo "======first del java src files======"
|
||||
del E:\work2\jieling_server_develope\serverlogic\src\main\thrift\idl\gen-java\com\ljsd\jieling\thrift\idl\*.java
|
||||
del E:\work2\jieling_server_develope\serverlogic\src\main\java\com\ljsd\jieling\thrift\idl\*.java
|
||||
|
||||
echo "======gen java src files======"
|
||||
set cdy=%cd%
|
||||
cd..
|
||||
cd..
|
||||
set out=%cd%
|
||||
cd %cdy%\gen-java\com\ljsd\jieling\thrift\idl
|
||||
echo "======find old2======"
|
||||
del .\*.java
|
||||
echo "======find old======"
|
||||
cd %out%\java\com\ljsd\jieling\thrift\idl
|
||||
del .\*.java
|
||||
cd %cdy%
|
||||
echo "=======begin to copy src files======"
|
||||
for %%i in (".\*.thrift") do thrift-0.9.2 --gen java %%i
|
||||
echo "=======begin to copy src files======"
|
||||
copy .\gen-java\com\ljsd\jieling\thrift\idl\*.java E:\work2\jieling_server_develope\serverlogic\src\main\java\com\ljsd\jieling\thrift\idl\ /y
|
||||
copy %cdy%\gen-java\com\ljsd\jieling\thrift\idl\*.java %out%\java\com\ljsd\jieling\thrift\idl\ /y
|
||||
echo on
|
||||
pause
|
|
@ -14,7 +14,7 @@ struct Result {
|
|||
}
|
||||
|
||||
service RPCRequestIFace{
|
||||
Result deliveryRecharge(1:i32 uid, 2:i32 goodsId,3: string openId,4: string orderId,5: i64 orderTime, 6:i32 amount) throws (1:InvalidOperException ouch);
|
||||
Result deliveryRecharge(1:i32 uid, 2:string goodsId,3: string openId,4: string orderId,5: i64 orderTime, 6:i32 amount) throws (1:InvalidOperException ouch);
|
||||
void mathcRoomAdressInfo(1:i32 uid,2:i32 type,3:string address);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* Structs can also be exceptions, if they are nasty.
|
||||
*/
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class InvalidOperException extends TException implements org.apache.thrift.TBase<InvalidOperException, InvalidOperException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidOperException> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperException");
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class RPCMatchRequestIFace {
|
||||
|
||||
public interface Iface {
|
||||
|
|
|
@ -34,12 +34,12 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class RPCRequestIFace {
|
||||
|
||||
public interface Iface {
|
||||
|
||||
public Result deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException;
|
||||
public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException;
|
||||
|
||||
public void mathcRoomAdressInfo(int uid, int type, String address) throws org.apache.thrift.TException;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class RPCRequestIFace {
|
|||
|
||||
public interface AsyncIface {
|
||||
|
||||
public void deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
public void mathcRoomAdressInfo(int uid, int type, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
|
@ -73,13 +73,13 @@ public class RPCRequestIFace {
|
|||
super(iprot, oprot);
|
||||
}
|
||||
|
||||
public Result deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException
|
||||
public Result deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws InvalidOperException, org.apache.thrift.TException
|
||||
{
|
||||
send_deliveryRecharge(uid, goodsId, openId, orderId, orderTime, amount);
|
||||
return recv_deliveryRecharge();
|
||||
}
|
||||
|
||||
public void send_deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount) throws org.apache.thrift.TException
|
||||
public void send_deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount) throws org.apache.thrift.TException
|
||||
{
|
||||
deliveryRecharge_args args = new deliveryRecharge_args();
|
||||
args.setUid(uid);
|
||||
|
@ -144,7 +144,7 @@ public class RPCRequestIFace {
|
|||
super(protocolFactory, clientManager, transport);
|
||||
}
|
||||
|
||||
public void deliveryRecharge(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
public void deliveryRecharge(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
checkReady();
|
||||
deliveryRecharge_call method_call = new deliveryRecharge_call(uid, goodsId, openId, orderId, orderTime, amount, resultHandler, this, ___protocolFactory, ___transport);
|
||||
this.___currentMethod = method_call;
|
||||
|
@ -153,12 +153,12 @@ public class RPCRequestIFace {
|
|||
|
||||
public static class deliveryRecharge_call extends org.apache.thrift.async.TAsyncMethodCall {
|
||||
private int uid;
|
||||
private int goodsId;
|
||||
private String goodsId;
|
||||
private String openId;
|
||||
private String orderId;
|
||||
private long orderTime;
|
||||
private int amount;
|
||||
public deliveryRecharge_call(int uid, int goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
public deliveryRecharge_call(int uid, String goodsId, String openId, String orderId, long orderTime, int amount, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
super(client, protocolFactory, transport, resultHandler, false);
|
||||
this.uid = uid;
|
||||
this.goodsId = goodsId;
|
||||
|
@ -422,7 +422,7 @@ public class RPCRequestIFace {
|
|||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deliveryRecharge_args");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.I32, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField GOODS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("goodsId", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField OPEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("openId", org.apache.thrift.protocol.TType.STRING, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.STRING, (short)4);
|
||||
private static final org.apache.thrift.protocol.TField ORDER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("orderTime", org.apache.thrift.protocol.TType.I64, (short)5);
|
||||
|
@ -435,7 +435,7 @@ public class RPCRequestIFace {
|
|||
}
|
||||
|
||||
public int uid; // required
|
||||
public int goodsId; // required
|
||||
public String goodsId; // required
|
||||
public String openId; // required
|
||||
public String orderId; // required
|
||||
public long orderTime; // required
|
||||
|
@ -516,9 +516,8 @@ public class RPCRequestIFace {
|
|||
|
||||
// isset id assignments
|
||||
private static final int __UID_ISSET_ID = 0;
|
||||
private static final int __GOODSID_ISSET_ID = 1;
|
||||
private static final int __ORDERTIME_ISSET_ID = 2;
|
||||
private static final int __AMOUNT_ISSET_ID = 3;
|
||||
private static final int __ORDERTIME_ISSET_ID = 1;
|
||||
private static final int __AMOUNT_ISSET_ID = 2;
|
||||
private byte __isset_bitfield = 0;
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
|
@ -526,7 +525,7 @@ public class RPCRequestIFace {
|
|||
tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.GOODS_ID, new org.apache.thrift.meta_data.FieldMetaData("goodsId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.OPEN_ID, new org.apache.thrift.meta_data.FieldMetaData("openId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
|
@ -544,7 +543,7 @@ public class RPCRequestIFace {
|
|||
|
||||
public deliveryRecharge_args(
|
||||
int uid,
|
||||
int goodsId,
|
||||
String goodsId,
|
||||
String openId,
|
||||
String orderId,
|
||||
long orderTime,
|
||||
|
@ -554,7 +553,6 @@ public class RPCRequestIFace {
|
|||
this.uid = uid;
|
||||
setUidIsSet(true);
|
||||
this.goodsId = goodsId;
|
||||
setGoodsIdIsSet(true);
|
||||
this.openId = openId;
|
||||
this.orderId = orderId;
|
||||
this.orderTime = orderTime;
|
||||
|
@ -569,7 +567,9 @@ public class RPCRequestIFace {
|
|||
public deliveryRecharge_args(deliveryRecharge_args other) {
|
||||
__isset_bitfield = other.__isset_bitfield;
|
||||
this.uid = other.uid;
|
||||
this.goodsId = other.goodsId;
|
||||
if (other.isSetGoodsId()) {
|
||||
this.goodsId = other.goodsId;
|
||||
}
|
||||
if (other.isSetOpenId()) {
|
||||
this.openId = other.openId;
|
||||
}
|
||||
|
@ -588,8 +588,7 @@ public class RPCRequestIFace {
|
|||
public void clear() {
|
||||
setUidIsSet(false);
|
||||
this.uid = 0;
|
||||
setGoodsIdIsSet(false);
|
||||
this.goodsId = 0;
|
||||
this.goodsId = null;
|
||||
this.openId = null;
|
||||
this.orderId = null;
|
||||
setOrderTimeIsSet(false);
|
||||
|
@ -621,27 +620,28 @@ public class RPCRequestIFace {
|
|||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UID_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public int getGoodsId() {
|
||||
public String getGoodsId() {
|
||||
return this.goodsId;
|
||||
}
|
||||
|
||||
public deliveryRecharge_args setGoodsId(int goodsId) {
|
||||
public deliveryRecharge_args setGoodsId(String goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
setGoodsIdIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetGoodsId() {
|
||||
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GOODSID_ISSET_ID);
|
||||
this.goodsId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field goodsId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetGoodsId() {
|
||||
return EncodingUtils.testBit(__isset_bitfield, __GOODSID_ISSET_ID);
|
||||
return this.goodsId != null;
|
||||
}
|
||||
|
||||
public void setGoodsIdIsSet(boolean value) {
|
||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GOODSID_ISSET_ID, value);
|
||||
if (!value) {
|
||||
this.goodsId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
|
@ -752,7 +752,7 @@ public class RPCRequestIFace {
|
|||
if (value == null) {
|
||||
unsetGoodsId();
|
||||
} else {
|
||||
setGoodsId((Integer)value);
|
||||
setGoodsId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -797,7 +797,7 @@ public class RPCRequestIFace {
|
|||
return Integer.valueOf(getUid());
|
||||
|
||||
case GOODS_ID:
|
||||
return Integer.valueOf(getGoodsId());
|
||||
return getGoodsId();
|
||||
|
||||
case OPEN_ID:
|
||||
return getOpenId();
|
||||
|
@ -860,12 +860,12 @@ public class RPCRequestIFace {
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_goodsId = true;
|
||||
boolean that_present_goodsId = true;
|
||||
boolean this_present_goodsId = true && this.isSetGoodsId();
|
||||
boolean that_present_goodsId = true && that.isSetGoodsId();
|
||||
if (this_present_goodsId || that_present_goodsId) {
|
||||
if (!(this_present_goodsId && that_present_goodsId))
|
||||
return false;
|
||||
if (this.goodsId != that.goodsId)
|
||||
if (!this.goodsId.equals(that.goodsId))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -917,7 +917,7 @@ public class RPCRequestIFace {
|
|||
if (present_uid)
|
||||
list.add(uid);
|
||||
|
||||
boolean present_goodsId = true;
|
||||
boolean present_goodsId = true && (isSetGoodsId());
|
||||
list.add(present_goodsId);
|
||||
if (present_goodsId)
|
||||
list.add(goodsId);
|
||||
|
@ -1038,7 +1038,11 @@ public class RPCRequestIFace {
|
|||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("goodsId:");
|
||||
sb.append(this.goodsId);
|
||||
if (this.goodsId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.goodsId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("openId:");
|
||||
|
@ -1118,8 +1122,8 @@ public class RPCRequestIFace {
|
|||
}
|
||||
break;
|
||||
case 2: // GOODS_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.goodsId = iprot.readI32();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.goodsId = iprot.readString();
|
||||
struct.setGoodsIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
|
@ -1175,9 +1179,11 @@ public class RPCRequestIFace {
|
|||
oprot.writeFieldBegin(UID_FIELD_DESC);
|
||||
oprot.writeI32(struct.uid);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(GOODS_ID_FIELD_DESC);
|
||||
oprot.writeI32(struct.goodsId);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.goodsId != null) {
|
||||
oprot.writeFieldBegin(GOODS_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.goodsId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.openId != null) {
|
||||
oprot.writeFieldBegin(OPEN_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.openId);
|
||||
|
@ -1235,7 +1241,7 @@ public class RPCRequestIFace {
|
|||
oprot.writeI32(struct.uid);
|
||||
}
|
||||
if (struct.isSetGoodsId()) {
|
||||
oprot.writeI32(struct.goodsId);
|
||||
oprot.writeString(struct.goodsId);
|
||||
}
|
||||
if (struct.isSetOpenId()) {
|
||||
oprot.writeString(struct.openId);
|
||||
|
@ -1260,7 +1266,7 @@ public class RPCRequestIFace {
|
|||
struct.setUidIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.goodsId = iprot.readI32();
|
||||
struct.goodsId = iprot.readString();
|
||||
struct.setGoodsIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2019-9-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-8-20")
|
||||
public class Result implements org.apache.thrift.TBase<Result, Result._Fields>, java.io.Serializable, Cloneable, Comparable<Result> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Result");
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ import java.util.*;
|
|||
public class SRechargeCommodityConfig implements BaseConfig {
|
||||
private int id;
|
||||
|
||||
private String rechargeId;
|
||||
|
||||
private String name;
|
||||
|
||||
private int type;
|
||||
|
@ -60,6 +62,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
|
||||
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeCommodityConfigMap;
|
||||
public static Map<String, SRechargeCommodityConfig> sdkRechargeCommodityConfigMap;
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeLevelMap;
|
||||
private static Map<Integer,Integer> recharegeHeroTime;
|
||||
public static TreeMap<Integer,Integer> rechargePlayerLevelMap;
|
||||
|
@ -69,11 +72,12 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
public void init() throws Exception {
|
||||
Map<Integer, SRechargeCommodityConfig> config = STableManager.getConfig(SRechargeCommodityConfig.class);
|
||||
Map<Integer, SRechargeCommodityConfig> rechargeLevelMapTmp = new HashMap<>();
|
||||
|
||||
sdkRechargeCommodityConfigMap = new HashMap<>();
|
||||
Map<Integer, Integer> recharegeHeroTimeTmp = new HashMap<>();
|
||||
TreeMap<Integer,Integer> rechargePlayerLevelTemp = new TreeMap<>();
|
||||
Set<SRechargeCommodityConfig> refreshItemInfoTmp = new HashSet<>();
|
||||
for(SRechargeCommodityConfig sRechargeCommodityConfig : config.values()){
|
||||
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId(),sRechargeCommodityConfig);
|
||||
int[] discountType = sRechargeCommodityConfig.getDiscountType();
|
||||
if(discountType!=null && discountType.length>0 &&discountType[0] == 2){
|
||||
int level = discountType[1];
|
||||
|
@ -231,4 +235,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
SRechargeCommodityConfig.recharegeHeroTime = recharegeHeroTime;
|
||||
}
|
||||
|
||||
public String getRechargeId() {
|
||||
return rechargeId;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue