diff --git a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java index d76907821..b0e404568 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/ReportEventEnum.java @@ -15,85 +15,85 @@ public enum ReportEventEnum { CREATE_ACCOUNT(1,"create_account", new CreateRoleEventHandler(),new String[]{""}), APP_LOGIN(2,"app_login", new LoginEventHandler(),new String[]{""}), CREATE_ROLE(3,"create_role", new CreateRoleEventHandler(),new String[]{"role_name"}), -// GUIDE(4,"guide", new CommonEventHandler(),new String[]{"step_id"}), +// GUIDE(4,"guide", CommonEventHandler.getInstance(),new String[]{"step_id"}), LEVEL_UP(5,"level_up", new UserLevelUpEventHandler(),new String[]{"level","promotion_level","improved_level"}), - MISSION_START(6,"mission_start", new CommonEventHandler(),new String[]{"mission_id","mission_name"}), - MISSION_COMPLETE(7,"mission_complete", new CommonEventHandler(),new String[]{"mission_id","mission_name","reward_list","mission_start_time"}), - JOIN_ACTIVITY(8,"join_activity", new CommonEventHandler(),new String[]{"activity_id","activity_name"}), - COMPLETE_ACTIVITY(9,"complete_activity", new CommonEventHandler(),new String[]{"activity_id","mission_id","rewards_id_list","rewards_num_list","take_time"}), - ENTER_STAGE(10,"enter_stage", new CommonEventHandler(),new String[]{"stage_id","stage_name"}), + MISSION_START(6,"mission_start", CommonEventHandler.getInstance(),new String[]{"mission_id","mission_name"}), + MISSION_COMPLETE(7,"mission_complete", CommonEventHandler.getInstance(),new String[]{"mission_id","mission_name","reward_list","mission_start_time"}), + JOIN_ACTIVITY(8,"join_activity", CommonEventHandler.getInstance(),new String[]{"activity_id","activity_name"}), + COMPLETE_ACTIVITY(9,"complete_activity", CommonEventHandler.getInstance(),new String[]{"activity_id","mission_id","rewards_id_list","rewards_num_list","take_time"}), + ENTER_STAGE(10,"enter_stage", CommonEventHandler.getInstance(),new String[]{"stage_id","stage_name"}), PASS_STAGE(11,"pass_stage", new PassStageEventHandler(),new String[]{"stage_id","stage_name"}), - GET_HERO(12,"get_hero", new CommonEventHandler(),new String[]{"hero_id","quality","get_type"}), - HERO_STRENGTHEN(13,"hero_strengthen", new CommonEventHandler(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list","cost_hero_list"}), - GET_EQUIP(14,"get_equip", new CommonEventHandler(),new String[]{"equip_id","quality","get_type"}), - EQUIP_STRENGTHEN(15,"equip_strengthen", new CommonEventHandler(),new String[]{"equip_id","old_quality","new_quality","strengthen_type","cost_item_list"}), - GET_ITEM(16,"get_item", new CommonEventHandler(),new String[]{"get_amount","get_entrance","item_id","item_name","price"}), - COST_ITEM(17,"cost_item", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance","item_id","item_name"}), - GET_COINS(18,"get_coins", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}), - COST_COINS(19,"cost_coins", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}), - GET_AMULET(20,"get_amulet", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}), - COST_AMULET(21,"cost_amulet", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}), - GET_DIAMOND(22,"get_diamond", new CommonEventHandler(),new String[]{"get_amount","get_entrance","price"}), - COST_DIAMOND(23,"cost_diamond", new CommonEventHandler(),new String[]{"cost_amount","cost_entrance"}), - CREATE_GUILD(24,"create_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity"}), - JOIN_GUILD(25,"join_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), - QUIT_GUILD(26,"quit_guild", new CommonEventHandler(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), - CREATE_ORDER(27,"create_order", new CommonEventHandler(),new String[]{"order_id","order_money_amount","Bundle_id","entrance","item_id","item_name","goods_id","item_list"}), + GET_HERO(12,"get_hero", CommonEventHandler.getInstance(),new String[]{"hero_id","quality","get_type"}), + HERO_STRENGTHEN(13,"hero_strengthen", CommonEventHandler.getInstance(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list","cost_hero_list"}), + GET_EQUIP(14,"get_equip", CommonEventHandler.getInstance(),new String[]{"equip_id","quality","get_type"}), + EQUIP_STRENGTHEN(15,"equip_strengthen", CommonEventHandler.getInstance(),new String[]{"equip_id","old_quality","new_quality","strengthen_type","cost_item_list"}), + GET_ITEM(16,"get_item", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","item_id","item_name","price"}), + COST_ITEM(17,"cost_item", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance","item_id","item_name"}), + GET_COINS(18,"get_coins", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_COINS(19,"cost_coins", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + GET_AMULET(20,"get_amulet", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_AMULET(21,"cost_amulet", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + GET_DIAMOND(22,"get_diamond", CommonEventHandler.getInstance(),new String[]{"get_amount","get_entrance","price"}), + COST_DIAMOND(23,"cost_diamond", CommonEventHandler.getInstance(),new String[]{"cost_amount","cost_entrance"}), + CREATE_GUILD(24,"create_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity"}), + JOIN_GUILD(25,"join_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), + QUIT_GUILD(26,"quit_guild", CommonEventHandler.getInstance(),new String[]{"guild_id","guild_name","guild_level","guild_people_num","guild_fighting_capacity","guild_create_time"}), + CREATE_ORDER(27,"create_order", CommonEventHandler.getInstance(),new String[]{"order_id","order_money_amount","Bundle_id","entrance","item_id","item_name","goods_id","item_list"}), ORDER_COMPLETE(28,"order_complete", new ChargeAmountEventHandler(),new String[]{"order_id","order_money_amount","Bundle_id","channel_id","server_id","goods_id","goods_name","rewards_id_list","rewards_num_list","charge_time","device_id"}), - CHECK_RANKING(29,"check_ranking", new CommonEventHandler(),new String[]{"ranking_type"}), - ASK_FOR_BEING_FRIENDS(30,"ask_for_being_friends", new CommonEventHandler(),new String[]{"target_id","target_name","target_level","entrance"}), - ALLOW_FRIENDS_ASK(31,"allow_friends_ask", new CommonEventHandler(),new String[]{"target_id","target_name","target_level","entrance"}), - SEND_MESSAGE(32,"send_message", new CommonEventHandler(),new String[]{"message_type","message_content","send_time"}), - OPEN_MAIL(33,"open_mail", new CommonEventHandler(),new String[]{""}), + CHECK_RANKING(29,"check_ranking", CommonEventHandler.getInstance(),new String[]{"ranking_type"}), + ASK_FOR_BEING_FRIENDS(30,"ask_for_being_friends", CommonEventHandler.getInstance(),new String[]{"target_id","target_name","target_level","entrance"}), + ALLOW_FRIENDS_ASK(31,"allow_friends_ask", CommonEventHandler.getInstance(),new String[]{"target_id","target_name","target_level","entrance"}), + SEND_MESSAGE(32,"send_message", CommonEventHandler.getInstance(),new String[]{"message_type","message_content","send_time"}), + OPEN_MAIL(33,"open_mail", CommonEventHandler.getInstance(),new String[]{""}), //-------新一期 - COMPLETE_DAILY_DUNGEON(35,"complete_daily_dungeon", new CommonEventHandler(),new String[]{"stage_id","stage_type","enemy_id","enemy_capacity","start_time","enemy_hero_list","left_challenge_nums","rewards_id_list","rewards_num_list","pass_type","Combat_results"}), + COMPLETE_DAILY_DUNGEON(35,"complete_daily_dungeon", CommonEventHandler.getInstance(),new String[]{"stage_id","stage_type","enemy_id","enemy_capacity","start_time","enemy_hero_list","left_challenge_nums","rewards_id_list","rewards_num_list","pass_type","Combat_results"}), - COMPLETE_XINMO(37,"complete_xinmo", new CommonEventHandler(),new String[]{"stage_id","enemy_id","enemy_capacity","start_time","enemy_hero_list","rewards_id_list","rewards_num_list","Combat_results"}), + COMPLETE_XINMO(37,"complete_xinmo", CommonEventHandler.getInstance(),new String[]{"stage_id","enemy_id","enemy_capacity","start_time","enemy_hero_list","rewards_id_list","rewards_num_list","Combat_results"}), - COMPLETE_CHECHI(39,"start_chechi", new CommonEventHandler(),new String[]{"stage_id","stage_type","Integral_entrance","Integral"}), + COMPLETE_CHECHI(39,"start_chechi", CommonEventHandler.getInstance(),new String[]{"stage_id","stage_type","Integral_entrance","Integral"}), - START_PANOPTIC_MIRROR(40,"start_panoptic_mirror",new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}), + START_PANOPTIC_MIRROR(40,"start_panoptic_mirror",CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), - CHALLENGE_PANOPTIC_MIRROR_ENEMY(41,"challenge_panoptic_mirror_enemy", new CommonEventHandler(),new String[]{"Panoptic_Mirror_id","battle_result","hero_id"}), + CHALLENGE_PANOPTIC_MIRROR_ENEMY(41,"challenge_panoptic_mirror_enemy", CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id","battle_result","hero_id"}), - COMPLETE_PANOPTIC_MIRROR(42,"complete_panoptic_mirror", new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}), + COMPLETE_PANOPTIC_MIRROR(42,"complete_panoptic_mirror", CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), - EQUIP_SYNTHESIS(43,"equip_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), + EQUIP_SYNTHESIS(43,"equip_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), - TREASURE_SYNTHESIS(44,"treasure_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), + TREASURE_SYNTHESIS(44,"treasure_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}), - FATALITY_SYNTHESIS(45,"fatality_synthesis", new CommonEventHandler(),new String[]{"item_id","item_name","cost_item_id"}), - NORMAL_SUMMON(46,"Normal_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FATALITY_SYNTHESIS(45,"fatality_synthesis", CommonEventHandler.getInstance(),new String[]{"item_id","item_name","cost_item_id"}), + NORMAL_SUMMON(46,"Normal_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - FRIENDSHIP_SUMMON(47,"friendship_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FRIENDSHIP_SUMMON(47,"friendship_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - GODS_SUMMON(48,"gods_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + GODS_SUMMON(48,"gods_summon", CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - SUMMON_HERO(49,"summon_hero", new CommonEventHandler(),new String[]{"item_id","hero_group","get_amount"}),//四元阵 + SUMMON_HERO(49,"summon_hero", CommonEventHandler.getInstance(),new String[]{"item_id","hero_group","get_amount"}),//四元阵 - HERO_COMPOSITION(50,"hero_composition", new CommonEventHandler(),new String[]{"hero_id","hero_level","hero_quality","reward_list","reward_nums_list"}), + HERO_COMPOSITION(50,"hero_composition", CommonEventHandler.getInstance(),new String[]{"hero_id","hero_level","hero_quality","reward_list","reward_nums_list"}), - SEND_HERO(51,"send_hero", new CommonEventHandler(),new String[]{"hero_id","hero_level_list","hero_quality_list","reward_list","reward_nums_list"}), - TREASURE_DECOMPOSITION(52,"treasure_decomposition", new CommonEventHandler(),new String[]{"cost_item_list","reward_list","reward_nums_list"}), + SEND_HERO(51,"send_hero", CommonEventHandler.getInstance(),new String[]{"hero_id","hero_level_list","hero_quality_list","reward_list","reward_nums_list"}), + TREASURE_DECOMPOSITION(52,"treasure_decomposition", CommonEventHandler.getInstance(),new String[]{"cost_item_list","reward_list","reward_nums_list"}), - START_TIANGONG(53,"start_tiangong",new CommonEventHandler(),new String[]{"stage_level","stage_id","stage_type","Combat_results","rewards_id_list","rewards_num_list"}), - TREASURE_COMPOSITION(54,"treasure_composition",new CommonEventHandler(),new String[]{"hero_id","item_level","reward_list","reward_nums_list"}), + START_TIANGONG(53,"start_tiangong",CommonEventHandler.getInstance(),new String[]{"stage_level","stage_id","stage_type","Combat_results","rewards_id_list","rewards_num_list"}), + TREASURE_COMPOSITION(54,"treasure_composition",CommonEventHandler.getInstance(),new String[]{"hero_id","item_level","reward_list","reward_nums_list"}), - LEAVE_PANOPTIC_MIRROR(55,"leave_panoptic_mirror",new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}), - TIME_SUMMON(56,"Time_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - FATALITY_SUMMON(57,"fatality_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), - GET_BEAST(58,"get_beast",new CommonEventHandler(),new String[]{"beast_id","quality","get_type"}), - BEAST_LEVEL(59,"beast_level",new CommonEventHandler(),new String[]{"beast_id","old_level","new_level","cost_item_list_info"}), - BEAST_STAR(60,"beast_star",new CommonEventHandler(),new String[]{"beast_id","old_star","new_star","cost_item_list","cost_beast_list"}), - BEAST_SUMMON(61,"beast_summon",new CommonEventHandler(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), - BEAST_CABINET(62,"beast_cabinet",new CommonEventHandler(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), - GUESSING(63,"guessing",new CommonEventHandler(),new String[]{"season_id","guessing_type","stake_type","stake_num"}), + LEAVE_PANOPTIC_MIRROR(55,"leave_panoptic_mirror",CommonEventHandler.getInstance(),new String[]{"Panoptic_Mirror_id"}), + TIME_SUMMON(56,"Time_summon",CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + FATALITY_SUMMON(57,"fatality_summon",CommonEventHandler.getInstance(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}), + GET_BEAST(58,"get_beast",CommonEventHandler.getInstance(),new String[]{"beast_id","quality","get_type"}), + BEAST_LEVEL(59,"beast_level",CommonEventHandler.getInstance(),new String[]{"beast_id","old_level","new_level","cost_item_list_info"}), + BEAST_STAR(60,"beast_star",CommonEventHandler.getInstance(),new String[]{"beast_id","old_star","new_star","cost_item_list","cost_beast_list"}), + BEAST_SUMMON(61,"beast_summon",CommonEventHandler.getInstance(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), + BEAST_CABINET(62,"beast_cabinet",CommonEventHandler.getInstance(),new String[]{"beast_id","summon_type","cost_item_id","cost_amount","reward_nums_list"}), + GUESSING(63,"guessing",CommonEventHandler.getInstance(),new String[]{"season_id","guessing_type","stake_type","stake_num"}), - GUESS_OVER(64,"guess_over",new CommonEventHandler(),new String[]{"season_id","guessing_type","stake_type","rewards_num"}), + GUESS_OVER(64,"guess_over",CommonEventHandler.getInstance(),new String[]{"season_id","guessing_type","stake_type","rewards_num"}), - GET_TREASURE(65,"get_treasure",new CommonEventHandler(),new String[]{"treasure_id","get_entrance"}), - ARENA_CHALLENGE(66,"arena_challenge",new CommonEventHandler(),new String[]{"battle_result","own_integral_num","rewards_num","own_new_integral_num","own_ranking","role_id","enemy_integral_num","new_enemy_integral_num","enemy_ranking","hero1","hero2","hero3","hero4","hero5","hero6","attack_pokemon","defend_hero1","defend_hero2","defend_hero3","defend_hero4","defend_hero5","defend_hero6","defend_pokemon"}), - CEREMONY(67,"ceremony",new CommonEventHandler(),new String[]{"cost_item_id","integral_num","new_integral_num","own_ranking","guild_ranking"}), + GET_TREASURE(65,"get_treasure",CommonEventHandler.getInstance(),new String[]{"treasure_id","get_entrance"}), + ARENA_CHALLENGE(66,"arena_challenge",CommonEventHandler.getInstance(),new String[]{"battle_result","own_integral_num","rewards_num","own_new_integral_num","own_ranking","role_id","enemy_integral_num","new_enemy_integral_num","enemy_ranking","hero1","hero2","hero3","hero4","hero5","hero6","attack_pokemon","defend_hero1","defend_hero2","defend_hero3","defend_hero4","defend_hero5","defend_hero6","defend_pokemon"}), + CEREMONY(67,"ceremony",CommonEventHandler.getInstance(),new String[]{"cost_item_id","integral_num","new_integral_num","own_ranking","guild_ranking"}), VIP_LEVEL_UP(100,"", new VipLevelUpEventHandler(),new String[]{""}); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java index d29c32474..bed053abb 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/ktbeans/reportEvent/CommonEventHandler.java @@ -13,6 +13,17 @@ import java.util.Map; * @discribe */ public class CommonEventHandler implements IReportEvent { + + public CommonEventHandler() { + } + + public static CommonEventHandler getInstance() { + return Instance.instance; + } + + public static class Instance { + public final static CommonEventHandler instance = new CommonEventHandler(); + } @Override public Map getEventProperties(ReportEventEnum eventEnum, Object... param) { Map resultMap = new HashMap<>();