mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-31 04:02:07 +08:00 
			
		
		
		
	Update Order.php
This commit is contained in:
		
							parent
							
								
									f432ce693d
								
							
						
					
					
						commit
						d87d24f0a4
					
				| @ -236,13 +236,14 @@ class Order extends Auth | |||||||
|         $addr = $this->app->db->name('DataUserAddress')->where($map)->find(); |         $addr = $this->app->db->name('DataUserAddress')->where($map)->find(); | ||||||
|         if (empty($addr)) $this->error('收货地址异常'); |         if (empty($addr)) $this->error('收货地址异常'); | ||||||
|         // 订单状态检查
 |         // 订单状态检查
 | ||||||
|         $map = ['uid' => $this->uuid, 'order_no' => $data['order_no']]; |         $map1 = ['uid' => $this->uuid, 'order_no' => $data['order_no']]; | ||||||
|         $order = $this->app->db->name('ShopOrder')->where($map)->whereIn('status', [1, 2])->find(); |         $order = $this->app->db->name('ShopOrder')->where($map1)->whereIn('status', [1, 2])->find(); | ||||||
|         $tCount = $this->app->db->name('ShopOrderItem')->where($map)->sum('truck_number'); |  | ||||||
|         if (empty($order)) $this->error('不能修改地址'); |         if (empty($order)) $this->error('不能修改地址'); | ||||||
|  |         if (empty($order['truck_type'])) $this->success('无需快递配送', ['order_no' => $order['order_no']); | ||||||
|         // 根据地址计算运费
 |         // 根据地址计算运费
 | ||||||
|         $map = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']]; |         $map2 = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']]; | ||||||
|         $tCodes = $this->app->db->name('ShopOrderItem')->where($map)->column('truck_code'); |         $tCount = $this->app->db->name('ShopOrderItem')->where($map1)->sum('truck_number'); | ||||||
|  |         $tCodes = $this->app->db->name('ShopOrderItem')->where($map2)->column('truck_code'); | ||||||
|         [$amount, $tCount, $tCode, $remark] = ExpressService::instance()->amount($tCodes, $addr['province'], $addr['city'], $tCount); |         [$amount, $tCount, $tCode, $remark] = ExpressService::instance()->amount($tCodes, $addr['province'], $addr['city'], $tCount); | ||||||
|         // 创建订单发货信息
 |         // 创建订单发货信息
 | ||||||
|         $express = [ |         $express = [ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user