|
%%% ----------------------------------------------------
|
|
%%% @Module: growth_score
|
|
%%% @Author: yanweifan
|
|
%%% @Description: 成长积分活动头文件
|
|
%%% @Created: 2019/04/24
|
|
%%% ----------------------------------------------------
|
|
%% 活动State
|
|
-record (growth_score_status, {
|
|
score_map = #{}, %% 分数字典 #{stype => #{role_id => score}}
|
|
receive_reward_map = #{} %% 奖励字典 #{stype => #{role_id => [reward_id]}} 存放已领取的奖励档次id
|
|
}).
|
|
|
|
|
|
|
|
-define(sql_select_custom_act_growth_score,
|
|
"select `role_id`, `sub_type`, `score` from `custom_act_growth_score`").
|
|
-define(sql_select_custom_act_growth_score_reward,
|
|
"select `role_id`, `sub_type`, `reward_state` from `custom_act_growth_score_reward`").
|
|
-define(sql_replace_custom_act_growth_score_reward,
|
|
"replace into `custom_act_growth_score_reward` (`role_id`, `sub_type`, `reward_state`) values (~p, ~p, '~s') ").
|
|
-define(sql_delete_custom_act_growth_score,
|
|
"delete from `custom_act_growth_score` where `sub_type` = ~p ").
|
|
-define(sql_delete_custom_act_growth_score_reward,
|
|
"delete from `custom_act_growth_score_reward` where `sub_type` = ~p ").
|