public function set($id, $data, $where = '')
{
if (empty($where)) {
$where = $this->primary;
}
return $this->db->update($id, $data, $this->table, $where);
}
public function toUpdateAvatar($id, $data, $where) { $result = parent::set($id, $data, $where); if (false === $result) { return ['code' => 1, 'data' => '', 'msg' => 'fail']; } else { return ['code' => 0, 'data' => '', 'msg' => 'success']; } }