Browse Source

商户提现修改、用户申请退款同意

master
weigang 5 years ago
parent
commit
b03b4f6af5
  1. 2
      app/Controller/v3/WithdrawController.php
  2. 1
      app/Model/v3/FinancialRecord.php
  3. 2
      app/Service/v3/Implementations/FinancialRecordService.php
  4. 4
      app/Service/v3/Implementations/OrderOnlineService.php

2
app/Controller/v3/WithdrawController.php

@ -180,7 +180,7 @@ class WithdrawController extends BaseController
// 打款成功,写流水
if ($res === true) {
$this->financialService->storeWithdrawByWx($store->user_id, 0, $withdraw->real_cash);
$this->financialService->storeWithdrawByWx($store->user_id, $withdraw->id, $withdraw->real_cash);
}
}

1
app/Model/v3/FinancialRecord.php

@ -49,6 +49,7 @@ class FinancialRecord extends Model
*/
const SOURCE_TYPE_NONE = 0;
const SOURCE_TYPE_ORDER = 1;
const SOURCE_TYPE_STORE_WITHDRAW = 2;
/**
* 流水类型,大的分类,<100是奖励分账等收入项 >=100是提现消费等支出项

2
app/Service/v3/Implementations/FinancialRecordService.php

@ -342,7 +342,7 @@ class FinancialRecordService implements FinancialRecordServiceInterface
$source_id,
$money,
$user_type = UserType::STORE,
$source_type = FinancialRecord::SOURCE_TYPE_NONE,
$source_type = FinancialRecord::SOURCE_TYPE_STORE_WITHDRAW,
$money_type = FinancialRecord::MONEY_TYPE_STORE_WITHDRAW,
$desc = '商户提现',
$comment = '商户提现打款'

4
app/Service/v3/Implementations/OrderOnlineService.php

@ -551,10 +551,6 @@ class OrderOnlineService implements OrderOnlineServiceInterface
{
$orderMain = $this->check($globalOrderId, $userId, OrderState::REFUNDING);
$orderMain->state = OrderState::REFUNDED;
if (!$orderMain->save()) {
throw new ErrorCodeException(ErrorCode::ORDER_REFUND_FAIL);
}
// 微信退款
if ($orderMain->pay_type == Payment::WECHAT) {

Loading…
Cancel
Save