Search in sources :

Example 1 with SettingEntryExample

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);
    }
}
Also used : User(com.ganster.cms.core.pojo.User) SettingEntryExample(com.ganster.cms.core.pojo.SettingEntryExample)

Aggregations

SettingEntryExample (com.ganster.cms.core.pojo.SettingEntryExample)1 User (com.ganster.cms.core.pojo.User)1