// +---------------------------------------------------------------------- namespace app\services\user; use app\dao\user\UserBrokerageFrozenDao; use app\services\BaseServices; use think\annotation\Inject; /** * 佣金冻结 * Class UserBrokerageFrozenServices * @package app\services\user * @mixin UserBrokerageFrozenDao */ class UserBrokerageFrozenServices extends BaseServices { /** * @var UserBrokerageFrozenDao */ #[Inject] protected UserBrokerageFrozenDao $dao; /** * 保存冻结金额 * @param int $uid * @param string $price * @param int $uillId * @param string $orderId * @return mixed */ public function saveBrokage(int $uid, string $price, int $uillId, string $orderId) { $broken_time = intval(sys_config('extract_time')); $data = [ 'uid' => $uid, 'price' => $price, 'uill_id' => $uillId, 'order_id' => $orderId, 'add_time' => time(), 'status' => 1, 'frozen_time' => time() + $broken_time * 86400 ]; return $this->dao->save($data); } }