LotteryEventsCodeData.class.php 948 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Cas\Dao;
  3. use KIF\Dao\SqlHelper;
  4. use KIF\Dao\DBAgileDev;
  5. use KIF\Core\Request;
  6. use KIF\Cache\Memcached;
  7. /**
  8. *
  9. * 活动[领码]数据
  10. *
  11. * @author lihuanchun@qq.com
  12. *
  13. */
  14. class LotteryEventsCodeData extends DBAgileDev {
  15. protected $tableName = 'lottery_events_code_data';
  16. /**
  17. * 数据库里的真实字段
  18. * @var array
  19. */
  20. protected $other_field = array(
  21. 'events_id',
  22. 'uid',
  23. 'data',
  24. );
  25. /**
  26. * 获取当前活动 “码” 数据 总条数
  27. * @param int $events_id
  28. */
  29. public function getEventsCodeDataNum($events_id){
  30. $condtion = array('events_id' => $events_id);
  31. return $this->totals($condtion);
  32. }
  33. /**
  34. * 获取当前活动 “码” 数据 已发中数
  35. * @param int $events_id
  36. */
  37. public function getEventsUseCodeDataNum($events_id){
  38. $condtion = array('events_id' => $events_id ,'uid' => SqlHelper::addCompareOperator('!=', 0));
  39. return $this->totals($condtion);
  40. }
  41. }