|
@@ -300,7 +300,11 @@ public class BasicToWebServiceImpl implements BasicToWebService
|
|
|
tourUserLikeTravelNotes.setTravelNotesId(travelNotesId);
|
|
|
tourUserLikeTravelNotes.setUserId(TokenData.takeFromRequest().getUserId());
|
|
|
TourTourismProjectTravelNotes tourTourismProjectTravelNotes = tourTourismProjectTravelNotesService.getById(travelNotesId);
|
|
|
- tourTourismProjectTravelNotes.setLikeCount(tourTourismProjectTravelNotes.getLikeCount()+1);
|
|
|
+ if(tourTourismProjectTravelNotes.getLikeCount() != null) {
|
|
|
+ tourTourismProjectTravelNotes.setLikeCount(tourTourismProjectTravelNotes.getLikeCount() + 1);
|
|
|
+ }else {
|
|
|
+ tourTourismProjectTravelNotes.setLikeCount(1);
|
|
|
+ }
|
|
|
if(type == 0){
|
|
|
tourUserLikeTravelNotesService.removeBy(tourUserLikeTravelNotes);
|
|
|
}else {
|