createUuid(), "agency_code" => session('auth')['business_code']??'', "business_code" => $businessCode, "money" => $money, "state" => Recharge::state_off, "create_time" => date("Y-m-d H:i:s"), "balance" => 0, ]; return Recharge::create($data); } /** * 创建一个支付订单 * @param $businessCode * @param $openId * @param $money * @return Recharge|Model */ public function createOrder($businessCode,$openId,$money) { $data = [ "open_id" => $openId, "order_num" => createUuid(), "business_code" => $businessCode, "money" => $money, "state" => Recharge::state_off, "create_time" => date("Y-m-d H:i:s"), "balance" => 0, ]; return Recharge::create($data); } }