MateGoodsLog.php 518 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\common\model;
  3. use think\Db;
  4. class MateGoodsLog extends Base
  5. {
  6. protected $createTime = 'create_time';
  7. protected $updateTime = 'update_time';
  8. public $table = 'mate_goods_log';
  9. public function saveData($data){
  10. $data['create_time'] = date('Y-m-d H:i:s');
  11. $data['user_id'] = is_login();
  12. $ret = $this->allowField(true)->save($data);
  13. if(!$ret){
  14. $this->error = '操作失败';
  15. return false;
  16. }
  17. return true;
  18. }
  19. }