| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\common\model;
- class UserModel extends BaseModel
- {
- protected $table = 'erp_user';
- protected function genSchema(array $schema)
- {
- // TODO: Implement genSchema() method.
- }
- public function doesItExist($mobile) {
- return $this->where([
- ["mobile", '=', $mobile],
- ["is_delete", '=', 0]
- ])->find();
- }
- public function findByPaginate(array $params) {
- $where = [
- ['is_delete', '=', 0]
- ];
- if(!is_null($params['store_id']) && $params['store_id'] > 0)
- array_push($where, ['store_id', '=', $params['store_id']]);
- return $this->where($where)->order('create_time','desc')->paginate(['list_rows'=>10, "query" => $params]);
- }
- }
|