去掉是否平安项目校验
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
|
||||
|
||||
class Batch extends Action
|
||||
{
|
||||
|
||||
public $name = '批量打款';
|
||||
|
||||
protected $selector = '.import-post';
|
||||
@@ -31,6 +32,7 @@ class Batch extends Action
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->response()->success("处理完成,成功:{$success}条,失败:{$error}条")->refresh();
|
||||
}
|
||||
|
||||
@@ -40,7 +42,6 @@ class Batch extends Action
|
||||
->whereHas('identity', function ($query) {
|
||||
$query->where('identity_id', 1);
|
||||
})
|
||||
->where('type', 'pingan')
|
||||
->get()
|
||||
->pluck('nickname', 'id');
|
||||
|
||||
@@ -55,4 +56,5 @@ class Batch extends Action
|
||||
<a class="btn btn-sm btn-default import-post"><i class="fa fa-Yuan"></i>批量打款</a>
|
||||
HTML;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class IndexController extends AdminController
|
||||
'accountable',
|
||||
User::class,
|
||||
function ($query) {
|
||||
$query->where('type', 'pingan')->whereHas('identity', function ($q) {
|
||||
$query->whereHas('identity', function ($q) {
|
||||
$q->where('identity_id', 1);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,13 +38,10 @@ class IndexController extends AdminController
|
||||
'3' => '核销失败',
|
||||
]);
|
||||
$filter->between('created_at', '核销时间')->datetime();
|
||||
$users = User::query()
|
||||
->whereHas('identity', function ($query) {
|
||||
$users = User::whereHas('identity', function ($query) {
|
||||
$query->where('identity_id', 1);
|
||||
})
|
||||
->where('type', 'pingan')
|
||||
->get()
|
||||
->pluck('nickname', 'id');
|
||||
})->get()->pluck('nickname', 'id');
|
||||
|
||||
$filter->equal('user_id', '渠道')->select($users);
|
||||
$filter->equal('thirdPartyGoodsId', '优惠政策')->select(ActivityRule::pluck('title', 'code'));
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ use Encore\Admin\Grid;
|
||||
class IndexController extends AdminController
|
||||
{
|
||||
|
||||
protected $title = '平安渠道打款处理';
|
||||
protected $title = '渠道打款处理';
|
||||
|
||||
/**
|
||||
* Notes:
|
||||
@@ -59,7 +59,6 @@ class IndexController extends AdminController
|
||||
->whereHas('identity', function ($query) {
|
||||
$query->where('identity_id', 1);
|
||||
})
|
||||
->where('type', 'pingan')
|
||||
->get()
|
||||
->pluck('nickname', 'id');
|
||||
|
||||
|
||||
@@ -33,13 +33,10 @@ class LogController extends AdminController
|
||||
$grid->filter(function ($filter) {
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->between('paid_at', '打款时间')->datetime();
|
||||
$users = User::query()
|
||||
->whereHas('identity', function ($query) {
|
||||
$users = User::whereHas('identity', function ($query) {
|
||||
$query->where('identity_id', 1);
|
||||
})
|
||||
->where('type', 'pingan')
|
||||
->get()
|
||||
->pluck('nickname', 'id');
|
||||
})->get()->pluck('nickname', 'id');
|
||||
|
||||
$filter->equal('user_id', '渠道')->select($users);
|
||||
});
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class IndexController extends AdminController
|
||||
$actions->add(new Callback);
|
||||
}
|
||||
|
||||
if ($actions->row->type == 'pingan' && $actions->row->identity_id == 1 && $user->id == 1) {
|
||||
if ($actions->row->identity_id == 1 && $user->id == 1) {
|
||||
$actions->add(new Profit);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ class User implements ToCollection
|
||||
foreach ($rows as $row) {
|
||||
$user = UserModel::whereHas('info', function ($q) use ($row) {
|
||||
$q->where('nickname', $row[1]);
|
||||
})->where('type', 'pingan')->whereNull('PaOutletId')->first();
|
||||
})->whereNull('PaOutletId')->first();
|
||||
|
||||
if ($user) {
|
||||
$user->PaOutletId = $row[2];
|
||||
@@ -29,6 +29,7 @@ class User implements ToCollection
|
||||
|
||||
if (count($error) > 0) {
|
||||
dd($error);
|
||||
|
||||
return implode(' ,', $error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user