| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\common\model;
- class AuthRuleModel extends BaseModel
- {
- protected $table = 'erp_auth_rule';
- protected function genSchema(array $schema)
- {
- // TODO: Implement genSchema() method.
- }
- /**
- * @param array $ids
- * @return array
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\DbException
- * @throws \think\db\exception\ModelNotFoundException
- */
- public function findByIds($ids = []) {
- if(count($ids) == 0)
- return [];
- if($ids[0] == '*')
- return $this->where('is_delete',0)->order("weigh","desc")->select()->toArray();
- return $this->where([
- ['is_delete','=',0],
- ['id','in', $ids]
- ])->order("weigh","desc")->select()->toArray();
- }
- }
|