All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frameworkset.platform.util.Message Maven / Gradle / Ivy

There is a newer version: 5.6.4
Show newest version
package com.frameworkset.platform.util;

import java.sql.SQLException;

import org.frameworkset.spi.SPIException;

import com.frameworkset.platform.sysmgrcore.exception.ManagerException;
import com.frameworkset.platform.sysmgrcore.manager.LogManager;
import com.frameworkset.platform.sysmgrcore.manager.SecurityDatabase;
import com.frameworkset.common.poolman.DBUtil;
import com.frameworkset.common.poolman.PreparedDBUtil;




public class Message {	
	public int getPrimaryKey()
	{
		int ret = 1;
		DBUtil db = new DBUtil();
		String sql = "select max(id) as id from sms_boxsending";
		try {
			db.executeSelect("message",sql);
			if(db.size()>0)
			{
				ret = db.getInt(0,0);
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return ret+1;
	}
	/**
	 * 
	 * @param sender
	 * @param receiver
	 * @param content
	 * @param sendtime
	 * @param inserttime
	 * @param retrytimes 0
	 * @param pri 1
	 * @param inpool 0
	 * @param sendmode 1
	 * @return
	 */
	public  boolean sendMsg(String sender,String receiver,String content,String sendtime,String inserttime,int retrytimes,String pri,String inpool,String sendmode)
	{
		boolean ret = false;
		String[] array = receiver.split(",");
		for(int i=0;i0)
			{
				for(int i=0;i0)
			{
				for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy