master
parent
90cc9fe340
commit
da28610e0b
|
|
@ -82,10 +82,12 @@ public class HandlerGroupMemberRound implements IHandler {
|
|||
(int) (cur_time));
|
||||
|
||||
if (score == 0) {
|
||||
EventServer.log.info("洗牌保底:" +( score - xipai_total - param.getInt("pumpBase")));
|
||||
|
||||
sql = String.format(
|
||||
"INSERT INTO group_hp_log(gid,uid,reason,hp,cur_hp,pid,roomid,time) "
|
||||
+ "VALUES(%s,%s,%s,%s,%s,%s,%s,%s)",
|
||||
groupId, uid, ConsumeCode.HP_PUMP_BAODI, score - xipai_total - pumpReal , cur_hp, pid, roomid,
|
||||
groupId, uid, ConsumeCode.HP_PUMP_BAODI, score - xipai_total - param.getInt("pumpBase") , cur_hp, pid, roomid,
|
||||
(int) (cur_time));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -940,8 +940,9 @@ public class GroupLogService {
|
|||
param.putInt("win_round", win_round);
|
||||
|
||||
int total_round = _getCountValue(jedis9, key + "round_log" + self, beginTime, endTime);
|
||||
int total_win = _getCountValue(jedis9, key + "total_win" + self, beginTime, endTime);
|
||||
|
||||
String roundSql = "select ifnull(sum(round_cnt),0) round_cnt,ifnull(sum(bigwin_cnt),0) bigwin_cnt from team_round_stat_day where uid="
|
||||
String roundSql = "select ifnull(sum(round_cnt),0) round_cnt,ifnull(sum(bigwin_cnt),0) bigwin_cnt,ifnull(sum(win_score),0) win_score,ifnull(sum(round_reward),0) round_reward from team_round_stat_day where uid="
|
||||
+ uid + " and stat_day>=" + beginTime + " and stat_day<" + endTime;
|
||||
log.info("roundSql:" + roundSql);
|
||||
|
||||
|
|
@ -954,13 +955,20 @@ public class GroupLogService {
|
|||
valid_round = userData.getDouble("bigwin_cnt").intValue() > 0
|
||||
? userData.getDouble("bigwin_cnt").intValue()
|
||||
: valid_round;
|
||||
total_win = userData.getDouble("win_score").intValue() != 0
|
||||
? userData.getDouble("win_score").intValue()
|
||||
: total_win;
|
||||
reward_hp = userData.getDouble("round_reward").intValue() > 0
|
||||
? userData.getDouble("round_reward").intValue()
|
||||
: reward_hp;
|
||||
|
||||
|
||||
}
|
||||
// if (beginTime==1753286400&&endTime==1753372800){
|
||||
// param.putInt("total_round" , total_round+valid_round/100);
|
||||
// }else {
|
||||
// param.putInt("total_round" , total_round);
|
||||
// }
|
||||
int total_win = _getCountValue(jedis9, key + "total_win" + self, beginTime, endTime);
|
||||
// g{618028}:m668628:xipai_reward_log_to:par100095:d1758470400
|
||||
// int xipai_hp_cost = jedis9.getInt("g{"+groupId+"}:m668628:xipai_reward_log_to:par100095:d1758470400");
|
||||
|
||||
|
|
@ -1006,6 +1014,7 @@ public class GroupLogService {
|
|||
}
|
||||
String cost_key = jedis9.get("g{" + groupId + "}:m" + uid + ":xipai_cost:d" + beginTime + "");
|
||||
int xipai_cost = cost_key == null ? 0 : Integer.parseInt(cost_key);
|
||||
log.info("xipai_cost:" + xipai_cost);
|
||||
|
||||
param.putInt("total_win", total_win - xipai_cost); // 总赢分
|
||||
param.putInt("total_round", total_round);// 总场次
|
||||
|
|
@ -1024,18 +1033,41 @@ public class GroupLogService {
|
|||
}
|
||||
|
||||
int win_round = _getNumValue(jedis9, key + "valid_round" + self + curMonth);
|
||||
param.putInt("win_round", win_round);
|
||||
|
||||
int valid_round = _getValue(jedis9, key + "valid_round" + self + curMonth);
|
||||
param.putInt("valid_round", valid_round);
|
||||
|
||||
int total_round = _getValue(jedis9, key + "round_log" + self + curMonth);
|
||||
param.putInt("total_round", total_round);
|
||||
|
||||
int total_win = _getValue(jedis9, key + "total_win" + self + curMonth);
|
||||
String cost_key = jedis9.get("g{" + groupId + "}:m" + uid + ":xipai_cost:d" + beginTime + "");
|
||||
int xipai_cost = cost_key == null ? 0 : Integer.parseInt(cost_key);
|
||||
log.info("xipai_cost:" + xipai_cost);
|
||||
|
||||
param.putInt("total_win", total_win);
|
||||
String roundSql = "select ifnull(sum(round_cnt),0) round_cnt,ifnull(sum(bigwin_cnt),0) bigwin_cnt,ifnull(sum(win_score),0) win_score,ifnull(sum(round_reward),0) round_reward from team_round_stat_day where uid="
|
||||
+ uid + " and stat_day>=" + beginTime + " and stat_day<" + endTime;
|
||||
log.info("timeType==1--roundSql:" + roundSql);
|
||||
|
||||
ITArray roundArr = DataBase.use().executeQueryByTArray(roundSql);
|
||||
if (roundArr.size() > 0) {
|
||||
ITObject userData = roundArr.getTObject(0);
|
||||
total_round = userData.getDouble("round_cnt").intValue() > 0
|
||||
? userData.getDouble("round_cnt").intValue()
|
||||
: total_round;
|
||||
valid_round = userData.getDouble("bigwin_cnt").intValue() > 0
|
||||
? userData.getDouble("bigwin_cnt").intValue()
|
||||
: valid_round;
|
||||
total_win = userData.getDouble("win_score").intValue() !=0
|
||||
? userData.getDouble("win_score").intValue()
|
||||
: total_win;
|
||||
|
||||
|
||||
}
|
||||
param.putInt("valid_round", valid_round);
|
||||
param.putInt("total_round", total_round);
|
||||
param.putInt("win_round", win_round);
|
||||
param.putInt("total_win", total_win-xipai_cost);
|
||||
|
||||
|
||||
ITObject gallc = GroupService.getAllHpCache(groupId, uid, 30);
|
||||
param.putTObject("hpall", gallc);
|
||||
} else if (timeType == 2) {
|
||||
|
|
@ -1048,16 +1080,39 @@ public class GroupLogService {
|
|||
}
|
||||
|
||||
int win_round = _getNumValue(jedis9, key + "valid_round" + self + curMonth);
|
||||
param.putInt("win_round", win_round);
|
||||
|
||||
int valid_round = _getValue(jedis9, key + "valid_round" + self + curMonth);
|
||||
param.putInt("valid_round", valid_round);
|
||||
|
||||
int total_round = _getValue(jedis9, key + "round_log" + self + curMonth);
|
||||
param.putInt("total_round", total_round);
|
||||
|
||||
int total_win = _getValue(jedis9, key + "total_win" + self + curMonth);
|
||||
param.putInt("total_win", total_win);
|
||||
String cost_key = jedis9.get("g{" + groupId + "}:m" + uid + ":xipai_cost:d" + beginTime + "");
|
||||
int xipai_cost = cost_key == null ? 0 : Integer.parseInt(cost_key);
|
||||
log.info("xipai_cost:" + xipai_cost);
|
||||
|
||||
String roundSql = "select ifnull(sum(round_cnt),0) round_cnt,ifnull(sum(bigwin_cnt),0) bigwin_cnt,ifnull(sum(win_score),0) win_score,ifnull(sum(round_reward),0) round_reward from team_round_stat_day where uid="
|
||||
+ uid + " and stat_day>=" + beginTime + " and stat_day<" + endTime;
|
||||
log.info("timeType==2--roundSql:" + roundSql);
|
||||
|
||||
ITArray roundArr = DataBase.use().executeQueryByTArray(roundSql);
|
||||
if (roundArr.size() > 0) {
|
||||
ITObject userData = roundArr.getTObject(0);
|
||||
total_round = userData.getDouble("round_cnt").intValue() > 0
|
||||
? userData.getDouble("round_cnt").intValue()
|
||||
: total_round;
|
||||
valid_round = userData.getDouble("bigwin_cnt").intValue() > 0
|
||||
? userData.getDouble("bigwin_cnt").intValue()
|
||||
: valid_round;
|
||||
total_win = userData.getDouble("win_score").intValue() !=0
|
||||
? userData.getDouble("win_score").intValue()
|
||||
: total_win;
|
||||
|
||||
|
||||
}
|
||||
param.putInt("total_win", total_win-xipai_cost);
|
||||
param.putInt("total_round", total_round);
|
||||
param.putInt("valid_round", valid_round);
|
||||
param.putInt("win_round", win_round);
|
||||
|
||||
ITObject gallc = GroupService.getAllHpCache(groupId, uid, 30);
|
||||
param.putTObject("hpall", gallc);
|
||||
|
|
@ -1929,6 +1984,8 @@ public class GroupLogService {
|
|||
}
|
||||
if ((choose & CHOOSE_CHAGE) != 0) {
|
||||
reason_sql += ConsumeCode.HP_PUMP_TOTAL + ",";
|
||||
reason_sql += ConsumeCode.HP_PUMP_BAODI + ",";
|
||||
|
||||
}
|
||||
if ((choose & CHOOSE_TRADE) != 0) {
|
||||
reason_sql += ConsumeCode.HP_TRADE + ",";
|
||||
|
|
@ -1939,7 +1996,7 @@ public class GroupLogService {
|
|||
if ((choose & CHOOSE_XIPAI) != 0) {
|
||||
reason_sql += ConsumeCode.HP_PARTNER_XIPAI_REWARD + ",";
|
||||
}
|
||||
reason_sql += ConsumeCode.HP_PUMP_BAODI + ",";
|
||||
|
||||
|
||||
// reason_sql +=ConsumeCode.HP_CLEARING+ ",";
|
||||
|
||||
|
|
@ -1986,6 +2043,8 @@ public class GroupLogService {
|
|||
reason_sql += ConsumeCode.HP_CLEARING + ",";
|
||||
reason_sql += ConsumeCode.HP_PUMP + ",";
|
||||
reason_sql += ConsumeCode.HP_XIPAI_PUMP + ",";
|
||||
// reason_sql += ConsumeCode.HP_PUMP_BAODI + ",";
|
||||
|
||||
if (StringUtil.isNotEmpty(reason_sql)) {
|
||||
reason_sql = reason_sql.substring(0, reason_sql.length() - 1);
|
||||
} else {
|
||||
|
|
@ -1998,6 +2057,7 @@ public class GroupLogService {
|
|||
String sql = String.format(
|
||||
"SELECT mgr_id,hp,reason,cur_hp,time,info,roomid " + "FROM group_hp_log %s " + "ORDER BY time desc",
|
||||
where_sql);
|
||||
log.info("详情sql:"+sql);
|
||||
try {
|
||||
ITArray arr = DataBase.use().executeQueryByTArray(sql);
|
||||
for (int i = 0; i < arr.size(); ++i) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue