getOrderId(); if ($order_id && $order_id > 0) { $data['type'] = 1; } else { $admin = Dever::load('manage/auth.info'); if ($admin) { $data['audit_admin'] = $admin['id']; $data['type'] = 2; } } $id = Dever::db('agent/member_level_log')->insert($data); if ($id) { # 升级时查看是否有升级的合同,如果没有需要生成 } return $id; } /** * 生成日志订单号 * * @return mixed */ public function getOrderId() { $where['order_num'] = Dever::order('L'); $state = Dever::db('agent/member_level_log')->one($where); if (!$state) { return $where['order_num']; } else { return $this->getOrderId(); } } }