|
@@ -70,6 +70,13 @@ class detail_ops
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ $modify_state = function ($partition,$detail_id,$state)
|
|
|
|
+ {
|
|
|
|
+ if($state > 0) {
|
|
|
|
+ Model()->table('refill_detail')->update(['detail_id' => $detail_id],['order_state' => $state]);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
$details = $detail_gen($partition,$start,$last);
|
|
$details = $detail_gen($partition,$start,$last);
|
|
foreach ($details as $item)
|
|
foreach ($details as $item)
|
|
{
|
|
{
|
|
@@ -79,6 +86,12 @@ class detail_ops
|
|
|
|
|
|
$state = $state_check($partition,$mchid,$mch_order);
|
|
$state = $state_check($partition,$mchid,$mch_order);
|
|
Log::record("detail_id={$detail_id},mchid={$mchid},mch_order={$mch_order} order_state={$state}",Log::DEBUG);
|
|
Log::record("detail_id={$detail_id},mchid={$mchid},mch_order={$mch_order} order_state={$state}",Log::DEBUG);
|
|
|
|
+ if($state > -1) {
|
|
|
|
+ $modify_state($partition, $detail_id, $state);
|
|
|
|
+ }
|
|
|
|
+ if($state == ORDER_STATE_SEND) {
|
|
|
|
+ Log::record("SENDING: detail_id={$detail_id},mchid={$mchid},mch_order={$mch_order} order_state={$state}",Log::DEBUG);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|