源战役
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

  1. %%%-------------------------------------------------------------------
  2. %% @Description: 源能转盘
  3. %% author :ljy
  4. %% time :21/3/8
  5. %%--------------------------------------------------------------------
  6. %% 玩家抽奖数据
  7. -record(role_turntable_info, {
  8. score = 0, % 积分
  9. lucky = 0, % 源能值
  10. free_times = 0, % 已使用的免费次数
  11. swap_list = [] % [{id, times}]
  12. }).
  13. %% 积分兑换表
  14. -record(base_turntable_point_reward, {
  15. sub_id = 0, % 活动id
  16. id = 0, % 奖励id
  17. reward = 0, % 奖励
  18. limit = 0, % 兑换限量
  19. points = 0 % 所需积分
  20. }).
  21. %% 转盘奖励表
  22. -record(base_turntable_reward, {
  23. sub_id = 0, % 活动id
  24. id = 0, % 奖励id
  25. reward = [], % 奖励
  26. weights = [], % 权重
  27. is_tv = 0, % 是否有传闻
  28. tag = [] % 标签
  29. }).
  30. %% -----------------SQL----------------------
  31. -define (SQL_SELECT_TURNTABLE_LOTTERY_RECORD,
  32. <<"SELECT name, goods_id, num FROM turntable_lottery_record where sub_type = ~p ORDER BY id desc limit 30">>).
  33. -define (SQL_INSERT_TURNTABLE_RECORD,
  34. <<"INSERT INTO turntable_lottery_record(`sub_type`, `name`, `goods_id`, `num`) values ~ts">>).
  35. -define(SQL_TURNTABLE_RECORD_VALUES, "(~p, '~ts', ~p, ~p)").
  36. -define(SELECT_ACT_TURNTABLE_ROLES,
  37. <<"SELECT `id` FROM `player_low` WHERE `lv` >= ~p ">>).
  38. %% 查询定制活动保存的数据
  39. -define(SELECT_ACT_TURNTABLE_DATA,
  40. <<"select `act_data` from `custom_act_data` where `rid`=~p and `type`=~p and `subtype`=~p">>).
  41. -define (SQL_DELETE_TURNTABLE_RECORD,
  42. <<"DELETE FROM turntable_lottery_record where sub_type = ~p">>).