|  | @@ -463,12 +463,27 @@ class Sell
 | 
	
		
			
				|  |  |                  Dever::alert('卡号/密码错误');
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if (time() > $data['card']['edate']) {
 | 
	
		
			
				|  |  | +                # 更新礼品卡状态
 | 
	
		
			
				|  |  | +                $card_update['where_id'] = $data['card']['id'];
 | 
	
		
			
				|  |  | +                $card_update['uid'] = $data['uid'];
 | 
	
		
			
				|  |  | +                $card_update['shop_id'] = $data['shop']['id'];
 | 
	
		
			
				|  |  | +                $card_update['status'] = 5;
 | 
	
		
			
				|  |  | +                Dever::db('goods/card_code')->update($card_update);
 | 
	
		
			
				|  |  |                  Dever::alert('礼品卡已失效');
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              $card_info = Dever::db('goods/card')->find($data['card']['card_id']);
 | 
	
		
			
				|  |  |              if (!$card_info) {
 | 
	
		
			
				|  |  |                  Dever::alert('卡号/密码错误');
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            # 更新礼品卡状态
 | 
	
		
			
				|  |  | +            $card_update['where_id'] = $data['card']['id'];
 | 
	
		
			
				|  |  | +            $card_update['status'] = 2;
 | 
	
		
			
				|  |  | +            $card_update['uid'] = $data['uid'];
 | 
	
		
			
				|  |  | +            $card_update['shop_id'] = $data['shop']['id'];
 | 
	
		
			
				|  |  | +            $card_update['ddate'] = time();
 | 
	
		
			
				|  |  | +            Dever::db('goods/card_code')->update($card_update);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              $goods = Dever::array_decode($card_info['goods']);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              $goods_id = array();
 | 
	
	
		
			
				|  | @@ -641,11 +656,8 @@ class Sell
 | 
	
		
			
				|  |  |              if ($card) {
 | 
	
		
			
				|  |  |                  # 更新礼品卡状态
 | 
	
		
			
				|  |  |                  $card_update['where_id'] = $card['id'];
 | 
	
		
			
				|  |  | -                $card_update['status'] = 2;
 | 
	
		
			
				|  |  | -                $card_update['uid'] = $uid;
 | 
	
		
			
				|  |  | -                $card_update['shop_id'] = $shop['id'];
 | 
	
		
			
				|  |  | +                $card_update['status'] = 3;
 | 
	
		
			
				|  |  |                  $card_update['order_id'] = $id;
 | 
	
		
			
				|  |  | -                $card_update['ddate'] = time();
 | 
	
		
			
				|  |  |                  Dever::db('goods/card_code')->update($card_update);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          	return array
 |