fans.table.php 1016 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. class FansTable extends We7Table {
  8. protected $field = array('uid');
  9. protected $tableName = 'mc_mapping_fans';
  10. public function fansAll($openids) {
  11. global $_W;
  12. return $this->query->from('mc_mapping_fans')
  13. ->where('openid', $openids)
  14. ->where('uniacid', $_W['uniacid'])
  15. ->where('acid', $_W['acid'])
  16. ->getall('openid');
  17. }
  18. public function fansInfo($openid) {
  19. return $this->query->from('mc_mapping_fans')->where('openid', $openid)->get();
  20. }
  21. public function oauthFans($oauth_openid) {
  22. return $this->query->from('mc_oauth_fans')->where('oauth_openid', $oauth_openid)->get();
  23. }
  24. public function tagGroup($uniacid) {
  25. $groups = $this->query->from('mc_fans_groups')->where('uniacid', $uniacid)->getcolumn('groups');
  26. return !empty($groups) ? iunserializer($groups) : array();
  27. }
  28. }