orderBy('begin_amount', 'asc') ->orderBy('end_amount', 'asc') ->orderBy('rate', 'asc') ->get(); return $result; } /** * 申请提现 * @param $data * @return bool */ static function apply($data) { DB::beginTransaction(); $cash = DB::table('withdraw_cash')->insert($data); $stat = DistributionChannelStat::decrDistributionChannelWithdrawAmount($data['distribution_channel_id'],$data['amount']); if($cash && $stat) { DB::commit(); return $cash; }else{ DB::rollBack(); return false; } } }