com.frameworkset.platform.util.Message Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdp-system Show documentation
Show all versions of pdp-system Show documentation
bboss public development platform base on bboss.
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