文件
mashangyoujiu/Application/Common/Model/AdminModel.class.php

68 行
1.3 KiB
PHP
可执行文件

<?php
namespace Common\Model;
use Think\Model;
class AdminModel extends Model
{
protected $tableName = 'retail_admin';
protected $fields = array(
'id',
'name',
'addtime',
'status',
'last_time',
'password',
'status',
'type',
'partnerid',
'phone',
'juris',
'qq',
);
/** 添加用户
* @param $data
*/
public function addUser($data){
$re = $this->add($data);
return $re;
}
/** 修改用户信息
* @param $map
* @param $data
* @return mixed
*/
public function UpdateUser($map,$data){
$re = $this->where($map)->save($data);
return $re;
}
/**
* @param $map
*/
public function getCount($map){
$cache = $this->where($map)->count();
return $cache;
}
public function getList($map){
$cache = $this->where($map)->select();
return $cache;
}
/**
* @param $map
* @return mixed
*/
public function getFind($map){
$re = $this->where($map)->find();
return $re;
}
/**
* 删除用户
*/
public function delUser($map){
$re = $this->where($map)->delete();
return $re;
}
}