源战役
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

44 lignes
1.3 KiB

il y a 4 semaines
  1. %%-----------------------------------------------------------------------------
  2. %% @Module : investment.hrl
  3. %% @Author : J
  4. %% @Email : j-som@foxmail.com
  5. %% @Created : 2017-12-18
  6. %% @Description: 投资活动
  7. %%-----------------------------------------------------------------------------
  8. %% 默认初始轮次
  9. -define(INVESTMENT_DEFAULT_ROUND, 1).
  10. %% 投资类型
  11. -define(INVESTMENT_TYPE_1, 1).
  12. -define(INVESTMENT_TYPE_2, 2).
  13. %% 购买的投资信息
  14. -record (investment, {
  15. type = 0, %% 投资类型
  16. round = 0, %% 投资档位
  17. is_buy = 0, %% 是否已购买
  18. reward_info = [], %% 领奖状态
  19. buy_time = 0 %% 购买时间
  20. }).
  21. %% 配置
  22. -record (base_investment_reward, {
  23. type
  24. , level
  25. , id
  26. , rewards
  27. , condition
  28. }).
  29. -record (base_investment_type, {
  30. type
  31. , name
  32. , level
  33. , price
  34. , price_type
  35. , clear_type %% 1领完重置|0不重置
  36. , condition
  37. }).
  38. %% DB
  39. -define (sql_select_investment_data, <<"SELECT `type`, `lv`, `is_buy`, `reward_info`, `buy_time` FROM `investment_data` WHERE `role_id`= ~p">>).
  40. -define (sql_save_investment_data, <<"REPLACE INTO `investment_data` (`role_id`, `type`, `lv`, `is_buy`, `buy_time`, `reward_info`) VALUES (~p, ~p, ~p, ~p, ~p, '~ts')">>).