%% -----------------------------------------------------
%% @author  :ljy
%% moudle   :pp_seven_days_goal.erl
%% desc     :七日目标
%% time     :2020.12.22
%% ------------------------------------------------------
-module(pp_seven_days_goal).

-export([handle/3]).

-include("server.hrl").
-include("errcode.hrl").
-include("common.hrl").

handle(17600, Ps, []) ->
    lib_seven_days_goal:get_task_info(Ps),
    {ok, Ps};

handle(17601, Ps, [LoginDays, ModId, SubId]) ->
    lib_seven_days_goal:receive_task_reward(Ps, LoginDays, ModId, SubId);

handle(17602, Ps, [Type, TargetScore]) when Type =:= 1 ->
    lib_seven_days_goal:receive_score_reward(Ps, Type, TargetScore);

handle(17602, Ps, [Type, Days]) when  Type =:= 2 ->
    lib_seven_days_goal:receive_skill_reward(Ps, Type, Days);

handle(_Cmd, _Status, _Data) ->
    {error, <<"pp_seven_days_goal no match">>}.