public String checkExtractName() throws Exception { HttpServletRequest request = Struts2Utils.getRequest(); HttpServletResponse response = Struts2Utils.getResponse(); String taskName = getQueryParameter(request, "extractName"); String act = this.getQueryParameter(request, "act"); StringBuffer result = new StringBuffer(); if (null == taskName) { result.append("{success:false,desc:'请输入任务名称!'}"); } else { if (taskName.length() > 100) { result.append("{success:false,desc:'任务名称超过100个字符,请重新命名!'}"); } else { if (HTMLFilter.isChineseEnglishNumber(taskName)) { // 新建、拷贝情况,只要分群名字存在,需要充命名 if ("new".equalsIgnoreCase(act) || "copy".equalsIgnoreCase(act) || null == act) { if (extractTaskService.isTaskNameUnique(taskName)) { result.append("{success:true,desc:'任务名称可用!'}"); } else { result.append("{success:false,desc:'任务名称已经存在,请重新命名!'}"); } } } else { result.append("{success:false,desc:'只能输入汉字、数字、字母,字符之间不能空格,请重新输入!'}"); } } } return writerMessageToClient(response, result.toString()); }
public String showCustomMoldMain() throws Exception { HttpServletRequest request = Struts2Utils.getRequest(); HttpServletResponse response = Struts2Utils.getResponse(); String result = "{success: true,desc: '操作成功',currpage: 1, totalpages:1, totalrecords:7,rows: [{ id: '648c6cd6065d47c587b1378697513094', moldName: 'test sjj辽宁精选书香阅读包9月续订', createUser: '******', createDate: '2013-09-09 11:31:53', moldDesc: '提取辽宁精选书香阅读包续订用户清单', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: '691eca35607b431993c8f5b546f6bca5', moldName: 'ebtest212', createUser: '******', createDate: '2013-08-14 22:43:26', moldDesc: 'ebtest', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: 'c75752b0dd0c4e299b3f3e738b0ea8d4', moldName: '测试模板功能', createUser: '******', createDate: '2013-08-14 22:43:01', moldDesc: '测试', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: 'be9c615d1be647b88235dadb2b96e2d0', moldName: 'test8390提取苏州地区6月份付费用户明细', createUser: '******', createDate: '2013-08-14 14:08:11', moldDesc: '提取分地市付费用户明细', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: '57b80905ca08492f8608920f7b319c45', moldName: 'test8412提取6月份江苏地区高价值用户清单sjj', createUser: '******', createDate: '2013-08-14 14:04:58', moldDesc: '适用于提取地市高价值用户明细', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: 'eef58b9a3a9d47bab90954b2352a08ac', moldName: 'test包月类指标体系sjj', createUser: '******', createDate: '2013-08-08 12:47:09', moldDesc: '应用范围:省份一线运营及精细化营销人员; 可以按照包月产品ID或者产品名称进行批量用户查询', taskStatus: '待审核', taskType: 'A', func: '11' }, { id: '46860f929bce4949b98aecc98c1c6084', moldName: 'test活动专区类sjj', createUser: '******', createDate: '2013-08-08 12:41:58', moldDesc: '应用范围:省份一线运营及精细化营销人员; 可以根据活动页面-节点ID来提取用户', taskStatus: '待审核', taskType: 'A', func: '11' }]}"; return writerMessageToClient(response, result); }
public void modify() { HttpServletRequest request = Struts2Utils.getRequest(); HttpServletResponse response = Struts2Utils.getResponse(); HttpSession session = Struts2Utils.getSession(); StringBuilder result = new StringBuilder(); String taskId = getQueryParameter(request, "moldId"); logger.info("Action 查看取数模板详细信息 taskId = " + taskId); ExtractMold obj = new ExtractMold(); if (StringUtils.isBlank(taskId)) { result.append("{success : false , desc:'查看模板失败!moldId不能为空!'}"); } else { obj = mouldService.getExtractTask(taskId); result.append("{success : true , desc:'模板信息获取成功'}"); } List<LabelValue> operateList = operators(); List<LabelValue> clusterOperateList = getClusterOperatorList(); request.setAttribute("allOperators", operateList); request.setAttribute("allClusterOpt", clusterOperateList); System.out.println("!!!!!!result=" + result); session.setAttribute("moldData", obj); }