| | |
| | | } |
| | | |
| | | |
| | | public String getVipGradeSelect(List<VipGrade> listGrade, Long gradeId) { |
| | | String str = ""; |
| | | for (VipGrade t : listGrade) { |
| | | str += "<option value=\"" + t.getId() + "\" " |
| | | + (t.getId().longValue() == gradeId.longValue() ? "selected=\"selected\"" : "") + " > " + t.getName() |
| | | + "</option> "; |
| | | } |
| | | System.out.println(str); |
| | | return str; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "add") |
| | | public Result add(VipCenter t, HttpServletRequest request) { |
| | | try { |
| | | vipCenterService.saveManageWeb(t); |
| | | return ResultUtils.loadTrue(); |
| | | } catch (VipCenterException e) { |
| | | return ResultUtils.loadFalse(e.getCode(),e.getMsg()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtils.loadFalse("保存失败!"); |