123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace app\api\model;
- use think\Model;
- /**
- * Created by PhpStorm
- * Author: ihavoc
- * Date: 2020/11/22
- * Time: 16:24
- *
- */
- class Jcdw extends model{
- protected $table = 't_jcdw';
- //主键定义为rybh:人员编号
- protected $pk = 'id';
- public function getInfoByLoginName($login_name)
- {
- if (empty($login_name)) {
- return false;
- }
- return $this->where('login_name','=', $login_name)->find();
- }
- public function getInfoById($id)
- {
- if (empty($id)) {
- return false;
- }
- return $this->where('id', '=', $id)->find();
- }
- public function getLiteInfoById($id)
- {
- if (empty($id)) {
- return false;
- }
- return $this->where('id', '=', $id)->field('name,address,user_fzr,phone_fzr,email')->find();
- }
- public function getInfoList($where='',$pageNum=1,$pageSize=10)
- {
- return $this->where($where)->page($pageNum,$pageSize)->select();
- }
- public function getInfoListCount($where='')
- {
- return $this->where($where)->select()->count();
- }
- }
|