Skip to content

Commit

Permalink
限制加入自己开团团购部分加入判空,否则用户无法惨团
Browse files Browse the repository at this point in the history
  • Loading branch information
滑稽刘 authored and gitee-org committed Jul 2, 2020
1 parent 1a6e2e9 commit 27e6d27
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,13 @@ public Object submit(Integer userId, String body) {
}
// (2)不允许参加自己开团的团购
LitemallGroupon groupon = grouponService.queryById(userId, grouponLinkId);
if(groupon.getCreatorUserId().equals(userId)){
return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!");
// if(groupon.getCreatorUserId().equals(userId)){
// return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!");
// }
if(groupon!=null) {
if(groupon.getCreatorUserId().equals(userId)){
return ResponseUtil.fail(GROUPON_JOIN, "团购活动已经参加!");
}
}
}
}
Expand Down

0 comments on commit 27e6d27

Please sign in to comment.