delete buy indicaiton

back_recharge
wangyuan 2019-09-17 14:05:16 +08:00
parent 55c8c4bdfd
commit 0dfd959d5e
3 changed files with 29 additions and 9 deletions

View File

@ -82,6 +82,8 @@ public interface BIReason {
int ENDLESS_REASON_CHANGE = 50;//无尽副本赛季更换
int RANDOM_SOULEQUIP = 51;//占星
int DIRECT_BUY = 52; // 直购
//道具消耗原因 1000开头
int ADVENTURE_UPLEVEL_CONSUME = 1000; //秘境升级

View File

@ -74,6 +74,10 @@ public class RoomMatchRequestHandler extends BaseHandler{
return ;
}
User user = UserManager.getUser(iSession.getUid());
if( !user.getTeamPosManager().getTeamPosForHero().containsKey(GlobalsDef.BLOODY_TEAM)){
MessageUtil.sendErrorResponse(iSession,0,responseMsgId,"未设置编队");
return;
}
snapUserFightInfo(user);
RedisUtil.getInstence().set(RedisKey.MATCH_UID_KEY + ":" + uid,gson.toJson("1"));
List<String> matchAddressInfos = RedisUtil.getInstence().getAllSetToList(RedisKey.MATCH_SERVER_INFO + ":" + GameApplication.areaId, String.class);

View File

@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.store;
import com.ljsd.jieling.config.*;
import com.ljsd.jieling.core.VipPrivilegeType;
import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.globals.Global;
import com.ljsd.jieling.ktbeans.KtEventUtils;
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
@ -45,7 +46,7 @@ public class BuyGoodsLogic {
return;
}
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TEST_BUY_GIGT_GOODS_RESPONSE_VALUE,null,true);
Result result = sendGoods(uid, goodsId, "gm-test", "111111", System.currentTimeMillis(), -1);
Result result = sendGoods(uid, goodsId, "gm-test", "111111", System.currentTimeMillis(), -999);
User user = UserManager.getUser(uid);
int price =sRechargeCommodityConfig.getPrice();
int isDiscount = sRechargeCommodityConfig.getIsDiscount();
@ -190,22 +191,35 @@ public class BuyGoodsLogic {
buyGoodsTimes.put(goodsId,buyCount);
rechargeInfo.setBuyGoodsTimes(buyGoodsTimes);
//妖精
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title");
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt");
if(type== 3 || type==1 || type==6){
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]});
//直购礼包
if(type == GiftGoodsType.DIRECTBAG){
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sRechargeCommodityConfig.getBaseReward(), BIReason.DIRECT_BUY);
ISession session = OnlineUserManager.getSessionByUid(uid);
if(session!=null){
PlayerInfoProto.DirectBuyIndication build = PlayerInfoProto.DirectBuyIndication.newBuilder().setDrop(drop).build();
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.DIRECT_BUY_GOODS_INDICATION_VALUE,build,true);
}
}else{
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title");
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt");
if(type== 3 || type==1 || type==6){
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]});
}
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr,nowTime, Global.MAIL_EFFECTIVE_TIME);
}
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr,nowTime, Global.MAIL_EFFECTIVE_TIME);
resultRes.setResultCode(1);
KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,orderId,resultRes.getResultCode(),price);
notifyPaySuccessFul(uid,goodsId);
notifyPaySuccessFul(uid,goodsId,amount != -999);
return resultRes;
}
//通知前端充值成功
public static void notifyPaySuccessFul(int uid,int goodsId){
public static void notifyPaySuccessFul(int uid,int goodsId,boolean needNotify){
if(!needNotify){
return;
}
ISession session = OnlineUserManager.getSessionByUid(uid);
if(session!=null){
PlayerInfoProto.NotifyPaySuccessfulIndicaiton build = PlayerInfoProto.NotifyPaySuccessfulIndicaiton.newBuilder().setGoodsId(goodsId).build();