File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/main/java/ru/mystamps/web/service Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -202,19 +202,34 @@ public String suggestCountryForUser(Integer userId) {
202202 // if user created a series with a country, let's suggest this country to him
203203 String slug = countryDao .findCountryOfLastCreatedSeriesByUser (userId );
204204 if (slug != null ) {
205+ log .info (
206+ "Country {} has been suggested to user #{} from a recently created series" ,
207+ slug ,
208+ userId
209+ );
205210 return slug ;
206211 }
207212
208213 // if user created a country, let's suggest this country to him
209214 slug = countryDao .findLastCountryCreatedByUser (userId );
210215 if (slug != null ) {
216+ log .info (
217+ "Country {} has been suggested to user #{} as it was created by him recently" ,
218+ slug ,
219+ userId
220+ );
211221 return slug ;
212222 }
213223
214224 // user has never created a country but most of the series in his collection
215225 // belong to a specific country, let's suggest this country to him
216226 slug = countryDao .findPopularCountryInCollection (userId );
217227 if (slug != null ) {
228+ log .info (
229+ "Country {} has been suggested to user #{} as popular in his collection" ,
230+ slug ,
231+ userId
232+ );
218233 }
219234
220235 return slug ;
You can’t perform that action at this time.
0 commit comments