⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manually_send.jsp

📁 精饲料单放机快速地翻看联赛积分 精饲料单放机快速地翻看联赛积
💻 JSP
字号:

<jsp:directive.page import="com.easycolony.CommonUtil"/>
<jsp:directive.page import="com.easycolony.SpringUtil"/>
<jsp:directive.page import="com.easycolony.QueueDao"/><%@	include file="../tags.jsp"%>

 <%
    
	String filter = request.getParameter("filter");
	
	String message = request.getParameter("message");
	message = CommonUtil.base64Decode(message,"utf-8");
	
	String sql = "";
	String sqlPrefix = "select mobile from t_members_data where status=2 ";
	String sqlFilter = "";
	if(filter!=null && !"".equals(filter)){
		filter = CommonUtil.base64Decode(request.getParameter("filter"),"utf-8");
		String [] conditions = filter.split("#####");
		
		
		for(int i=0;i< conditions.length; i++) {
			String [] conditionSection = conditions[i].split(":::::");
			String fieldName = conditionSection[0];
			String fieldMatchValue = CommonUtil.base64Decode(conditionSection[1],"utf-8");
			String fieldMatchOperator = conditionSection[2];
			String sqlSect = "";
			
			
			if(fieldMatchOperator.equals("deq")){
				sqlSect =  fieldName + "='" +fieldMatchValue.replaceAll("'","''")+"'";
			}
			else if(fieldMatchOperator.equals("dgt")){
				sqlSect = fieldName + ">'" +fieldMatchValue.replaceAll("'","''")+"'";
			}
			else if(fieldMatchOperator.equals("dlt")){
				sqlSect = fieldName + "<'" +fieldMatchValue.replaceAll("'","''")+"'";
			}
			else if(fieldMatchOperator.equals("neq")){
				sqlSect = fieldName + "=" +fieldMatchValue.replaceAll("'","''");
			}
			else if(fieldMatchOperator.equals("ngt")){
				sqlSect = fieldName + ">" +fieldMatchValue.replaceAll("'","''");
			}
			else if(fieldMatchOperator.equals("nlt")){
				sqlSect = fieldName + "<" +fieldMatchValue.replaceAll("'","''");
			}
			else if(fieldMatchOperator.equals("teq")){
				sqlSect = fieldName + "='" +fieldMatchValue.replaceAll("'","''")+"'";
			}
			else if(fieldMatchOperator.equals("tlike")){
				sqlSect = fieldName + " like '%" +fieldMatchValue.replaceAll("'","''")+"%'";
			}
			
			if(!sqlSect.equals("")){
				sqlFilter += " and "+ sqlSect;
			}
		}		
	}

	sql = sqlPrefix + sqlFilter;
	
	pageContext.setAttribute("sql",sql);
 %>

<sql:query var="rs" scope="page" sql="${pageScope.sql }"></sql:query>

<%
StringBuffer mobileNumbers=new StringBuffer();
javax.servlet.jsp.jstl.sql.Result mobiles = (javax.servlet.jsp.jstl.sql.Result)
										pageContext.getAttribute("rs");

java.util.Map [] rows = mobiles.getRows();

QueueDao queueDao = (QueueDao)SpringUtil.getBean(request,"queueDao");


int rowCount = mobiles.getRowCount();
int counter = 0;
for(int j=0;j<rowCount;j++){
	java.util.Map row = rows[j];
	counter ++;
	if((rowCount-j)==1 || counter == QueueDao.MAX_BATCH_PHONE_NUMBERS){
		mobileNumbers.append((String)row.get("mobile"));
		queueDao.addMessageToQueue(mobileNumbers.toString(),message);
		mobileNumbers = new StringBuffer();
		counter = 0;
		
	}else{
		mobileNumbers.append((String)row.get("mobile")).append(";");
	} 
	
}

%>

<root>
<accept>true</accept>
</root>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -