%%%------------------------------------------------------------------- %%% @author Administrator %%% @copyright (C) 2023, %%% @doc %%% %%% @end %%% Created : 10. 7月 2023 11:07 %%%------------------------------------------------------------------- -module(activity_set_data). -author("Administrator"). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). -define(holiday_fields, [camp_id, bid, total_id, cli_type, cli_type_name, start_time, end_time, condition, platform_id, platform_exclude_id, hide_srv_ids, sort_val, title, title2, ico, type_ico, top_banner, rule_str, time_str, bottom_alert, reward_title, reward, item_effect, mail_subject, mail_content, cli_reward, panel_type, aim_title, process_show_reward, main_ico]). cfg() -> TimeComment0 = "{open_day, Day} | {open_day, Day, OffSetSec} 开服时间 {merge_day, Day} | {merge_day, Day, OffSetSec} 合服时间 {{Year,Month,Day},{Hour,Minu,Sec}} 指定日期 ", TimeComment = "{reg_day, Day} | {reg_day, Day, OffSetSec} 开服时间 | {年, 月, 日, 时, 分, 秒}", #data_cfg{ name = activity_set_data ,lua_name = activity_set_data ,desc = "个人活动配置数据" ,source = "activity_set_data.xml" ,target = "activity_set_data.erl" ,inc = ["common.hrl", "holiday.hrl", "condition.hrl"] ,callback = [ {list_open_total, cb_fun, handle, {record_list, ["开合服总活动"], holiday_total, all}} ,{list_open_son, cb_fun, handle, {tuple_type, ["开合服子活动"], total_id, camp_id}} ,{all_total_id, cb_fun, handle, {list, ["开合服总活动","运营总活动"]}} ,{get_total, cb_fun, handle, {tuple_type, ["开合服总活动","运营总活动"],id, [id, type, icon_id, name, sort, source, start_time, end_time, skin, effect]}} ,{list_total, cb_fun, handle, {record_list, ["运营总活动"], holiday_total, all}} ,{all_son, cb_fun, handle, {list, ["运营子活动"]}} ,{all_son2, cb_fun, handle, {list, ["开合服子活动"]}} ,{list_son, cb_fun, handle, {tuple_type, ["运营子活动"], total_id, camp_id}} ,{bid_son, cb_fun, handle, {tuple_type, ["运营子活动"], bid, camp_id}} ,{get_open, cb_fun, handle, {get_record, ["开合服子活动"], camp_id, holiday, ?holiday_fields}} ,{get_all_open_son_holiday, cb_fun, handle, {record_list, ["开合服子活动"], holiday, ?holiday_fields}} ,{{get, undefined}, cb_fun, handle, {get_record, ["运营子活动"], camp_id, holiday, ?holiday_fields}} ,{{open_ico, 0}, cb_fun, handle, {get_tuple, ["开合服子活动"], camp_id, main_ico}} ,{{main_ico, 0}, cb_fun, handle, {get_tuple, ["运营子活动"], camp_id, main_ico}} ,{get_bid, cb_fun, handle, {get_tuple, ["开合服子活动", "运营子活动"], camp_id, bid}} ,{get_holiday_info, cb_fun, handle, {get_tuple, ["开合服子活动", "运营子活动"], camp_id, [camp_id, source, config, sort_val, title, cli_icon, end_time, end_icon, cate, cate_name, icon]}} %% ,{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~s", [key,val,desc]}} ] ,callback_cli = [ ] ,sheet = [ {["开合服总活动"], [ #f_column{type = int, name = id, desc = "ID", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = int, name = icon_id, desc = "图标", mod = all} ,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"开服活动", 1}, {"合服活动", 2}, {"八日约定", 17}, {"七日特训", 18},{"限定挑戰", 19}, {"歡樂谷", 27}, {"新星閃耀", 28}], mod = all} ,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment0} ,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment0} ,#f_column{type = kv, name = status, desc = "状态", kv_type = [{"关闭", 0}, {"开启", 1}], mod = all} ,#f_column{type = int, name = sort, desc = "排序", mod = all} ,#f_column{type = int, name = source, desc = "功能标号", mod = all} ,#f_column{type = int, name = skin, val = 0, desc = "皮肤", mod = all} ,#f_column{type = bstr, name = effect, val = "0", desc = "特效Id", mod = all} ]} ,{["开合服子活动"], [ #f_column{type = int, name = camp_id, desc = "活动ID", primary = true, mod = all} ,#f_column{type = int, name = bid, desc = "基础ID", mod = all} ,#f_column{type = int, name = total_id, desc = "总活动ID", mod = all} ,#f_column{type = int, name = cli_type, desc = "客户端类型", mod = all} ,#f_column{type = bstr, name = title, desc = "活动名称", mod = all} ,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment0, width = 200} ,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment0, width = 200} ,#f_column{desc = "开放条件", type = rec, rec = condition, name = condition, width = 360, spilt_str = ";", spilt_line = "\n", fields = [ #f_column{type = atom, name = label, desc = "条件标签"} ,#f_column{type = kv, name = op, kv_type = cond_op, desc = "比较运算符"} ,#f_column{type = term, add_list_sign = false, name = val, desc = "条件要求值"} ] } ,#f_column{type = term, name = platform_id, desc = "平台白名单", width = 300, mod = all} ,#f_column{type = term, name = platform_exclude_id, desc = "平台黑名单", width = 300, mod = all} ,#f_column{type = term, name = hide_srv_ids, desc = "屏蔽服务器列表", width = 300} ,#f_column{type = int, name = sort_val, desc = "排序", mod = all} ,#f_column{type = bstr, name = title1, desc = "左侧标题", mod = all} ,#f_column{type = bstr, name = title2, desc = "顶部横幅", mod = all} ,#f_column{type = term, name = main_ico, add_list_sign=false, desc = "主城图标", mod = all} ,#f_column{type = bstr, name = ico, desc = "左侧图标", mod = all} ,#f_column{type = int, name = type_ico, desc = "类型图标", mod = all} ,#f_column{type = bstr, name = top_banner, desc = "顶部底图", width = 250, mod = all} ,#f_column{type = bstr, name = rule_str, desc = "活动规则", width = 360, mod = all} ,#f_column{type = bstr, name = time_str, desc = "活动时间", mod = all} ,#f_column{type = bstr, name = bottom_alert, desc = "温馨提示", width = 200, mod = all} ,#f_column{type = bstr, name = reward_title, desc = "子活动子项背景资源", width = 200, mod = all} ,#f_column{type = term, name = reward, desc = "奖励", width = 360, mod = all} ,#f_column{type = term, name = item_effect, desc = "物品特效", mod = all} ,#f_column{type = bstr, name = mail_subject, desc = "邮件标题", width = 200, mod = all} ,#f_column{type = bstr, name = mail_content, desc = "邮件内容", width = 360, mod = all} ,#f_column{type = bstr, name = cli_reward, desc = "客户端奖励", mod = all} ,#f_column{type = int, name = panel_type, desc = "客户端面板类型", mod = all} ,#f_column{type = bstr, name = aim_title, desc = "子活动背景资源", width = 200, mod = all} ,#f_column{type = kv, name = process_show_reward, desc = "处理奖励显示", kv_type=bool, mod = all} ,#f_column{type = int, name = source, desc = "功能标号", mod = all} ,#f_column{type = bstr, name = config, val = 0, desc = "表明", width = 200, mod = all ,is_null = true} ,#f_column{type = bstr, name = cli_icon, desc = "活动角标", mod = all} ,#f_column{type = bstr, name = end_icon, desc = "活动结束角标", mod = all} ,#f_column{type = int, name = cate, val = 0, desc = "分类", mod = all} ,#f_column{type = bstr, name = cate_name, val = 0, desc = "分类名称", mod = all, is_null = true} ,#f_column{type = bstr, name = icon, val = 0, desc = "界面美术字", mod = all, is_null = true} ]} ,{["运营总活动"], [ #f_column{type = int, name = id, desc = "ID", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = int, name = icon_id, desc = "图标", mod = all} ,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"限定招募", 14},{"星际夺宝", 20},{"Step_Up", 21},{"皮肤盲盒", 22},{"限时祈愿", 23}, {"陣營集結", 24}, {"群星炫卡集", 25},{"僚機派對", 26},{"伙伴限购", 15},{"星际夺宝", 16}, {"精英招募", 9},{"限时好礼", 10},{"七日定制", 11},{"每日首充", 12},{"每日特惠", 13}, {"限时", 8}, {"自选礼包", 7}, {"战令", 5}, {"首充", 4},{"日常活动", 3}, {"运营活动", 0}], mod = all} ,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment} ,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment} ,#f_column{type = kv, name = status, desc = "状态", kv_type = [{"关闭", 0}, {"开启", 1}], mod = all} ,#f_column{type = kv, name = is_show, desc = "是否打开活动界面", kv_type = bool, mod = all} ,#f_column{type = int, name = sort, desc = "排序", mod = all} ,#f_column{type = int, name = source, desc = "功能标号", mod = all} ,#f_column{type = int, name = skin, val = 0, desc = "皮肤", mod = all} ,#f_column{type = bstr, name = effect, val = <<"0">>, desc = "特效Id", mod = all} ]} ,{["运营子活动"], [ #f_column{type = int, name = camp_id, desc = "活动ID", primary = true, mod = all} ,#f_column{type = int, name = bid, desc = "基础ID", mod = all} ,#f_column{type = int, name = total_id, desc = "总活动ID", mod = all} ,#f_column{type = int, name = cli_type, desc = "客户端类型", mod = all} ,#f_column{type = bstr, name = title, desc = "活动名称", mod = all} ,#f_column{type = bstr, name = cli_type_name, desc = "客户端类型名称", mod = all} ,#f_column{type = term, name = start_time, desc = "开始时间", add_list_sign = false, comment=TimeComment, width = 200} ,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, comment=TimeComment, width = 200} ,#f_column{desc = "开放条件", type = rec, rec = condition, name = condition, width = 360, spilt_str = ";", spilt_line = "\n", fields = [ #f_column{type = atom, name = label, desc = "条件标签"} ,#f_column{type = kv, name = op, kv_type = cond_op, desc = "比较运算符"} ,#f_column{type = term, add_list_sign = false, name = val, desc = "条件要求值"} ] } ,#f_column{type = term, name = platform_id, desc = "平台白名单", width = 300, mod = all} ,#f_column{type = term, name = platform_exclude_id, desc = "平台黑名单", width = 300, mod = all} ,#f_column{type = term, name = hide_srv_ids, desc = "屏蔽服务器列表", width = 300} ,#f_column{type = int, name = sort_val, desc = "排序", mod = all} ,#f_column{type = bstr, name = title1, desc = "左侧标题", mod = all} ,#f_column{type = bstr, name = title2, desc = "顶部横幅", mod = all} ,#f_column{type = term, name = main_ico, add_list_sign=false, desc = "主城图标", mod = all} ,#f_column{type = bstr, name = ico, desc = "左侧图标", mod = all} ,#f_column{type = int, name = type_ico, desc = "类型图标", mod = all} ,#f_column{type = bstr, name = top_banner, desc = "顶部底图", width = 250, mod = all} ,#f_column{type = bstr, name = rule_str, desc = "活动规则", width = 360, mod = all} ,#f_column{type = bstr, name = time_str, desc = "活动时间", mod = all} ,#f_column{type = bstr, name = bottom_alert, desc = "温馨提示", width = 200, mod = all} ,#f_column{type = bstr, name = reward_title, desc = "子活动子项背景资源", width = 200, mod = all} ,#f_column{type = term, name = reward, desc = "奖励", width = 360, mod = all} ,#f_column{type = term, name = item_effect, desc = "物品特效", mod = all} ,#f_column{type = bstr, name = mail_subject, desc = "邮件标题", width = 200, mod = all} ,#f_column{type = bstr, name = mail_content, desc = "邮件内容", width = 360, mod = all} ,#f_column{type = bstr, name = cli_reward, desc = "客户端奖励", mod = all} ,#f_column{type = int, name = panel_type, desc = "客户端面板类型", mod = all} ,#f_column{type = bstr, name = aim_title, desc = "子活动背景资源", width = 200, mod = all} ,#f_column{type = kv, name = process_show_reward, desc = "处理奖励显示", kv_type=bool, mod = all} ,#f_column{type = int, name = source, desc = "功能标号", mod = all} ,#f_column{type = bstr, name = config, val = 0, desc = "表明", width = 200, mod = all ,is_null = true} ,#f_column{type = bstr, name = cli_icon, desc = "活动角标", mod = all} ,#f_column{type = bstr, name = end_icon, desc = "活动结束角标", mod = all} ,#f_column{type = int, name = cate, val = 0, desc = "分类", mod = all} ,#f_column{type = bstr, name = cate_name, val = 0, desc = "分类名称", mod = all ,cell_val = true} ,#f_column{type = bstr, name = icon, val = 0, desc = "界面美术字", mod = all, is_null = true} ]} %% ,{["常量配置"], [ %% #f_column{type = atom, name = key, desc = "键", primary = true, mod = all} %% ,#f_column{type = term, name = val, desc = "值", add_list_sign=false, mod = all} %% ,#f_column{type = str, name = desc, desc = "描述", mod = client} %% ]} ] }.