充值商店刷新次数
parent
be46197ed2
commit
9870d36663
|
@ -5,6 +5,7 @@ import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||||
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.store.StoreLogic;
|
||||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.protocols.CommonProto;
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
|
@ -50,6 +51,8 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
MapLogic.getInstance().resetDayInfo(user);
|
MapLogic.getInstance().resetDayInfo(user);
|
||||||
//活动刷新
|
//活动刷新
|
||||||
ActivityLogic.getInstance().flushEveryDay(user);
|
ActivityLogic.getInstance().flushEveryDay(user);
|
||||||
|
//商店刷新次数重置
|
||||||
|
StoreLogic.resetStoreRefreshNum(userId);
|
||||||
}
|
}
|
||||||
user.getPlayerInfoManager().setLoginTime(TimeUtils.now());
|
user.getPlayerInfoManager().setLoginTime(TimeUtils.now());
|
||||||
Map<Integer, Integer> guidePoints = user.getPlayerInfoManager().getGuidePoints();
|
Map<Integer, Integer> guidePoints = user.getPlayerInfoManager().getGuidePoints();
|
||||||
|
|
|
@ -281,5 +281,20 @@ public class StoreLogic {
|
||||||
PlayerInfoProto.StoreGoodsRefreshResponse builder = PlayerInfoProto.StoreGoodsRefreshResponse.newBuilder().setStoreInfo(storeBuilder).build();
|
PlayerInfoProto.StoreGoodsRefreshResponse builder = PlayerInfoProto.StoreGoodsRefreshResponse.newBuilder().setStoreInfo(storeBuilder).build();
|
||||||
MessageUtil.sendMessage(iSession, 1,msgId, builder, true);
|
MessageUtil.sendMessage(iSession, 1,msgId, builder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置商店刷新次数
|
||||||
|
* @param uid
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static void resetStoreRefreshNum(int uid) throws Exception {
|
||||||
|
User user = UserManager.getUser(uid);
|
||||||
|
StoreManager storeManager = user.getStoreManager();
|
||||||
|
Map<Integer, StoreInfo> storeInfoMap = storeManager.getStoreInfoMap();
|
||||||
|
for (Map.Entry<Integer, StoreInfo> entry: storeInfoMap.entrySet()){
|
||||||
|
StoreInfo storeInfo = entry.getValue();
|
||||||
|
storeInfo.setRefreshNum(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue