|
|
@@ -89,6 +89,11 @@ public class RiceInviteController extends BaseController {
|
|
|
//助力别人并认领水滴
|
|
|
@PostMapping("/helpOthers")
|
|
|
public R<?> helpOthers(@RequestParam Long helperId, @RequestParam Long helpeeId) {
|
|
|
+
|
|
|
+ if (helperId.equals(helpeeId)) {
|
|
|
+ return R.error("不能自己助力自己");
|
|
|
+ }
|
|
|
+
|
|
|
// 检查助力者是否已经助力过该用户
|
|
|
Optional<RiceInvite> invite = riceInviteRepo.findByHelperIdAndHelpeeIdAndCreateTimeBetween(helperId, helpeeId, getTodayStartTime(), getTodayEndTime());
|
|
|
if (invite.isPresent()) {
|