use of com.ganster.cms.core.pojo.SettingEntryExample in project Ganster-CMS by Gangster-trio.
the class SystemSettingController method list.
// id代表站点id
@GetMapping("/list/{id}")
public List<SettingEntry> list(@PathVariable Integer id) {
Integer userId = (Integer) SecurityUtils.getSubject().getSession().getAttribute("id");
User user = userService.selectByPrimaryKey(userId);
if (userId == null) {
return null;
} else {
SettingEntryExample settingEntryExample = new SettingEntryExample();
if (!user.getUserName().equals("admin")) {
if (PermissionUtil.permittedModule(userId, id, 9, CmsConst.PERMISSION_READ)) {
return settingService.selectByExample(settingEntryExample);
} else {
return null;
}
}
return settingService.selectByExample(settingEntryExample);
}
}
Aggregations