weizong song 5 years ago
parent 5330794d31
commit 7586d6a73f

@ -151,6 +151,20 @@ class StatisticsController extends CommonController
{
//采用指定时间段订单号
$orders = Orders::where("serial",">","20210601000000")->select("serial","id","status","created_at")->get();
foreach ($orders as $order) {
$factors = json_decode($order->factors);
foreach ($factors as $factor) {
$current_factor = FactorItems::find($factor->factor_item_id);
$factor->fee = $current_factor->fee;
$factor->fee_percent = $current_factor->fee_percent;
$factor->factor_name = $current_factor->name;
}
$order->update([
"factors" => json_encode($factors)
]);
}
dd("订单处理完毕");
$model = OrderItems::whereIn("order_id",$orders->pluck("id")->toArray());
//采用指定订单号结束

Loading…
Cancel
Save