logo search
This commit is contained in:
		
							parent
							
								
									723b50da53
								
							
						
					
					
						commit
						5cddfc8a97
					
				@ -19,7 +19,7 @@ func (p *FsPreprocessLogoModel) PreLogoSearchSuggestions(ctx context.Context, zi
 | 
			
		||||
	for i, v := range keywords {
 | 
			
		||||
		keywords[i] = "+" + v + "*"
 | 
			
		||||
	}
 | 
			
		||||
	sqlstr := fmt.Sprintf("SELECT * FROM fs_preprocess_logo WHERE MATCH(restaurant_name) AGAINST(? IN BOOLEAN MODE) limit %d;", count)
 | 
			
		||||
	sqlstr := fmt.Sprintf("SELECT id,restaurant_name,resource_url,address,zip_code,phone,website,is_branch FROM fs_preprocess_logo WHERE MATCH(restaurant_name) AGAINST(? IN BOOLEAN MODE) limit %d;", count)
 | 
			
		||||
 | 
			
		||||
	tx := p.db.WithContext(ctx).Model(&FsPreprocessLogo{}).Raw(sqlstr, strings.Join(keywords, " "))
 | 
			
		||||
	err = tx.Scan(&resp).Error
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user