weizong song 5 years ago
parent 1b39d142f0
commit 85fdcf3685

@ -153,8 +153,19 @@ class StatisticsController extends CommonController
public function syncOrderItems(Request $request)
{
DB::enableQueryLog();
//采用指定时间段订单号
$model = OrderItems::whereNotNull("service_date")->whereRaw("UNIX_TIMESTAMP(`service_date`) >= ".strtotime("2021-06-01"));
//采用指定订单号
$model = OrderItems::whereHas("order", function($query) {
$query->whereIn("serial",[
"20210910000003",
"20210914000006",
"20210826000004",
"20210909000022",
"20210903000007",
"20210918000013",
"20210906000015"
]);
});
dd($model->get());
//采用指定订单号结束
if ($request->last_id) {
@ -171,7 +182,7 @@ class StatisticsController extends CommonController
foreach ($orderItems as $orderItem) {
$factors = json_decode($orderItem->factors);
foreach ($factors as $factor) {
$current_factor = FactorItems::find($factor->factor_item_id);
$current_factor = FactorItems::find(3);
$factor->fee = $current_factor->fee;
$factor->fee_percent = $current_factor->fee_percent;
$factor->factor_name = $current_factor->name;

@ -724,7 +724,7 @@ class OrdersController extends CommonController
}
$order->update($update);
//正在进行中的订单修改子订单
//正在进行中当天订单修改
if ($order->isOngoing() && request()->available_day == "today") {
$res = (new OrderItems())->updateTodayItem($order->id);
if (!$res["status"]) {

Loading…
Cancel
Save