Files
OMS/app/inventorydepth/model/log.php
2025-12-28 23:13:25 +08:00

33 lines
715 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class inventorydepth_mdl_log extends dbeav_model {
/**
* 保存日志
*
* @return void
* @author
**/
public function saveLog($data)
{
# 判断是否日志已经存在
$id = $this->select()->columns('log_id')
->where('shop_id=?',$data['shop_id'])
->where('bn=?',$data['bn'])
->instance()->fetch_one();
# 更新
if ($id) {
$this->update($data,array('log_id' => $id));
}else{
# 保存
$this->insert($data);
}
}
}