Group.php 500 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\common\model;
  3. use think\Db;
  4. class Group extends Base
  5. {
  6. public function updates(){
  7. $data = request()->post();
  8. $data['org_id'] = cur_org_id();
  9. return $this->updateInfo($data,'Group','');
  10. }
  11. public function getList(){
  12. $list = $this
  13. ->where('enable',1)
  14. ->where('org_id',cur_org_id())
  15. ->field('id,title')
  16. ->select();
  17. $list = $list?$list->toArray():[];
  18. return $list;
  19. }
  20. }