修改增收补贴列表
This commit is contained in:
parent
cdbf8cc0c9
commit
e371179faf
@ -200,9 +200,9 @@ class Store extends BaseController
|
||||
$record = $query->page($page)->limit($limit)->order('id', 'desc')->select()->toArray();
|
||||
if ($type == 2) {
|
||||
$merchantTypeId = Merchant::where('mer_id', $this->merId)->value('type_id');
|
||||
$first = $record[0] ?? ['coupon_price' => 0];
|
||||
$first = $record[0] ?? ['coupon_price' => 0, 'extra' => ['sale_target' => 0]];
|
||||
foreach ($coupon['config'] as $item) {
|
||||
if (in_array($merchantTypeId, $item['type_id']) && $item['subsidy'] > $first['coupon_price']) {
|
||||
if (in_array($merchantTypeId, $item['type_id']) && $item['amount'] > $first['extra']['sale_target']) {
|
||||
array_unshift($record, [
|
||||
'id' => 0,
|
||||
'coupon_price' => $item['subsidy'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user