Ejemplo n.º 1
0
 /**
  * @Description: 删除扣分类型 逻辑删除 不可见
  *
  * @param request
  * @return String 返回值描述
  * @author chenbin
  * @create_date 2014-8-11 下午1:20:51
  */
 @RequestMapping("/delIntegalAdds")
 public void delIntegalCuts(HttpServletRequest request, HttpServletResponse resp) {
   int inteCutAddID = Integer.parseInt(request.getParameter("inteCutAddID"));
   TIntegalAdd integalAdd = integalAddService.get(inteCutAddID);
   integalAdd.setNEnable(SystemConstants.SYS_DISABLE);
   try {
     integalAddService.update(integalAdd);
     AjaxUtil.rendJson(resp, true, "保存成功!");
   } catch (Exception e) {
     // TODO: handle exception
     AjaxUtil.rendJson(resp, false, "保存失败,原因 :" + e.getMessage());
   }
 }
Ejemplo n.º 2
0
 /**
  * @Description: 跳转到保存前的处理
  *
  * @param request
  * @return String 返回值描述
  * @author chenbin
  * @create_date 2014-8-11 下午1:20:51
  */
 @RequestMapping("/saveBefore")
 public String saveBefore(HttpServletRequest request) {
   String inteCutID = request.getParameter("inteCutAddID");
   if (StringUtils.isNotBlank(inteCutID)) {
     TIntegalAdd integalAdd = integalAddService.get(Integer.parseInt(inteCutID));
     request.setAttribute("integalAdd", integalAdd);
   }
   return "integal/saveIntegalAdd";
 }
Ejemplo n.º 3
0
  /**
   * @Description: 新增 / 修改扣分类型
   *
   * @param request
   * @return String 返回值描述
   * @author chenbin
   * @create_date 2014-8-11 下午1:20:51
   */
  @RequestMapping("/save")
  public void save(HttpServletRequest request, HttpServletResponse resp, TIntegalAdd integalAdd) {
    HttpSession session = request.getSession();
    TUser user = (TUser) session.getAttribute("user");

    integalAdd.setNEnable(SystemConstants.SYS_ENABLE);
    integalAdd.setDtOpUser(new Date());
    integalAdd.setIOpUserId(user.getId());

    try {
      integalAddService.saveOrUpdate(integalAdd);
      AjaxUtil.rendJson(resp, true, "保存成功!");
    } catch (Exception e) {
      // TODO: handle exception
      AjaxUtil.rendJson(resp, false, "保存失败,原因 :" + e.getMessage());
    }
  }