owners_620_3

This commit is contained in:
dengbw
2022-06-20 11:56:46 +08:00
parent 65d6f2d81a
commit 23ee1050bc
2 changed files with 11 additions and 15 deletions
-4
View File
@@ -150,10 +150,6 @@ class Owners extends HD_Controller
$info['tag'] = $this->get_tag($row['id']);
//操作日志
$rows_log = $this->mdOwnersOplogs->select(['own_id' => $id], 'id desc', 0, 0);
if($this->input->get('dev')){
print_r($rows_log);
echo '-----';
}
$logs = [];
if ($rows_log) {
foreach ($rows_log as $key => $value) {
+11 -11
View File
@@ -33,7 +33,7 @@ class HD_Model extends CI_Model {
$this->set_table_name($table_name);
}
public function __call($func,$args)
public function __call($func,$args)
{
if($func) {
if($args) {
@@ -42,7 +42,7 @@ class HD_Model extends CI_Model {
return $this->db->$func();
}
}
public function set_db($db_group = 'default')
{
if(!isset(self::$dbs[$db_group]))
@@ -126,13 +126,13 @@ class HD_Model extends CI_Model {
$result = $this->db->update($this->table_name, $data, $where);
return $this->db->affected_rows() ? $this->db->affected_rows() : $result;
}
/**
* 更新或插入数据
* @param $data
* @return mixed
*/
public function replace($data)
public function replace($data)
{
if($data)
{
@@ -178,7 +178,7 @@ class HD_Model extends CI_Model {
return $this->db->query($sql);
}
}
/**
* 获取单条数据
* @param $where
@@ -244,9 +244,10 @@ class HD_Model extends CI_Model {
$offset = null;
$limit = null;
}
$result = $this->db->get($this->table_name, $limit, $offset)->result_array();
$this->db->from($this->table_name);
$this->db->limit($limit, $offset);
$query = $this->db->get();
$result = $query->result_array();
if($obj && file_exists($class = APPPATH.'libraries/entity/'.ucfirst($obj).'.php'))
{
require_once $class;
@@ -256,7 +257,6 @@ class HD_Model extends CI_Model {
$result = $this->db->get($this->table_name, $limit, $offset)->custom_result_object($obj);
}
}
return $result;
}
@@ -555,7 +555,7 @@ class HD_Model extends CI_Model {
* @param array $param
* @return mixed
*/
public function un_file_cache($func, $param =array())
public function un_file_cache($func, $param =array())
{
if(IF_FILE_CACHE)
{
@@ -571,7 +571,7 @@ class HD_Model extends CI_Model {
* @param $type
* @return bool
*/
public function del_cache($method, $type, $skey = '')
public function del_cache($method, $type, $skey = '')
{
$cache = & load_cache($type);
$db = $this->load->database('default', true);