修复:合伙人分佣错误,导致分佣失败
This commit is contained in:
parent
2a39a207f2
commit
82d40201f9
|
|
@ -67,7 +67,16 @@ class PartnerSettlementCycleRepository extends BaseRepository{
|
||||||
Db::commit();
|
Db::commit();
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
Log::info('合伙人佣金结算 - 错误:'.$e->getMessage());
|
$error = [
|
||||||
|
'start_time' => $this->startTime,
|
||||||
|
'end_time' => $this->endTime,
|
||||||
|
'totalCommission' => $this->totalCommission,
|
||||||
|
'refundTotalCommission' => $this->refundTotalCommission,
|
||||||
|
'realityMoney' => $this->realityMoney,
|
||||||
|
'msg' => $e->getMessage()
|
||||||
|
];
|
||||||
|
|
||||||
|
Log::info('合伙人佣金结算 - 错误:'.var_export($error,1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -102,7 +111,7 @@ class PartnerSettlementCycleRepository extends BaseRepository{
|
||||||
throw new Exception("执行时间错误(上一个周期结束时间{$upCycleEndDate},下一个周期结束时间{$nextCycleEndDate})");
|
throw new Exception("执行时间错误(上一个周期结束时间{$upCycleEndDate},下一个周期结束时间{$nextCycleEndDate})");
|
||||||
}
|
}
|
||||||
// 判断:分红总金额是否大于0
|
// 判断:分红总金额是否大于0
|
||||||
[$this->totalCommission,$this->refundTotalCommission,$this->realityMoney] = (float)app()->make(RecordRepository::class)->getTotalCommission($this->startTime,$this->endTime);
|
[$this->totalCommission,$this->refundTotalCommission,$this->realityMoney] = app()->make(RecordRepository::class)->getTotalCommission($this->startTime,$this->endTime);
|
||||||
|
|
||||||
if($this->realityMoney <= 0) throw new Exception('分红总金额为0');
|
if($this->realityMoney <= 0) throw new Exception('分红总金额为0');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue