コード例 #1
0
  @RequestMapping("/loadEnterpriseUserSetting")
  @ResponseBody
  public View<UserSettingView> loadEnterpriseUserSetting(HttpSession session) {
    User user = super.getLoginUser(session);

    View<UserSettingView> userSettingView = webUserSettingService.getSetting(user.getId());

    return userSettingView;
  }
コード例 #2
0
  @RequestMapping("/saveEnterpriseUserSetting")
  @ResponseBody
  public View<Boolean> saveEnterpriseUserSetting(
      @ModelAttribute("param") SettingSaveParam param,
      String receiveNotification,
      HttpSession session) {
    if (receiveNotification != null) {
      if (receiveNotification.equals("on")) {
        param.setReceiveNotification(true);
      } else {
        param.setReceiveNotification(false);
      }
    } else {
      param.setReceiveNotification(false);
    }
    User user = this.getLoginUser(session);

    return webUserSettingService.saveSettingByUserId(user.getId(), param);
  }