Package org.jeecgframework.core.common.model.json

Examples of org.jeecgframework.core.common.model.json.AjaxJson


   * @return
   */
  @RequestMapping(params = "saveTypeGroup")
  @ResponseBody
  public AjaxJson saveTypeGroup(TSTypegroup typegroup, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(typegroup.getId())) {
      message = "类型分组: " + typegroup.getTypegroupname() + "被更新成功";
      userService.saveOrUpdate(typegroup);
      systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
    } else {
      message = "类型分组: " + typegroup.getTypegroupname() + "被添加成功";
      userService.save(typegroup);
      systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
    }
    //刷新缓存
    systemService.refleshTypeGroupCach();
    j.setMsg(message);
    return j;
  }
View Full Code Here


   * @return
   */
  @RequestMapping(params = "saveType")
  @ResponseBody
  public AjaxJson saveType(TSType type, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(type.getId())) {
      message = "类型: " + type.getTypename() + "被更新成功";
      userService.saveOrUpdate(type);
      systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
    } else {
      message = "类型: " + type.getTypename() + "被添加成功";
      userService.save(type);
      systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
    }
    //刷新缓存
    systemService.refleshTypesCach(type);
    j.setMsg(message);
    return j;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "delDepart")
  @ResponseBody
  public AjaxJson delDepart(TSDepart depart, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    depart = systemService.getEntity(TSDepart.class, depart.getId());
    message = "部门: " + depart.getDepartname() + "被删除 成功";
    systemService.delete(depart);
    systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);

View Full Code Here

    // 设置上级部门
    String pid = request.getParameter("TSPDepart.id");
    if (pid.equals("")) {
      depart.setTSPDepart(null);
    }
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(depart.getId())) {
      message = "部门: " + depart.getDepartname() + "被更新成功";
      userService.saveOrUpdate(depart);
      systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
    } else {
      message = "部门: " + depart.getDepartname() + "被添加成功";
      userService.save(depart);
      systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
    }
    j.setMsg(message);
    return j;
  }
View Full Code Here

   */
  @RequestMapping(params = "delRole")
  @ResponseBody
  public AjaxJson delRole(TSRole role, String ids, HttpServletRequest request) {
    message = "角色: " + role.getRoleName() + "被删除成功";
    AjaxJson j = new AjaxJson();
    role = systemService.getEntity(TSRole.class, role.getId());
    userService.delete(role);
    systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
    j.setMsg(message);
    return j;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "saveRole")
  @ResponseBody
  public AjaxJson saveRole(TSRole role, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (role.getId() != null) {
      message = "角色: " + role.getRoleName() + "被更新成功";
      userService.saveOrUpdate(role);
      systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
    } else {
      message = "角色: " + role.getRoleName() + "被添加成功";
      userService.saveOrUpdate(role);
      systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
    }
    j.setMsg(message);
    return j;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "saveOperate")
  @ResponseBody
  public AjaxJson saveOperate(HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    String fop = request.getParameter("fp");
    String roleid = request.getParameter("roleid");
    // 录入操作前清空上一次的操作数据
    clearp(roleid);
    String[] fun_op = fop.split(",");
View Full Code Here

   */

  @RequestMapping(params = "delVersion")
  @ResponseBody
  public AjaxJson delVersion(TSVersion version, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    version = systemService.getEntity(TSVersion.class, version.getId());
    message = "版本:" + version.getVersionName() + "被删除 成功";
    systemService.delete(version);
    systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);

View Full Code Here

   * @throws Exception
   */
  @RequestMapping(params = "saveVersion", method = RequestMethod.POST)
  @ResponseBody
  public AjaxJson saveVersion(HttpServletRequest request) throws Exception {
    AjaxJson j = new AjaxJson();
    TSVersion version = new TSVersion();
    String versionName = request.getParameter("versionName");
    String versionCode = request.getParameter("versionCode");
    version.setVersionCode(versionCode);
    version.setVersionName(versionName);
    systemService.save(version);
    j.setMsg("版本保存成功");
    return j;
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "delDocument")
  @ResponseBody
  public AjaxJson delDocument(TSDocument document, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    document = systemService.getEntity(TSDocument.class, document.getId());
    message = "" + document.getDocumentTitle() + "被删除成功";
    userService.delete(document);
    systemService.addLog(message, Globals.Log_Type_DEL,
        Globals.Log_Leavel_INFO);
    j.setSuccess(true);
    j.setMsg(message);
    return j;
  }
View Full Code Here

TOP

Related Classes of org.jeecgframework.core.common.model.json.AjaxJson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.