|
|
|
@ -8,6 +8,7 @@ use App\Constants\v3\LogLabel; |
|
|
|
use App\Constants\v3\UserType; |
|
|
|
use App\Controller\BaseController; |
|
|
|
use App\Exception\ErrorCodeException; |
|
|
|
use App\Model\SystemConfig; |
|
|
|
use App\Model\v3\FinancialRecord; |
|
|
|
use App\Model\v3\Store; |
|
|
|
use App\Model\v3\StoreWithdrawal; |
|
|
|
@ -82,6 +83,10 @@ class WithdrawController extends BaseController |
|
|
|
[FinancialRecord::MONEY_TYPE_STORE_PLAT_NEW_USER, FinancialRecord::MONEY_TYPE_STORE_FIRST_ORDER] |
|
|
|
); |
|
|
|
|
|
|
|
$withdrawConfig = SystemConfig::query()->where(['category' => 5])->pluck('value', 'menu_name')->toArray(); |
|
|
|
$min = $withdrawConfig['store_min_withdraw_amount'] ?? config('wechat.withdrawal.min_amount'); |
|
|
|
$max = $withdrawConfig['store_max_withdraw_amount'] ?? config('wechat.withdrawal.max_amount'); |
|
|
|
|
|
|
|
$data['notice'] = [ |
|
|
|
// [
|
|
|
|
// 'title' => '用户须知',
|
|
|
|
@ -89,7 +94,7 @@ class WithdrawController extends BaseController |
|
|
|
// ],
|
|
|
|
[ |
|
|
|
'title' => '提现须知', |
|
|
|
'content' => '<p>1、提金额最低为<span style="color:red;">1</span>元,最高为<span style="color:red;">5000</span>元,一天最多可提现<span style="color:red;">10</span>次。</p>' |
|
|
|
'content' => '<p>1、提金额最低为<span style="color:red;">'.$min.'</span>元,最高为<span style="color:red;">'.$max.'</span>元,一天最多可提现<span style="color:red;">10</span>次。</p>' |
|
|
|
.'<p>2、提现到账时间为一个工作日内。</p>' |
|
|
|
.'<p>3、提现成功后,提现款会自动转入您当前登录的微信账号</p>' |
|
|
|
.'<p>4、如果您在提现方面遇到问题,请致电联系我们的服务站。</p>' |
|
|
|
@ -108,9 +113,15 @@ class WithdrawController extends BaseController |
|
|
|
public function applyByStore() |
|
|
|
{ |
|
|
|
|
|
|
|
$isDirect = config('wechat.withdrawal.is_direct'); |
|
|
|
$min = config('wechat.withdrawal.min_amount'); |
|
|
|
$max = config('wechat.withdrawal.max_amount'); |
|
|
|
// $isDirect = config('wechat.withdrawal.is_direct');
|
|
|
|
// $min = config('wechat.withdrawal.min_amount');
|
|
|
|
// $max = config('wechat.withdrawal.max_amount');
|
|
|
|
|
|
|
|
$withdrawConfig = SystemConfig::query()->where(['category' => 5])->pluck('value', 'menu_name')->toArray(); |
|
|
|
$isDirect = $withdrawConfig['store_withdraw_direct'] ?? config('wechat.withdrawal.is_direct'); |
|
|
|
$min = $withdrawConfig['store_min_withdraw_amount'] ?? config('wechat.withdrawal.min_amount'); |
|
|
|
$max = $withdrawConfig['store_max_withdraw_amount'] ?? config('wechat.withdrawal.max_amount'); |
|
|
|
|
|
|
|
$validator = $this->validationFactory->make( |
|
|
|
$this->request->all(), |
|
|
|
[ |
|
|
|
@ -128,7 +139,7 @@ class WithdrawController extends BaseController |
|
|
|
$userId = $this->request->input('user_id'); |
|
|
|
$storeId = $this->request->input('store_id'); |
|
|
|
|
|
|
|
if ($money > 3000) { |
|
|
|
if ($money > $max || $money < $min) { |
|
|
|
$this->log->event(LogLabel::STORE_WITHDRAW_FAIL_LOG, [ |
|
|
|
'msg' => '提现失败[1000]', |
|
|
|
'params' => json_encode(['money' => $money, 'user_id' => $userId, 'store_id' => $storeId]), |
|
|
|
|