/**
   * 增加技能
   *
   * @param req
   * @param response
   * @param dataParm
   */
  @RequestMapping("abli/addAbli")
  public void addAbli(
      HttpServletRequest req, HttpServletResponse response, @RequestParam String dataParm) {
    if (logger.isDebugEnabled()) {
      logger.debug("UserAblityController---addAbli---begin");
    }

    try {
      super.getParm(req, response);

      Map paramMap = data.getDataset();

      String user_id = (String) paramMap.get("USER_ID"),
          s_user_id = (String) session.getAttribute("user_id");

      if (user_id == null || (user_id != null && !user_id.equals(s_user_id))) {
        super.writeJson(response, Code.FAIL, "无效用户!", null, null);
      } else if (!UserAgentUtils.isMobileOrTablet(req)) {
        super.writeJson(response, "9997", "无效设备", null, null);
      } else {
        // ABLI_ID
        String abli_id = IdGen.uuid();
        paramMap.put("ABLI_ID", abli_id);
        // Check The Task
        Map parmMap = new HashMap();
        parmMap.put("CANT_CODE", (String) session.getAttribute("CANT_CODE"));
        parmMap.put("PARM_NAME", "ABLI_TASK_CHECK");
        paramMap.put(
            "ABLI_STATUS", "1".equals(PubTool.getOrgParm(parmMap, pubToolService)) ? "10" : "20");
        // Publish Status
        String dateTime = DateUtils.getDateTime();
        paramMap.put("ABLI_CREATE_TIME", dateTime);
        paramMap.put("ABLI_LAST_UPDATE", dateTime);
        paramMap.put("ABLI_BUY_COUNT", "0");
        userAblityService.addAblity(paramMap);
        // Get Ability Info
        parmMap = new HashMap();
        parmMap.put("ABLI_ID", abli_id);
        parmMap = userAblityService.searchAblityById(parmMap);
        super.writeJson(response, Code.SUCCESS, Code.SUCCESS_MSG, parmMap, null);
      }
    } catch (Exception e) {
      super.writeJson(response, "9992", "后台程序执行失败", null, null);
      logger.error("UserAblityController---addAbli---interface error: ", e);
    }
  }