人人商城

wxapp.table.php 905B

1234567891011121314151617181920212223242526272829303132333435
  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. load()->table('account');
  8. class WxappTable extends AccountTable {
  9. protected $tableName ='wxapp_versions';
  10. private $version_table = 'wxapp_versions';
  11. public function latestVersion($uniacid) {
  12. if (empty($uniacid)) {
  13. return array();
  14. }
  15. return $this->query->from($this->version_table)
  16. ->where('uniacid', $uniacid)
  17. ->orderby('id', 'desc')->limit(4)->getall('id');
  18. }
  19. public function last($uniacid) {
  20. return $this->query->from($this->version_table)
  21. ->where('uniacid', $uniacid)
  22. ->orderby('id', 'desc')->limit(1)->get();
  23. }
  24. public function wxappInfo($uniacid) {
  25. return $this->query->from('account_wxapp')->where('uniacid', $uniacid)->getall('uniacid');
  26. }
  27. }