|
@@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* 社区设置管理
|
|
@@ -81,10 +82,14 @@ public class CommunitySettingsController {
|
|
|
@ApiOperation("获取隐私权限")
|
|
|
@GetMapping("/userPrivacy")
|
|
|
//@Anonymous
|
|
|
- public AjaxResult userPrivacy() {
|
|
|
+ public AjaxResult userPrivacy(@RequestParam(required = false) Long userId) {
|
|
|
+ if (Objects.isNull(userId)) {
|
|
|
+ userId = SecurityUtils.getLoginUser().getUserId();
|
|
|
+ }
|
|
|
+
|
|
|
List<CommunityUserPrivacyVo> communityUserPrivacyVos = null;
|
|
|
try {
|
|
|
- communityUserPrivacyVos = communityPrivacyService.selectUserPrivacy(SecurityUtils.getLoginUser().getUserId());
|
|
|
+ communityUserPrivacyVos = communityPrivacyService.selectUserPrivacy(userId);
|
|
|
} catch (Exception e) {
|
|
|
throw new ProjectException();
|
|
|
}
|