fix(settle): 增强 DailySettleService ext 数组保护并完善全收益终审断言
这个提交包含在:
@@ -110,6 +110,9 @@ class DailySettleService
|
||||
foreach ($unsettledOrders as $o) {
|
||||
$freshExt = \think\Db::name('shopro_order')->where('id', $o['id'])->value('ext');
|
||||
$ext = is_array($freshExt) ? $freshExt : (json_decode($freshExt ?? '', true) ?: []);
|
||||
if (!is_array($ext)) {
|
||||
$ext = [];
|
||||
}
|
||||
$ext['madow_settled'] = 1;
|
||||
$ext['madow_settle_time'] = time();
|
||||
\think\Db::name('shopro_order')->where('id', $o['id'])->update([
|
||||
@@ -149,6 +152,9 @@ class DailySettleService
|
||||
foreach ($unsettledVenueOrders as $o) {
|
||||
$freshExt = \think\Db::name('shopro_order')->where('id', $o['id'])->value('ext');
|
||||
$ext = is_array($freshExt) ? $freshExt : (json_decode($freshExt ?? '', true) ?: []);
|
||||
if (!is_array($ext)) {
|
||||
$ext = [];
|
||||
}
|
||||
$ext['venue_settled'] = 1;
|
||||
$ext['venue_settle_time'] = time();
|
||||
\think\Db::name('shopro_order')->where('id', $o['id'])->update([
|
||||
@@ -163,6 +169,9 @@ class DailySettleService
|
||||
foreach ($allQualifiedOrders as $o) {
|
||||
$freshExt = \think\Db::name('shopro_order')->where('id', $o['id'])->value('ext');
|
||||
$ext = is_array($freshExt) ? $freshExt : (json_decode($freshExt ?? '', true) ?: []);
|
||||
if (!is_array($ext)) {
|
||||
$ext = [];
|
||||
}
|
||||
if (empty($ext['county_settled'])) {
|
||||
$unsettledCountyOrders[] = $o;
|
||||
$rules = PartnerConfig::getOrderEffectiveRules($o);
|
||||
@@ -185,6 +194,9 @@ class DailySettleService
|
||||
foreach ($unsettledCountyOrders as $o) {
|
||||
$freshExt = \think\Db::name('shopro_order')->where('id', $o['id'])->value('ext');
|
||||
$ext = is_array($freshExt) ? $freshExt : (json_decode($freshExt ?? '', true) ?: []);
|
||||
if (!is_array($ext)) {
|
||||
$ext = [];
|
||||
}
|
||||
$ext['county_settled'] = 1;
|
||||
$ext['county_settle_time'] = time();
|
||||
\think\Db::name('shopro_order')->where('id', $o['id'])->update([
|
||||
|
||||
在新工单中引用
屏蔽一个用户