| 
                
               | 
              
                
               | 
              
                @@ -892,7 +892,7 @@ def pai2_home_api(request): 
               | 
            
            
            
              | 
                892
               | 
              
                892
               | 
              
                     #     offset=0, 
               | 
            
            
            
              | 
                893
               | 
              
                893
               | 
              
                     #     rows=settings.PAI2_HOME_MAX_ROWS, 
               | 
            
            
            
              | 
                894
               | 
              
                894
               | 
              
                     # )) 
               | 
            
            
            
              | 
                895
               | 
              
                
               | 
              
                -    # rows = cursor.fetchall 
               | 
            
            
            
              | 
                
               | 
              
                895
               | 
              
                +    # rows = cursor.fetchall() 
               | 
            
            
            
              | 
                896
               | 
              
                896
               | 
              
                  
               | 
            
            
            
              | 
                897
               | 
              
                897
               | 
              
                     # 使用 records 执行原生 SQL 语句,获取首页照片列表 
               | 
            
            
            
              | 
                898
               | 
              
                898
               | 
              
                     rows = db.query(PAI2_HOME_API.format( 
               | 
            
            
            
            
            
              | 
                
               | 
              
                
               | 
              
                @@ -943,7 +943,8 @@ def pai2_home_api(request): 
               | 
            
            
            
              | 
                943
               | 
              
                943
               | 
              
                         'photo_thumbnail2_url': img_url(row['photo_thumbnail2_path']), 
               | 
            
            
            
              | 
                944
               | 
              
                944
               | 
              
                         'photo_share_url': share_url(row['photo_id']), 
               | 
            
            
            
              | 
                945
               | 
              
                945
               | 
              
                         'thumbup': get_group_photo_thumbup_flag(row['photo_id'], user_id), 
               | 
            
            
            
              | 
                946
               | 
              
                
               | 
              
                -        'porder': get_lensman_order_record(row['photo_id'], user_id) if row['photo_from'] == GroupPhotoInfo.SESSION_GROUP else {}
               | 
            
            
            
              | 
                
               | 
              
                946
               | 
              
                +        'porder': get_lensman_order_record(row['photo_id'], user_id) if row['photo_from'] == GroupPhotoInfo.SESSION_GROUP else {},
               | 
            
            
            
              | 
                
               | 
              
                947
               | 
              
                +        'created_at': '{}Z'.format(row['created_at']),
               | 
            
            
            
              | 
                947
               | 
              
                948
               | 
              
                     }) for row in rows] 
               | 
            
            
            
              | 
                948
               | 
              
                949
               | 
              
                  
               | 
            
            
            
              | 
                949
               | 
              
                950
               | 
              
                     return JsonResponse({
               |