master_dev
parent
e2d1096df6
commit
69658e1afa
|
@ -1,4 +1,15 @@
|
||||||
{
|
{
|
||||||
"version":"5",
|
"version":"6",
|
||||||
"classes":[]
|
"classes": [
|
||||||
|
{"name":"BuyGoodsNewLogic.class","fullName":"com.ljsd.jieling.logic.store.BuyGoodsNewLogic"},
|
||||||
|
{"name":"SuperBoxActivity.class","fullName":"com.ljsd.jieling.logic.activity.SuperBoxActivity"},
|
||||||
|
{"name":"SevenWorldActivity.class","fullName":"com.ljsd.jieling.logic.activity.SevenWorldActivity"},
|
||||||
|
{"name":"WeekCardActivity.class","fullName":"com.ljsd.jieling.logic.activity.WeekCardActivity"},
|
||||||
|
{"name":"RechargeFirstActivity.class","fullName":"com.ljsd.jieling.logic.activity.RechargeFirstActivity"},
|
||||||
|
{"name":"NewRechargeSumDayActivity.class","fullName":"com.ljsd.jieling.logic.activity.NewRechargeSumDayActivity"},
|
||||||
|
{"name":"InfiniteResourcesPavilionActivity.class","fullName":"com.ljsd.jieling.logic.activity.InfiniteResourcesPavilionActivity"},
|
||||||
|
{"name":"SuperFundNewActivity.class","fullName":"com.ljsd.jieling.logic.activity.SuperFundNewActivity"},
|
||||||
|
{"name":"FengshenTreasureActivity.class","fullName":"com.ljsd.jieling.logic.activity.FengshenTreasureActivity"},
|
||||||
|
{"name":"ContinuousGiftActivity.class","fullName":"com.ljsd.jieling.logic.activity.ContinuousGiftActivity"}
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -19,6 +19,7 @@ import config.SUniversalWelfareConfig;
|
||||||
import manager.STableManager;
|
import manager.STableManager;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
|
import util.TimeUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ public class AllPeopleWelfareActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -56,6 +58,7 @@ public class AllPeopleWelfareActivity extends AbstractActivity {
|
||||||
updateValue(event1.getGiftId());
|
updateValue(event1.getGiftId());
|
||||||
// 状态推送
|
// 状态推送
|
||||||
sendActivityProgress(user, null);
|
sendActivityProgress(user, null);
|
||||||
|
LOGGER.info("superbox-全民福利活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getValue(int goodId){
|
public static int getValue(int goodId){
|
||||||
|
|
|
@ -69,6 +69,7 @@ public class BrushPrivilegeActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -81,6 +82,7 @@ public class BrushPrivilegeActivity extends AbstractActivity {
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, null);
|
sendActivityProgress(session, null);
|
||||||
|
LOGGER.info("superbox-全民福利活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void uporsetValue(User user, int giftId, int state) {
|
public void uporsetValue(User user, int giftId, int state) {
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class ContinuousGiftActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -70,6 +71,7 @@ public class ContinuousGiftActivity extends AbstractActivity {
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, null);
|
sendActivityProgress(session, null);
|
||||||
|
LOGGER.info("superbox-连续礼包s活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,24 +3,16 @@ package com.ljsd.jieling.logic.activity;
|
||||||
import com.ljsd.jieling.exception.ErrorCode;
|
import com.ljsd.jieling.exception.ErrorCode;
|
||||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
import com.ljsd.jieling.globals.Global;
|
|
||||||
import com.ljsd.jieling.jbean.ActivityMission;
|
import com.ljsd.jieling.jbean.ActivityMission;
|
||||||
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
||||||
import com.ljsd.jieling.logic.activity.activityLogic.WeekCardLogic;
|
|
||||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
|
||||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
|
||||||
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
|
||||||
import com.ljsd.jieling.logic.dao.UserManager;
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.util.ItemUtil;
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
import com.ljsd.jieling.util.MessageUtil;
|
import com.ljsd.jieling.util.MessageUtil;
|
||||||
import config.*;
|
import config.*;
|
||||||
import manager.STableManager;
|
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
import util.TimeUtils;
|
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
|
@ -20,6 +20,7 @@ import config.SGlobalActivity;
|
||||||
import config.SSummonTreasure;
|
import config.SSummonTreasure;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
|
import util.TimeUtils;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -42,6 +43,7 @@ class FengshenTreasureActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +54,7 @@ class FengshenTreasureActivity extends AbstractActivity {
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, null);
|
sendActivityProgress(session, null);
|
||||||
|
LOGGER.info("superbox-封神塔奖励活动:{},耗时:{}",id, TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class InfiniteResourcesPavilionActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -60,6 +61,7 @@ public class InfiniteResourcesPavilionActivity extends AbstractActivity {
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, null);
|
sendActivityProgress(session, null);
|
||||||
|
LOGGER.info("superbox-无限资源阁活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -12,6 +12,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import config.SActivityRewardConfig;
|
import config.SActivityRewardConfig;
|
||||||
import config.SGlobalActivity;
|
import config.SGlobalActivity;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
|
import util.TimeUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -37,6 +38,7 @@ class NewRechargeSumDayActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +53,7 @@ class NewRechargeSumDayActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
// 状态推送
|
// 状态推送
|
||||||
sendActivityProgress(user, null);
|
sendActivityProgress(user, null);
|
||||||
|
LOGGER.info("superbox-超值返利活动:{},耗时:{}",id, TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class RechargeFirstActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -59,6 +60,7 @@ public class RechargeFirstActivity extends AbstractActivity {
|
||||||
updateValue(user, event1.getGiftId());
|
updateValue(user, event1.getGiftId());
|
||||||
// 状态推送
|
// 状态推送
|
||||||
sendActivityProgress(user, null);
|
sendActivityProgress(user, null);
|
||||||
|
LOGGER.info("superbox-直购首冲活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
|
import util.TimeUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@ public class SevenWorldActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 购买礼包
|
// 购买礼包
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -70,6 +72,7 @@ public class SevenWorldActivity extends AbstractActivity {
|
||||||
// 状态推送
|
// 状态推送
|
||||||
sendActivityProgress(user, null);
|
sendActivityProgress(user, null);
|
||||||
}
|
}
|
||||||
|
LOGGER.info("superbox-七界秘宝活动:{},耗时:{}",id, TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class SuperBoxActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -70,6 +71,7 @@ public class SuperBoxActivity extends AbstractActivity {
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, null);
|
sendActivityProgress(session, null);
|
||||||
|
LOGGER.info("superbox-惊喜礼盒活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class SuperFundNewActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -60,13 +61,14 @@ public class SuperFundNewActivity extends AbstractActivity {
|
||||||
// 获取信息
|
// 获取信息
|
||||||
SuperBoxEvent event1 = (SuperBoxEvent) event;
|
SuperBoxEvent event1 = (SuperBoxEvent) event;
|
||||||
User user = UserManager.getUser(event1.getUserId());
|
User user = UserManager.getUser(event1.getUserId());
|
||||||
LOGGER.info("超值基金接收到监听器...uid={} activityId={}",user.getId(), id);
|
// LOGGER.info("超值基金接收到监听器...uid={} activityId={}",user.getId(), id);
|
||||||
// 活动数据处理
|
// 活动数据处理
|
||||||
updateValue(user,event1.getGiftId());
|
updateValue(user,event1.getGiftId());
|
||||||
// 零点刷新
|
// 零点刷新
|
||||||
zeroRefresh(user,event1.getGiftId());
|
zeroRefresh(user,event1.getGiftId());
|
||||||
// 状态推送
|
// 状态推送
|
||||||
sendActivityProgress(user, null);
|
sendActivityProgress(user, null);
|
||||||
|
LOGGER.info("superbox-超值基金活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class WeekCardActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
// 类型验证
|
// 类型验证
|
||||||
if (!(event instanceof SuperBoxEvent)) {
|
if (!(event instanceof SuperBoxEvent)) {
|
||||||
return;
|
return;
|
||||||
|
@ -67,6 +68,7 @@ public class WeekCardActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGGER.info("superbox-月卡活动:{},耗时:{}",id,TimeUtils.now()-now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -184,11 +184,13 @@ public class BuyGoodsNewLogic {
|
||||||
* 礼包发送接口
|
* 礼包发送接口
|
||||||
*/
|
*/
|
||||||
public static Result sendGoods(int uid, String sdkGoodsId, String openId, String orderId, long orderTime, int amount) throws Exception {
|
public static Result sendGoods(int uid, String sdkGoodsId, String openId, String orderId, long orderTime, int amount) throws Exception {
|
||||||
|
long now = TimeUtils.now();
|
||||||
Result resultRes = new Result();
|
Result resultRes = new Result();
|
||||||
resultRes.setResultCode(0);
|
resultRes.setResultCode(0);
|
||||||
ISession session = OnlineUserManager.getSessionByUid(uid);
|
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||||
LOGGER.info("sendGoods to uid={},the goods={},openID={},orderId={},orderTime={},amount={}",uid,sdkGoodsId,openId,orderId,orderTime,amount);
|
LOGGER.info("sendGoods to uid={},the goods={},openID={},orderId={},orderTime={},amount={}",uid,sdkGoodsId,openId,orderId,orderTime,amount);
|
||||||
|
LOGGER.info("购买礼包耗时1:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
if (!StringUtil.isNumeric(sdkGoodsId)){
|
if (!StringUtil.isNumeric(sdkGoodsId)){
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
@ -209,13 +211,15 @@ public class BuyGoodsNewLogic {
|
||||||
LOGGER.error("sendGoods 金额校验失败, uid={},the goodId={}, currentPrice={},realPrice={}",uid,goodsId, amount,price);
|
LOGGER.error("sendGoods 金额校验失败, uid={},the goodId={}, currentPrice={},realPrice={}",uid,goodsId, amount,price);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时2:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
RechargeHandler rechargeHandler = getRechargeHandler(config.getOtype());
|
RechargeHandler rechargeHandler = getRechargeHandler(config.getOtype());
|
||||||
AbstractWelfareBag bag = rechargeHandler.getBag(user, goodsId);
|
AbstractWelfareBag bag = rechargeHandler.getBag(user, goodsId);
|
||||||
// 礼包购买
|
// 礼包购买
|
||||||
bag.buy();
|
bag.buy();
|
||||||
|
LOGGER.info("购买礼包耗时3:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
int[] forbid = config.getForbid();
|
int[] forbid = config.getForbid();
|
||||||
if(forbid != null){
|
if(forbid != null){
|
||||||
//每日礼包一键购买之后,把所有单个的每日礼包的购买次数加一
|
//每日礼包一键购买之后,把所有单个的每日礼包的购买次数加一
|
||||||
|
@ -237,9 +241,12 @@ public class BuyGoodsNewLogic {
|
||||||
list.add(gainCrystal);
|
list.add(gainCrystal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时4:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
//处理特权
|
//处理特权
|
||||||
activePrivilege(user,config);
|
activePrivilege(user,config);
|
||||||
|
LOGGER.info("购买礼包耗时5:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 校验
|
// 校验
|
||||||
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
|
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
|
||||||
if(config.getAccumulativeRecharge() == 1){
|
if(config.getAccumulativeRecharge() == 1){
|
||||||
|
@ -248,18 +255,25 @@ public class BuyGoodsNewLogic {
|
||||||
//活动
|
//活动
|
||||||
changeActivity(user,price,info);
|
changeActivity(user,price,info);
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时6:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
if(getFirstRechargeTime(uid) == 0){
|
if(getFirstRechargeTime(uid) == 0){
|
||||||
setFirstRecharge(uid);
|
setFirstRecharge(uid);
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时7:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 全部礼包状态推送
|
// 全部礼包状态推送
|
||||||
sendGiftGoodsWithoutJudge(uid);
|
sendGiftGoodsWithoutJudge(uid);
|
||||||
|
LOGGER.info("购买礼包耗时8:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 推送礼包
|
// 推送礼包
|
||||||
openPush(session,user, PushRechargeType.point_recharge.getType(),goodsId);
|
openPush(session,user, PushRechargeType.point_recharge.getType(),goodsId);
|
||||||
|
LOGGER.info("购买礼包耗时9:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 惊喜礼盒,事件推送
|
// 惊喜礼盒,事件推送
|
||||||
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),config.getId(),1,1));
|
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),config.getId(),1,1));
|
||||||
|
LOGGER.info("购买礼包耗时10:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// gm充值不进行单笔充值活动
|
// gm充值不进行单笔充值活动
|
||||||
if (!gm_modifier.equals(orderId)){
|
if (!gm_modifier.equals(orderId)){
|
||||||
// 单笔充值
|
// 单笔充值
|
||||||
|
@ -267,12 +281,16 @@ public class BuyGoodsNewLogic {
|
||||||
// 线下自动返利
|
// 线下自动返利
|
||||||
Poster.getPoster().dispatchEvent(new AutoRechargeBackEvent(user.getId(),goodsId,orderId));
|
Poster.getPoster().dispatchEvent(new AutoRechargeBackEvent(user.getId(),goodsId,orderId));
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时11:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 发货
|
// 发货
|
||||||
sendGoodsByType(user,config,list);
|
sendGoodsByType(user,config,list);
|
||||||
|
LOGGER.info("购买礼包耗时12:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
// 通知前端
|
// 通知前端
|
||||||
notifyPaySuccessFul(uid,goodsId,amount != -999);
|
notifyPaySuccessFul(uid,goodsId,amount != -999);
|
||||||
|
LOGGER.info("购买礼包耗时13:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
//发送邮件
|
//发送邮件
|
||||||
int[] mail = config.getMail();
|
int[] mail = config.getMail();
|
||||||
if(config.getPrice()!=0&&mail!=null&&mail.length>1){
|
if(config.getPrice()!=0&&mail!=null&&mail.length>1){
|
||||||
|
@ -280,7 +298,8 @@ public class BuyGoodsNewLogic {
|
||||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert(SErrorCodeEerverConfig.errorMap.get(mail[1]).getkey(), new Object[]{config.getName()}, new int[]{1}, "#");
|
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert(SErrorCodeEerverConfig.errorMap.get(mail[1]).getkey(), new Object[]{config.getName()}, new int[]{1}, "#");
|
||||||
MailLogic.getInstance().sendMail(uid,title,content,"",TimeUtils.nowInt(),Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(uid,title,content,"",TimeUtils.nowInt(),Global.MAIL_EFFECTIVE_TIME);
|
||||||
}
|
}
|
||||||
|
LOGGER.info("购买礼包耗时14:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
resultRes.setResultCode(1);
|
resultRes.setResultCode(1);
|
||||||
// 只记录真实充值
|
// 只记录真实充值
|
||||||
if(price>0 && isRmbBuy(orderId)) {
|
if(price>0 && isRmbBuy(orderId)) {
|
||||||
|
@ -291,8 +310,10 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
// 更新入库
|
// 更新入库
|
||||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||||
|
LOGGER.info("购买礼包耗时15:{}", TimeUtils.now() - now);
|
||||||
|
now = TimeUtils.now();
|
||||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.RECHARGE_SUCCESS_INDICATION_VALUE, PlayerInfoProto.RechargeSuccessIndication.newBuilder().setOrderId(orderId).build(), true);
|
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.RECHARGE_SUCCESS_INDICATION_VALUE, PlayerInfoProto.RechargeSuccessIndication.newBuilder().setOrderId(orderId).build(), true);
|
||||||
|
LOGGER.info("购买礼包耗时16:{}", TimeUtils.now() - now);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue