num = time().$userId; $tmp->u_id = $userId; $tmp->currency_id = $currencyId; $tmp->legal_id = $legalId; $tmp->type = $type; $tmp->target_price = $targetPrice; $tmp->trade_price = $tradePrice; $tmp->trade_amount = $amount; $tmp->charge_fee = $fee; $tmp->save(); return $tmp; } }