diff --git a/app/api/logic/OrderLogic.php b/app/api/logic/OrderLogic.php index 6a2d388..6d69cf8 100644 --- a/app/api/logic/OrderLogic.php +++ b/app/api/logic/OrderLogic.php @@ -611,7 +611,7 @@ class OrderLogic extends LogicBase 'consignee'=>($post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF) ? $post['consignee'] : '', 'mobile'=>($post['delivery_type'] == CommonOrder::DELIVERY_STATUS_SELF) ? $post['mobile'] : '' ]; - $order = self::addOrder($user_id, $data, $order_source, $user_address, $extra); + $order = self::addOrder($user_id, $data,$post, $order_source, $user_address, $extra); $order_id = $order['order_id']; self::addOrderGoods($order_id, $goods_lists); self::addOrderAfter($order_id, $user_id, $type, $data); @@ -648,7 +648,7 @@ class OrderLogic extends LogicBase * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ - public static function addOrder($user_id, $data, $order_source, $user_address, $extra = []) + public static function addOrder($user_id, $data, $order_source,$post, $user_address, $extra = []) { $growth_ratio = ConfigServer::get('trading', 'growth_ratio', 0); $give_growth_num = $growth_ratio > 0 ? ($data['order_amount'] / $growth_ratio) : 0; @@ -679,8 +679,8 @@ class OrderLogic extends LogicBase 'pay_way' => $data['pay_way'], 'integral_amount' => $data['integral_amount'] ?? 0, 'use_integral' => $data['user_use_integral'], - 'time_id' => $data['time_id'], - 'day' => $data['day'], + 'time_id' => $post['time_id'], + 'day' => $post['date'], 'team_id' => $extra['team_id'] ?? 0, 'team_found_id' => $extra['found_id'] ?? 0, 'attach_values' => json_encode($attach_values, JSON_UNESCAPED_UNICODE), @@ -711,8 +711,8 @@ class OrderLogic extends LogicBase 'pay_way' => $data['pay_way'], 'integral_amount' => $data['integral_amount'] ?? 0, 'use_integral' => $data['user_use_integral'], - 'time_id' => $data['time_id'], - 'day' => $data['day'], + 'time_id' => $post['time_id'], + 'day' => $post['date'], 'team_id' => $extra['team_id'] ?? 0, 'team_found_id' => $extra['found_id'] ?? 0, 'attach_values' => json_encode($attach_values, JSON_UNESCAPED_UNICODE),