rebar3 服务器
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
%%% @copyright (C) 2021, 四三九九
|
||||
%%% @doc
|
||||
%%%
|
||||
%%% @end
|
||||
%%% Created : 2021-07-28 14:58:59
|
||||
%%%-------------------------------------------------------------------
|
||||
-ifndef(__MS_TBLAPI_HRL__).
|
||||
-define(__MS_TBLAPI_HRL__, true).
|
||||
|
||||
-include("base.hrl").
|
||||
%% -include("tblapi_c.hrl").
|
||||
%% -include("tblapi_pb.hrl").
|
||||
|
||||
-define(EXPIRED_TIME, 300). %% 过期时间
|
||||
-define(HTTP_TIMEOUT, 5000).
|
||||
|
||||
%% 错误码
|
||||
-ifdef(CODE_SUCC).
|
||||
-undef(CODE_SUCC).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_DUP).
|
||||
-undef(CODE_ERR_DUP).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_PARAM).
|
||||
-undef(CODE_ERR_PARAM).
|
||||
-endif.
|
||||
-ifdef(CODE_PARAM_INVALID).
|
||||
-undef(CODE_PARAM_INVALID).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_AUTH).
|
||||
-undef(CODE_ERR_AUTH).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_DATA).
|
||||
-undef(CODE_ERR_DATA).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_IP).
|
||||
-undef(CODE_ERR_IP).
|
||||
-endif.
|
||||
-ifdef(CODE_ERR_OTHER).
|
||||
-undef(CODE_ERR_OTHER).
|
||||
-endif.
|
||||
-define(CODE_SUCC, <<"0">>). %% 操作成功
|
||||
-define(CODE_ERR_DUP, <<"1">>). %% 请求重复
|
||||
-define(CODE_ERR_PARAM, <<"101">>). %% 参数错误
|
||||
-define(CODE_PARAM_INVALID, <<"102">>). %% 参数错误
|
||||
-define(CODE_ERR_AUTH, <<"202">>). %% 验证错误
|
||||
-define(CODE_ERR_DATA, <<"301">>). %% 数据部分错误
|
||||
-define(CODE_ERR_IP, <<"888">>). %% IP错误,非白名单IP
|
||||
-define(CODE_ERR_OTHER, <<"999">>). %% 其他错误
|
||||
|
||||
%% 邮件发送类型
|
||||
-define(SEND_BY_ROLE_NAME, 1).
|
||||
-define(SEND_BY_ROLE_ID, 2).
|
||||
-define(SEND_BY_ROLE_ACCOUNT, 3).
|
||||
-define(SEND_BY_CONDITION, 4).
|
||||
-define(SEND_TO_EVERYBODY, 5).
|
||||
-define(SEND_TO_ONLINE_PALYER, 6).
|
||||
|
||||
%% 玩家详情数据模式
|
||||
-define(TABLE_TYPE_1_VS_1, 1). %% 1对1
|
||||
-define(TABLE_TYPE_1_VS_N, 2). %% 1对多
|
||||
-define(TABLE_TYPE_1_VS_N2, 3). %% 特殊1对多
|
||||
|
||||
%% 白名单ip
|
||||
-define(WHITE_IP_LIST,
|
||||
[
|
||||
%% T后台
|
||||
"42.62.31.88"
|
||||
, "106.52.229.108"
|
||||
, "172.20.16.46"
|
||||
, "43.136.74.50"
|
||||
, "111.230.233.101"
|
||||
, "106.52.39.247"
|
||||
%% T后台hk
|
||||
, "150.109.109.6"
|
||||
, "43.154.4.184"
|
||||
|
||||
%% 聊天监控平台
|
||||
, "42.62.31.81"
|
||||
, "109.244.51.16"
|
||||
, "120.31.139.140"
|
||||
|
||||
%% 统一网关 todo 应该t后台/风控/蜂鸟都接了统一网关
|
||||
, "43.138.173.45"
|
||||
, "119.29.184.236"
|
||||
, "172.20.16.18"
|
||||
, "172.20.48.15"
|
||||
]).
|
||||
|
||||
-define(WHITE_IP_SEGMENT_LIST,
|
||||
[
|
||||
%% T后台
|
||||
%% 121.201.56.0 ~ 121.201.56.255
|
||||
"121.201.56.0/24"
|
||||
, "124.243.195.0/24"
|
||||
]).
|
||||
|
||||
-define(ETS_TBLAPI_FLAG, ets_tblapi_flag).
|
||||
-define(ETS_API_FLAG, ets_api_flag).
|
||||
|
||||
-define(TBLKEY_RET, ret).
|
||||
-define(TBLKEY_MSG, msg).
|
||||
-define(TBLKEY_DATA, data).
|
||||
-define(TBLKEY_TOTAL_NUM, totalNum).
|
||||
-define(TBLKEY_DESC, desc).
|
||||
-define(TBLKEY_TABLE_TYPE, tableType).
|
||||
|
||||
-define(OSS_SEX_ALL, 0). % 全体玩家
|
||||
-define(OSS_SEX_MALE, 1). % 男
|
||||
-define(OSS_SEX_FEMALE, 2). % 女
|
||||
|
||||
-endif.
|
||||
Reference in New Issue
Block a user