Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
b7cd108b76
|
@ -15,6 +15,8 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
||||||
|
|
||||||
private int id;
|
private int id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
private int price;
|
private int price;
|
||||||
|
@ -186,6 +188,9 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
||||||
return contiueDays;
|
return contiueDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public void setStartTimeLong(long startTimeLong) {
|
public void setStartTimeLong(long startTimeLong) {
|
||||||
this.startTimeLong = startTimeLong;
|
this.startTimeLong = startTimeLong;
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.hotfix.DoFix;
|
||||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||||
import com.ljsd.jieling.logic.store.BuyGoodsLogic;
|
import com.ljsd.jieling.logic.store.BuyGoodsLogic;
|
||||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
|
@ -127,6 +128,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
try {
|
try {
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||||
ActivityLogic.getInstance().flushForLogin(user);
|
ActivityLogic.getInstance().flushForLogin(user);
|
||||||
|
DoFix.getInstance().loginFix(user);
|
||||||
RedisUtil.getInstence().set(RedisKey.USER_LOGIN_URL + userId, RPCServerTask.userCallBackUrl);
|
RedisUtil.getInstence().set(RedisKey.USER_LOGIN_URL + userId, RPCServerTask.userCallBackUrl);
|
||||||
LOGGER.info("back to client!");
|
LOGGER.info("back to client!");
|
||||||
if(user.getPlayerInfoManager().getGuidePoints().get(1)!=-1){
|
if(user.getPlayerInfoManager().getGuidePoints().get(1)!=-1){
|
||||||
|
|
|
@ -73,7 +73,11 @@ public class KtEventUtils {
|
||||||
int costTotal = (int)parm[4];
|
int costTotal = (int)parm[4];
|
||||||
paramEventBean.add(String.valueOf(storeId));
|
paramEventBean.add(String.valueOf(storeId));
|
||||||
paramEventBean.add(String.valueOf(buyItemId));
|
paramEventBean.add(String.valueOf(buyItemId));
|
||||||
|
if(currencyMap.containsKey(goldType)){
|
||||||
paramEventBean.add(currencyMap.get(goldType));
|
paramEventBean.add(currencyMap.get(goldType));
|
||||||
|
}else{
|
||||||
|
paramEventBean.add(Integer.toString(goldType));
|
||||||
|
}
|
||||||
paramEventBean.add(String.valueOf(buyTimes));
|
paramEventBean.add(String.valueOf(buyTimes));
|
||||||
paramEventBean.add(String.valueOf(costTotal/buyTimes));
|
paramEventBean.add(String.valueOf(costTotal/buyTimes));
|
||||||
paramEventBean.add(String.valueOf(costTotal));
|
paramEventBean.add(String.valueOf(costTotal));
|
||||||
|
@ -84,7 +88,7 @@ public class KtEventUtils {
|
||||||
String payValid = payResult[(int)parm[2]];
|
String payValid = payResult[(int)parm[2]];
|
||||||
String amount = String.valueOf( ((int)parm[3]/10));
|
String amount = String.valueOf( ((int)parm[3]/10));
|
||||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||||
paramEventBean.add("IN_GAME_"+sRechargeCommodityConfig.getType());
|
paramEventBean.add(sRechargeCommodityConfig.getName());
|
||||||
paramEventBean.add(orderId);
|
paramEventBean.add(orderId);
|
||||||
paramEventBean.add(payValid);
|
paramEventBean.add(payValid);
|
||||||
paramEventBean.add(amount);
|
paramEventBean.add(amount);
|
||||||
|
|
|
@ -74,6 +74,8 @@ public class PlayerManager extends MongoBase {
|
||||||
|
|
||||||
private int rechargedaily;
|
private int rechargedaily;
|
||||||
|
|
||||||
|
private Set<Integer> fixIds = new CopyOnWriteArraySet<>();
|
||||||
|
|
||||||
public PlayerManager(){
|
public PlayerManager(){
|
||||||
this.setRootCollection(User._COLLECTION_NAME);
|
this.setRootCollection(User._COLLECTION_NAME);
|
||||||
}
|
}
|
||||||
|
@ -409,4 +411,15 @@ public class PlayerManager extends MongoBase {
|
||||||
public void addRechargedaily(int rechargedaily) {
|
public void addRechargedaily(int rechargedaily) {
|
||||||
this.rechargedaily += rechargedaily;
|
this.rechargedaily += rechargedaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Set<Integer> getFixIds() {
|
||||||
|
return fixIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFixIds(Set<Integer> fixIds) {
|
||||||
|
updateString("fixIds", fixIds);
|
||||||
|
this.fixIds = fixIds;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.ljsd.jieling.logic.hotfix;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.ActivityManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.ActivityMission;
|
||||||
|
import com.ljsd.jieling.logic.dao.ActivityProgressInfo;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class DoFix {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储被热修复的记录
|
||||||
|
* fix id 10000 修复活动记录值缺失
|
||||||
|
*/
|
||||||
|
public static class Holder {
|
||||||
|
public final static DoFix instance = new DoFix();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DoFix getInstance() {
|
||||||
|
return DoFix.Holder.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int fixIndex = 10002;
|
||||||
|
|
||||||
|
public void loginFix(User user) throws Exception {
|
||||||
|
|
||||||
|
Set<Integer> fixIds = user.getPlayerInfoManager().getFixIds();
|
||||||
|
if (fixIds.contains(10004)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fixIds.add(fixIndex);
|
||||||
|
user.getPlayerInfoManager().setFixIds(fixIds);
|
||||||
|
|
||||||
|
fixActivityValue(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fixActivityValue(User user) throws Exception {
|
||||||
|
int activityId = 14;
|
||||||
|
ActivityManager activityManager = user.getActivityManager();
|
||||||
|
ActivityMission activityMission = activityManager.getActivityMissionMap().get(activityId);
|
||||||
|
if(activityMission.getValue()!=0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int sum = 0;
|
||||||
|
for (Map.Entry<Integer, ActivityProgressInfo> entry : activityMission.getActivityProgressInfoMap().entrySet()) {
|
||||||
|
if (entry.getValue().getProgrss() == 1) {
|
||||||
|
sum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(sum==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
activityMission.setValue(sum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -49,7 +49,7 @@ public class WorkShopLogic {
|
||||||
oldLevl = workShopController.getTechnologyMap().get(profession).get(techId);
|
oldLevl = workShopController.getTechnologyMap().get(profession).get(techId);
|
||||||
}
|
}
|
||||||
SWorkShopTechnology sWorkShopTechnology = SWorkShopTechnology.getsWorkTechMapByTechIdAndLevel(techId, oldLevl);
|
SWorkShopTechnology sWorkShopTechnology = SWorkShopTechnology.getsWorkTechMapByTechIdAndLevel(techId, oldLevl);
|
||||||
if(sWorkShopTechnology == null){
|
if(sWorkShopTechnology == null || sWorkShopTechnology.getConsume().length<=0){
|
||||||
MessageUtil.sendErrorResponse(iSession,0,msgId,"maxLevel");
|
MessageUtil.sendErrorResponse(iSession,0,msgId,"maxLevel");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue