Update
parent
2e6d09e8e0
commit
15b4730915
|
|
@ -179,7 +179,6 @@ class OrderProcessCommand extends Command
|
||||||
$channelSubsidyLog->earning()->create([
|
$channelSubsidyLog->earning()->create([
|
||||||
'user_id' => $dealer->user_id,
|
'user_id' => $dealer->user_id,
|
||||||
'lvl' => $dealer->lvl,
|
'lvl' => $dealer->lvl,
|
||||||
'is_manager' => $dealer->is_manager,
|
|
||||||
'total_amount' => $totalAmount,
|
'total_amount' => $totalAmount,
|
||||||
'total_earnings' => bcsub($totalAmount, $fee, 2),
|
'total_earnings' => bcsub($totalAmount, $fee, 2),
|
||||||
'fee' => $fee,
|
'fee' => $fee,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class DealerEarning extends Model
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'lvl' => DealerLvl::class,
|
'lvl' => DealerLvl::class,
|
||||||
'is_manager'=> 'bool',
|
|
||||||
'status' => DealerEarningStatus::class,
|
'status' => DealerEarningStatus::class,
|
||||||
'pay_at' => 'datetime',
|
'pay_at' => 'datetime',
|
||||||
'settle_at'=> 'datetime',
|
'settle_at'=> 'datetime',
|
||||||
|
|
@ -32,7 +31,6 @@ class DealerEarning extends Model
|
||||||
'earningable_type',
|
'earningable_type',
|
||||||
'earningable_id',
|
'earningable_id',
|
||||||
'lvl',
|
'lvl',
|
||||||
'is_manager',
|
|
||||||
'total_amount',
|
'total_amount',
|
||||||
'total_earnings',
|
'total_earnings',
|
||||||
'fee',
|
'fee',
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ class CreateDealerEarningsTable extends Migration
|
||||||
$table->string('earningable_type')->nullable();
|
$table->string('earningable_type')->nullable();
|
||||||
$table->unsignedBigInteger('earningable_id')->nullable();
|
$table->unsignedBigInteger('earningable_id')->nullable();
|
||||||
$table->tinyInteger('lvl')->comment('经销商等级');
|
$table->tinyInteger('lvl')->comment('经销商等级');
|
||||||
$table->boolean('is_manager')->default(false)->comment('是否是管理者');
|
|
||||||
$table->unsignedDecimal('total_amount', 10, 2)->default(0)->comment('总金额');
|
$table->unsignedDecimal('total_amount', 10, 2)->default(0)->comment('总金额');
|
||||||
$table->unsignedDecimal('total_earnings', 10, 2)->default(0)->comment('总收入=总金额-手续费');
|
$table->unsignedDecimal('total_earnings', 10, 2)->default(0)->comment('总收入=总金额-手续费');
|
||||||
$table->unsignedDecimal('fee', 10, 2)->default(0)->comment('手续费');
|
$table->unsignedDecimal('fee', 10, 2)->default(0)->comment('手续费');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue