testee


ssss


ddd

dww

实打实打算222444555 888889


::: tip
ddddss
:::

::: warning
这是一条注意
:::

::: center
ddddd

居中

:::

dddddd

sdssds

public function incomeChanging(IncomeChangingDTO $incomeChangingDTO): IncomeChangedResponseDTO
    {
        $incomeChangedResponseDTO = new IncomeChangedResponseDTO();
        try {
            //查询商户信息
            $merchant = $this->merchantService->getByMchId($incomeChangingDTO->mchId, true);
            if (empty($merchant)) {
                $incomeChangedResponseDTO->status = false;
                $incomeChangedResponseDTO->msg = '商户账户异常';
                return $incomeChangedResponseDTO;
            }

            $balanceChangingDTO = new BalanceChangingDTO();
            $balanceChangingDTO->businessType = $incomeChangingDTO->businessType;
            $balanceChangingDTO->mode = $incomeChangingDTO->mode;
            $balanceChangingDTO->amount = $incomeChangingDTO->amount;
            $balanceChangingDTO->remark = $incomeChangingDTO->remark;
            $balanceChangingDTO->orderId = $incomeChangingDTO->orderId;
            switch ($incomeChangingDTO->mode) {
                case FundsConstant::MODE_INCOME_DRAW_REFUND:
                case FundsConstant::MODE_INCOME_TRANSFER_PAY_REFUND:
                case FundsConstant::MODE_INCOME_UNFREEZE:
                    if ($incomeChangingDTO->mode == FundsConstant::MODE_INCOME_UNFREEZE) {
                        //判断金额
                        if (bccomp($incomeChangingDTO->amount, $merchant->freeze_amount, 2) === 1) {
                            $incomeChangedResponseDTO->status = false;
                            $incomeChangedResponseDTO->msg = '冻结账户余额不足';
                            return $incomeChangedResponseDTO;
                        }

                        //冻结账户减
                        $balanceChangingDTO->accountType = MerchantConstant::BALANCE_TYPE_FREEZE;
                        $balanceChangingDTO->changeType = MerchantConstant::BALANCE_CHANGE_DECREMENT;
                        if (!$this->balanceChanging($merchant, $balanceChangingDTO)) {
                            $incomeChangedResponseDTO->status = false;
                            $incomeChangedResponseDTO->msg = '系统错误,请稍后再试X1';
                            return $incomeChangedResponseDTO;
                        }
                    }

去露营了! :tent: 很快回来。

真好笑! :joy:
🤡
🤡
😄
💋🌹🎉🎂✔😃😜🐱‍🏍🤷‍♀️🤢😥👸👳‍♀️🧵🎞🍠🚋🦽💢💥💤🚱🚯🚷☢➿🚹⏮🔟⏺2️⃣4️⃣5️⃣🟡🔴🟢🔵🟧🟧🔷🕞


文章作者: suxiaolong
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 suxiaolong !
评论
  目录