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

📄 getinterfacemgr.java

📁 java阿里巴巴代码
💻 JAVA
字号:
/*
 * Created on 2006-6-28
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.ahbay.interfaceMgr;

import com.ahbay.mysite.*;
import java.text.*;
import java.util.*;
import java.sql.*;
import java.io.*;
import com.ahbay.commenMgr.*;
import org.apache.struts.upload.FormFile;
/**
 * @author: Wangrc
 * @Date: 2006-6-28 15:02:58
 * @Method Name: 
 */
public class getInterfaceMgr
{
	public getInterfaceMgr(){}
	InterfDataBaseCommMgr DBQuery = new InterfDataBaseCommMgr();
	
	public ArrayList getQueryPage(String user_id,String getType)  
	{
		ArrayList outList = new ArrayList();
		if (getType.equals("0"))
		{
		    outList = this.getYpPage();     //黄页信息
		}
		else if (getType.equals("1"))
		{
		    outList = this.getGyPage();     //供应信息
		}
		else if (getType.equals("2"))
		{
		    outList = this.getQgPage();     //求购信息
		}
		else if (getType.equals("3"))
		{
		    outList = this.getPricePage(); //价格信息
		}
		//1:政策法规;2:行业新闻;3:技术;4:通知;5:招标;6:预测分析;7:社会新闻;8:社区监控
		else if (getType.equals("4"))
		{
		    outList = this.getInfoPage(); //资讯信息
		}
		else if (getType.equals("5"))
		{
		    outList = this.getInfoPageByType("1"); //资讯信息1:政策法规
		}
		else if (getType.equals("6"))
		{
		    outList = this.getInfoPageByType("2"); //资讯信息2:行业新闻
		}
		else if (getType.equals("7"))
		{
		    outList = this.getInfoPageByType("3"); //资讯信息3:技术
		}
		else if (getType.equals("8"))
		{
		    outList = this.getInfoPageByType("4"); //资讯信息4:通知
		}
		else if (getType.equals("9"))
		{
		    outList = this.getInfoPageByType("5"); //资讯信息5:招标
		}
		else if (getType.equals("10"))
		{
		    outList = this.getInfoPageByType("6"); //资讯信息6:预测分析
		}
		else if (getType.equals("11"))
		{
		    outList = this.getInfoPageByType("7"); //资讯信息7:社会新闻
		}
		else if (getType.equals("12"))
		{
		    outList = this.getInfoPageByType("8"); //资讯信息8:社区监控
		}
        return outList;
	}
	public ArrayList getYpPage()  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agriyp order by xtime desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String id = "";
                if (map.get("factory") != null)
                {
                    tittle=map.get("factory").toString();
                    if (tittle.length()>45) tittle=tittle.substring(0,45);
                    id=map.get("id").toString();
                }       
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href=http://news.xsaas.com/showyp.jsp?id="+id+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	} 
	public ArrayList getGyPage()  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agriinfo where xtype='2' order by exdate desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String id = "";
                if (map.get("title") != null)
                {
                    tittle=map.get("title").toString();
                    if (tittle.length()>20) tittle=tittle.substring(0,20);
                    id=map.get("id").toString();
                }       
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href=http://news.xsaas.com/showgq.jsp?id="+id+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	} 
	public ArrayList getQgPage()  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agriinfo where xtype='3' order by exdate desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String id = "";
                if (map.get("title") != null)
                {
                    tittle=map.get("title").toString();
                    if (tittle.length()>20) tittle=tittle.substring(0,20);
                    id=map.get("id").toString();
                }       
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href=http://news.xsaas.com/showgq.jsp?id="+id+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	}
	public ArrayList getInfoPage()  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agrinews order by exdate desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String id = "";
                if (map.get("title") != null)
                {
                    tittle=map.get("title").toString();
                    if (tittle.length()>20) tittle=tittle.substring(0,20);
                    id=map.get("id").toString();
                }       
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href=http://news.xsaas.com/showxw.jsp?id="+id+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	}
    public ArrayList getInfoPageByType(String type)  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agrinews where xtype="+type+" order by exdate desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String id = "";
                if (map.get("title") != null)
                {
                    tittle=map.get("title").toString();
                    if (tittle.length()>20) tittle=tittle.substring(0,20);
                    id=map.get("id").toString();
                }       
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href=http://news.xsaas.com/showxw.jsp?id="+id+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	}
	public ArrayList getPricePage()  
	{
	    ArrayList strResult = new ArrayList();
		ArrayList outList = new ArrayList();
		String sql = "";
		sql = "select * from agriprice order by exdate desc limit 30";		
		DBQuery.setStrQuery(sql);
		strResult = DBQuery.SelBizQuery();
		if (strResult != null && strResult.size()>0)
        {   
            for (Iterator inIt = strResult.iterator(); inIt.hasNext();)
    	    {
    		    HashMap map = (HashMap) inIt.next();
    		    HashMap outmap = new HashMap();
                String tittle = "";
                String price = "";
                String url = "";
                String id = "00";
                String etdate = "";
                String marketplace = "";
                if (map.get("title") != null)
                {
                    tittle=map.get("title").toString();
                }
                
                if (map.get("midprice") != null)
                {
                    price=map.get("midprice").toString();                   
                }
                if (map.get("xurl") != null)
                {
                    url=map.get("xurl").toString();
                }
                if (map.get("etdate") != null)
                {
                    etdate=map.get("etdate").toString();
                }
                if (map.get("marketplace") != null)
                {
                    marketplace=map.get("marketplace").toString();
                }       
                tittle = "["+marketplace+"]"+ tittle + "["+price+"元]"+"-["+etdate+"]";
                outmap.put("tittle", tittle);     
                outmap.put("id", id);
                outmap.put("ulr", "<a href="+url+" target=_blank>"+tittle+"</a>");          
                outList.add(outmap);
            }
         }		
		 return outList;
	}  
}

⌨️ 快捷键说明

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