|  | @@ -559,7 +559,14 @@ class SpApiRequest:
 | 
	
		
			
				|  |  |              time.sleep(5)
 | 
	
		
			
				|  |  |              conn = self.mysql_connect_auth_lst()
 | 
	
		
			
				|  |  |              cursor = conn.cursor()
 | 
	
		
			
				|  |  | -        query_judge = f"""select count(*) from asj_ads.SalesAndTrafficByAsin where data_date='{shopReportday}' and countryCode='{countryCode}'"""
 | 
	
		
			
				|  |  | +        if level == 'SKU':
 | 
	
		
			
				|  |  | +            query_judge = f"""select count(*) from asj_ads.SalesAndTrafficByAsin where data_date='{shopReportday}' and countryCode='{countryCode}' and childAsin is not Null and sku is not Null"""
 | 
	
		
			
				|  |  | +        elif level == 'CHILD':
 | 
	
		
			
				|  |  | +            query_judge = f"""select count(*) from asj_ads.SalesAndTrafficByAsin where data_date='{shopReportday}' and countryCode='{countryCode}' and sku is null"""
 | 
	
		
			
				|  |  | +        elif level == 'PARENT':
 | 
	
		
			
				|  |  | +            query_judge = f"""select count(*) from asj_ads.SalesAndTrafficByAsin where data_date='{shopReportday}' and countryCode='{countryCode}' and sku is null and childAsin is null"""
 | 
	
		
			
				|  |  | +        else:
 | 
	
		
			
				|  |  | +            return ''
 | 
	
		
			
				|  |  |          print(query_judge)
 | 
	
		
			
				|  |  |          cursor.execute(query_judge)
 | 
	
		
			
				|  |  |          rel = cursor.fetchall()
 | 
	
	
		
			
				|  | @@ -1094,7 +1101,7 @@ class SpApiRequest:
 | 
	
		
			
				|  |  |  if __name__ == '__main__':
 | 
	
		
			
				|  |  |      for days in range(35,45):
 | 
	
		
			
				|  |  |          SpApiRequest.get_allShops("GET_SALES_AND_TRAFFIC_REPORT",days=-days,**{"level":"SKU"})
 | 
	
		
			
				|  |  | -    # SpApiRequest.listing_infoTable()
 | 
	
		
			
				|  |  | +    SpApiRequest.listing_infoTable()
 | 
	
		
			
				|  |  |      # rel = SpApiRequest.get_catelog(account_name='ANLAPUS_US',country=Marketplaces.US,asin='B0BVXB4KT9')
 | 
	
		
			
				|  |  |      # print(rel)
 | 
	
		
			
				|  |  |  
 |