File tree Expand file tree Collapse file tree
src/main/java/ssu/eatssu/domain/menu/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,19 +97,32 @@ public boolean isContinued() {
9797 return !this .isDiscontinued ;
9898 }
9999
100- public void increaseLikeCount () {
101- likeCount ++;
100+ public void increaseLikeCount ()
101+ {
102+ if (this .likeCount ==null ){
103+ this .likeCount =0 ;
104+ }
105+ this .likeCount ++;
102106 }
103107
104108 public void increaseUnlikeCount () {
105- unlikeCount ++;
109+ if (this .unlikeCount ==null ){
110+ this .unlikeCount =0 ;
111+ }
112+ this .unlikeCount ++;
106113 }
107114
108115 public void decreaseLikeCount () {
109- likeCount --;
116+ if (this .likeCount ==null ){
117+ this .likeCount =0 ;
118+ }
119+ this .likeCount --;
110120 }
111121
112122 public void decreaseUnlikeCount () {
123+ if (this .unlikeCount ==null ){
124+ this .unlikeCount =0 ;
125+ }
113126 unlikeCount --;
114127 }
115128
You can’t perform that action at this time.
0 commit comments