空間查詢及屬性文本查詢的代碼 整理中。。。

Java代碼
  1. package com.esri.adf.web;   
  2.   
  3. import java.rmi.RemoteException;   
  4. import java.util.Collection;   
  5. import java.util.List;   
  6. import java.util.Map;   
  7. import com.esri.adf.web.ags.data.AGSLocalMapResource;   
  8. import com.esri.adf.web.ags.data.AGSMapResource;   
  9. import com.esri.adf.web.data.WebContext;   
  10. import com.esri.adf.web.data.geometry.WebExtent;   
  11. import com.esri.adf.web.data.query.IdentifyCriteria;   
  12. import com.esri.adf.web.data.query.QueryResult;   
  13. import com.esri.adf.web.data.query.TextCriteria;   
  14. import com.esri.adf.web.data.query.WebQuery;   
  15. import com.esri.adf.web.faces.event.MapEvent;   
  16. import com.esri.adf.web.faces.event.MapToolAction;   
  17. import com.esri.arcgis.carto.IFeatureLayer;   
  18. import com.esri.arcgis.carto.IFeatureSelection;   
  19. import com.esri.arcgis.carto.IMap;   
  20. import com.esri.arcgis.carto.IMapServer;   
  21. import com.esri.arcgis.carto.IMapServerObjects;   
  22. import com.esri.arcgis.carto.esriSelectionResultEnum;   
  23. import com.esri.arcgis.geodatabase.Field;   
  24. import com.esri.arcgis.geodatabase.ICursor;   
  25. import com.esri.arcgis.geodatabase.IField;   
  26. import com.esri.arcgis.geodatabase.IFields;   
  27. import com.esri.arcgis.geodatabase.IRecordSet;   
  28. import com.esri.arcgis.geodatabase.IRow;   
  29. import com.esri.arcgis.geodatabase.ISelectionSet;   
  30. import com.esri.arcgis.geodatabase.SpatialFilter;   
  31. import com.esri.arcgis.geodatabase.esriSpatialRelEnum;   
  32. import com.esri.arcgis.geometry.Envelope;   
  33. import com.esri.arcgis.server.IServerContext;   
  34. import com.esri.arcgisws.EnvelopeN;   
  35. import com.esri.arcgisws.EsriSearchOrder;   
  36. import com.esri.arcgisws.EsriSpatialRelEnum;   
  37. import com.esri.arcgisws.MapServerPort;   
  38. import com.esri.arcgisws.Record;   
  39. import com.esri.arcgisws.RecordSet;   
  40.   
  41. public class ADFQuery implements MapToolAction {   
  42.        
  43.     private static final long serialVersionUID = 713600076584099585L;   
  44.     WebContext context = null;   
  45.     int c = 0;   
  46.   
  47.     /*  
  48.      * WebQuery  
  49.      */  
  50.     private void test1(WebExtent extent) {   
  51.         AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");   
  52.         IdentifyCriteria ic = new IdentifyCriteria(extent);   
  53.         WebQuery query = (WebQuery) context.getAttribute("query");   
  54.         List layer = context.getWebQuery().getQueryLayers();   
  55.         List results = query.query(ic, layer);   
  56.         for (int i = 0; i < results.size(); i++) {   
  57.             QueryResult result = (QueryResult) results.get(i);   
  58.   
  59.             result.highlight();   
  60.             Map map = result.getDetails();   
  61.             map.size();   
  62.             Collection col = map.values();   
  63.             Object[] obj = col.toArray();   
  64.             for (int j = 0; j < obj.length; j++) {   
  65.                 System.out.println(obj[j]);   
  66.             }   
  67.         }   
  68.     }   
  69.   
  70.     /*  
  71.      * arcgisws.SpatialFilter  
  72.      */  
  73.     private void test2(WebExtent extent) {   
  74.         AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");   
  75.         MapServerPort mapServer = res.getMapServer();   
  76.         EnvelopeN env = new EnvelopeN(extent.getMinX(), extent.getMinY(),   
  77.                 extent.getMaxX(), extent.getMaxY(), nullnullnullnull,   
  78.                 null);   
  79.         com.esri.arcgisws.SpatialFilter filter = new com.esri.arcgisws.SpatialFilter();   
  80.         filter.setSpatialRel(EsriSpatialRelEnum.esriSpatialRelIntersects);   
  81.         filter.setWhereClause("");   
  82.         filter.setSearchOrder(EsriSearchOrder.esriSearchOrderSpatial);   
  83.         filter.setSpatialRelDescription("");   
  84.         filter.setGeometryFieldName("");   
  85.         filter.setFilterGeometry(env);   
  86.         int layerId = 1;   
  87.         try {   
  88.             RecordSet rs = mapServer.queryFeatureData(mapServer.getDefaultMapName(), layerId, filter);   
  89.             Record[] rd = rs.getRecords();   
  90.             for (int i = 0; i < rd.length; i++) {   
  91.                 Object[] obj = rd[i].getValues();   
  92.                 for (int j = 0; j < obj.length; j++) {   
  93.                     String s = obj[j].toString();   
  94.                 }   
  95.             }   
  96.         } catch (RemoteException e) {   
  97.             e.printStackTrace();   
  98.         }   
  99.     }   
  100.   
  101.     /*  
  102.      * geodatabase.SpatialFilter  
  103.      */  
  104.     private void test3(WebExtent extent){   
  105.         try {   
  106.             AGSLocalMapResource res = (AGSLocalMapResource) context.getResources().get("ags0");   
  107.             IMapServer mapServer = res.getLocalMapServer();   
  108.             IServerContext sc = res.getServerContext();   
  109.             Envelope env = (Envelope) sc.createObject(Envelope.getClsid());   
  110.             env.putCoords(extent.getMinX(), extent.getMinY(), extent.getMaxX(),   
  111.                     extent.getMaxY());   
  112.             com.esri.arcgis.geodatabase.SpatialFilter filter = (SpatialFilter) sc   
  113.                     .createObject(com.esri.arcgis.geodatabase.SpatialFilter   
  114.                             .getClsid());   
  115.             filter.setGeometryByRef(env);   
  116.             filter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelIndexIntersects);   
  117.             System.out.println("---1--- ");   
  118.             int layerId = 1;   
  119.             IRecordSet rs = mapServer.queryFeatureData(mapServer.getDefaultMapName(), layerId, filter);   
  120.             IFields fds = rs.getFields();   
  121.             System.out.println("---cnt2--- " + fds.getFieldCount());   
  122.             for (int i = 0; i < fds.getFieldCount(); i++) {   
  123.                 IField fd = (Field) fds.getField(i);   
  124.                 System.out.println(fd.getName());   
  125.             }   
  126.             ICursor cursor = rs.getCursor(true);   
  127.             IRow row = cursor.nextRow();   
  128.             while (row != null) {   
  129.                 System.out.println("------ " + row.getValue(4));   
  130.                 row = cursor.nextRow();   
  131.             }   
  132.         } catch (Exception e) {   
  133.             e.printStackTrace();   
  134.         }   
  135.     }   
  136.   
  137.     /*  
  138.      * IFeatureSelection  
  139.      */  
  140.     private void test4(WebExtent extent){   
  141.         AGSLocalMapResource res = (AGSLocalMapResource) context.getResources().get("ags0");   
  142.         IServerContext sc = res.getServerContext();   
  143.         IMapServerObjects mso = (IMapServerObjects) res.getLocalMapServer();   
  144.         IMap map;   
  145.         try {   
  146.             map = mso.getMap(res.getLocalMapServer().getDefaultMapName());   
  147.             IFeatureLayer fl = (IFeatureLayer) map.getLayer(1);   
  148.             Envelope env = (Envelope) sc.createObject(Envelope.getClsid());   
  149.             env.putCoords(extent.getMinX(), extent.getMinY(), extent.getMaxX(),   
  150.                     extent.getMaxY());   
  151.             com.esri.arcgis.geodatabase.SpatialFilter filter = (SpatialFilter) sc   
  152.                     .createObject(com.esri.arcgis.geodatabase.SpatialFilter   
  153.                             .getClsid());   
  154.             filter.setGeometryByRef(env);   
  155.             filter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelIndexIntersects);   
  156.   
  157.             IFeatureSelection fs = (IFeatureSelection) fl;   
  158.             fs.selectFeatures(filter,esriSelectionResultEnum.esriSelectionResultNew, false);   
  159.             ISelectionSet ss = fs.getSelectionSet();   
  160.         } catch (Exception e) {   
  161.             e.printStackTrace();   
  162.         }   
  163.     }   
  164.   
  165.     /*  
  166.      * TextCriteria  
  167.      */  
  168.     private void test5() {   
  169.         AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");   
  170.         TextCriteria tc = new TextCriteria();   
  171.         tc.setSearchText("北京市");   
  172.         WebQuery query = (WebQuery) context.getAttribute("query");   
  173.         List layer = context.getWebQuery().getQueryLayers();   
  174.         List results = query.query(tc, layer);   
  175.         for (int i = 0; i < results.size(); i++) {   
  176.             QueryResult result = (QueryResult) results.get(i);   
  177.             result.highlight();   
  178.             Map map = result.getDetails();   
  179.             map.size();   
  180.             Collection col = map.values();   
  181.             Object[] obj = col.toArray();   
  182.             for (int j = 0; j < obj.length; j++) {   
  183.                 System.out.println(obj[j]);   
  184.             }   
  185.         }   
  186.     }   
  187.   
  188.     public void execute(MapEvent arg0) throws Exception {   
  189.         context = arg0.getWebContext();   
  190.         WebExtent ex = (WebExtent) arg0.getWebGeometry();   
  191.         ex = (WebExtent) ex.toMapGeometry(arg0.getWebContext().getWebMap());   
  192.         test5();   
  193.         System.out.println("---ok---");   
  194.     }   
  195.        
  196. }  
package com.esri.adf.web;

import java.rmi.RemoteException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.esri.adf.web.ags.data.AGSLocalMapResource;
import com.esri.adf.web.ags.data.AGSMapResource;
import com.esri.adf.web.data.WebContext;
import com.esri.adf.web.data.geometry.WebExtent;
import com.esri.adf.web.data.query.IdentifyCriteria;
import com.esri.adf.web.data.query.QueryResult;
import com.esri.adf.web.data.query.TextCriteria;
import com.esri.adf.web.data.query.WebQuery;
import com.esri.adf.web.faces.event.MapEvent;
import com.esri.adf.web.faces.event.MapToolAction;
import com.esri.arcgis.carto.IFeatureLayer;
import com.esri.arcgis.carto.IFeatureSelection;
import com.esri.arcgis.carto.IMap;
import com.esri.arcgis.carto.IMapServer;
import com.esri.arcgis.carto.IMapServerObjects;
import com.esri.arcgis.carto.esriSelectionResultEnum;
import com.esri.arcgis.geodatabase.Field;
import com.esri.arcgis.geodatabase.ICursor;
import com.esri.arcgis.geodatabase.IField;
import com.esri.arcgis.geodatabase.IFields;
import com.esri.arcgis.geodatabase.IRecordSet;
import com.esri.arcgis.geodatabase.IRow;
import com.esri.arcgis.geodatabase.ISelectionSet;
import com.esri.arcgis.geodatabase.SpatialFilter;
import com.esri.arcgis.geodatabase.esriSpatialRelEnum;
import com.esri.arcgis.geometry.Envelope;
import com.esri.arcgis.server.IServerContext;
import com.esri.arcgisws.EnvelopeN;
import com.esri.arcgisws.EsriSearchOrder;
import com.esri.arcgisws.EsriSpatialRelEnum;
import com.esri.arcgisws.MapServerPort;
import com.esri.arcgisws.Record;
import com.esri.arcgisws.RecordSet;

public class ADFQuery implements MapToolAction {
	
	private static final long serialVersionUID = 713600076584099585L;
	WebContext context = null;
	int c = 0;

	/*
	 * WebQuery
	 */
	private void test1(WebExtent extent) {
		AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");
		IdentifyCriteria ic = new IdentifyCriteria(extent);
		WebQuery query = (WebQuery) context.getAttribute("query");
		List layer = context.getWebQuery().getQueryLayers();
		List results = query.query(ic, layer);
		for (int i = 0; i < results.size(); i++) {
			QueryResult result = (QueryResult) results.get(i);

			result.highlight();
			Map map = result.getDetails();
			map.size();
			Collection col = map.values();
			Object[] obj = col.toArray();
			for (int j = 0; j < obj.length; j++) {
				System.out.println(obj[j]);
			}
		}
	}

	/*
	 * arcgisws.SpatialFilter
	 */
	private void test2(WebExtent extent) {
		AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");
		MapServerPort mapServer = res.getMapServer();
		EnvelopeN env = new EnvelopeN(extent.getMinX(), extent.getMinY(),
				extent.getMaxX(), extent.getMaxY(), null, null, null, null,
				null);
		com.esri.arcgisws.SpatialFilter filter = new com.esri.arcgisws.SpatialFilter();
		filter.setSpatialRel(EsriSpatialRelEnum.esriSpatialRelIntersects);
		filter.setWhereClause("");
		filter.setSearchOrder(EsriSearchOrder.esriSearchOrderSpatial);
		filter.setSpatialRelDescription("");
		filter.setGeometryFieldName("");
		filter.setFilterGeometry(env);
		int layerId = 1;
		try {
			RecordSet rs = mapServer.queryFeatureData(mapServer.getDefaultMapName(), layerId, filter);
			Record[] rd = rs.getRecords();
			for (int i = 0; i < rd.length; i++) {
				Object[] obj = rd[i].getValues();
				for (int j = 0; j < obj.length; j++) {
					String s = obj[j].toString();
				}
			}
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	/*
	 * geodatabase.SpatialFilter
	 */
	private void test3(WebExtent extent){
		try {
			AGSLocalMapResource res = (AGSLocalMapResource) context.getResources().get("ags0");
			IMapServer mapServer = res.getLocalMapServer();
			IServerContext sc = res.getServerContext();
			Envelope env = (Envelope) sc.createObject(Envelope.getClsid());
			env.putCoords(extent.getMinX(), extent.getMinY(), extent.getMaxX(),
					extent.getMaxY());
			com.esri.arcgis.geodatabase.SpatialFilter filter = (SpatialFilter) sc
					.createObject(com.esri.arcgis.geodatabase.SpatialFilter
							.getClsid());
			filter.setGeometryByRef(env);
			filter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelIndexIntersects);
			System.out.println("---1--- ");
			int layerId = 1;
			IRecordSet rs = mapServer.queryFeatureData(mapServer.getDefaultMapName(), layerId, filter);
			IFields fds = rs.getFields();
			System.out.println("---cnt2--- " + fds.getFieldCount());
			for (int i = 0; i < fds.getFieldCount(); i++) {
				IField fd = (Field) fds.getField(i);
				System.out.println(fd.getName());
			}
			ICursor cursor = rs.getCursor(true);
			IRow row = cursor.nextRow();
			while (row != null) {
				System.out.println("------ " + row.getValue(4));
				row = cursor.nextRow();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/*
	 * IFeatureSelection
	 */
	private void test4(WebExtent extent){
		AGSLocalMapResource res = (AGSLocalMapResource) context.getResources().get("ags0");
		IServerContext sc = res.getServerContext();
		IMapServerObjects mso = (IMapServerObjects) res.getLocalMapServer();
		IMap map;
		try {
			map = mso.getMap(res.getLocalMapServer().getDefaultMapName());
			IFeatureLayer fl = (IFeatureLayer) map.getLayer(1);
			Envelope env = (Envelope) sc.createObject(Envelope.getClsid());
			env.putCoords(extent.getMinX(), extent.getMinY(), extent.getMaxX(),
					extent.getMaxY());
			com.esri.arcgis.geodatabase.SpatialFilter filter = (SpatialFilter) sc
					.createObject(com.esri.arcgis.geodatabase.SpatialFilter
							.getClsid());
			filter.setGeometryByRef(env);
			filter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelIndexIntersects);

			IFeatureSelection fs = (IFeatureSelection) fl;
			fs.selectFeatures(filter,esriSelectionResultEnum.esriSelectionResultNew, false);
			ISelectionSet ss = fs.getSelectionSet();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/*
	 * TextCriteria
	 */
	private void test5() {
		AGSMapResource res = (AGSMapResource) context.getResources().get("ags0");
		TextCriteria tc = new TextCriteria();
		tc.setSearchText("北京市");
		WebQuery query = (WebQuery) context.getAttribute("query");
		List layer = context.getWebQuery().getQueryLayers();
		List results = query.query(tc, layer);
		for (int i = 0; i < results.size(); i++) {
			QueryResult result = (QueryResult) results.get(i);
			result.highlight();
			Map map = result.getDetails();
			map.size();
			Collection col = map.values();
			Object[] obj = col.toArray();
			for (int j = 0; j < obj.length; j++) {
				System.out.println(obj[j]);
			}
		}
	}

	public void execute(MapEvent arg0) throws Exception {
		context = arg0.getWebContext();
		WebExtent ex = (WebExtent) arg0.getWebGeometry();
		ex = (WebExtent) ex.toMapGeometry(arg0.getWebContext().getWebMap());
		test5();
		System.out.println("---ok---");
	}
	
}


內容摘要
使用ArcGIS Server java ADF開發,如果需要空間關係查詢,可以有兩種辦法,
一種是通過com.esri.arcgisws.SpatialFilter這個包來實現,是一種SOAP的方式,
另外一種是使用傳統的AO的方式實現:com.esri.arcgis.geodatabase.SpatialFilter注意兩個包的命名一樣,很容易混淆。
過程描述
第一種方式的代碼如下:
 

Java代碼
  1. SpatialFilter filter = new SpatialFilter();    
  2.   String mapName=functionality.getMapDescription().getName();   
  3.      
  4.   this.getWebContext().getWebGraphics().clearGraphics();   
  5.   WebPoint wPoint=(WebPoint)event.getWebGeometry().toMapGeometry(event.getWebContext().getWebMap());   
  6.      
  7.      
  8.    Geometry geom = AGSUtil.toAGSGeometry(wPoint);   
  9.    com.esri.arcgisws.PointN pontN = (com.esri.arcgisws.PointN)geom;   
  10.    Point aoPont = (Point)AGSUtil.createArcObjectFromStub(pontN, serverContext);   
  11.       
  12.    filter.setFilterGeometry(geom);    
  13.    filter.setSpatialRel(com.esri.arcgisws.EsriSpatialRelEnum.esriSpatialRelRelation);    
  14.    filter.setWhereClause("");    
  15.    filter.setSearchOrder(com.esri.arcgisws.EsriSearchOrder.esriSearchOrderSpatial);    
  16.    filter.setGeometryFieldName("");    
  17.    filter.setSpatialReferenceFieldName("");    
  18.    filter.setSpatialRelDescription(spatialType);    
  19.       
  20.    MapLayerInfo layerInfos[] = functionality.getLayerInfos();    
  21.    for(int layerIndex=0;layerIndex<layerInfos.length;layerIndex++){   
  22.     MapLayerInfo mapLayerInfo = (MapLayerInfo) layerInfos[layerIndex];    
  23.     Field[] fields=mapLayerInfo.getFields().getFieldArray();   
  24.     RecordSet recordSet = mapServer.queryFeatureData(mapName, layerIndex, filter);    
  25.     ...   
  26.     }  
SpatialFilter filter = new SpatialFilter(); 
  String mapName=functionality.getMapDescription().getName();
  
  this.getWebContext().getWebGraphics().clearGraphics();
  WebPoint wPoint=(WebPoint)event.getWebGeometry().toMapGeometry(event.getWebContext().getWebMap());
  
  
   Geometry geom = AGSUtil.toAGSGeometry(wPoint);
   com.esri.arcgisws.PointN pontN = (com.esri.arcgisws.PointN)geom;
   Point aoPont = (Point)AGSUtil.createArcObjectFromStub(pontN, serverContext);
   
   filter.setFilterGeometry(geom); 
   filter.setSpatialRel(com.esri.arcgisws.EsriSpatialRelEnum.esriSpatialRelRelation); 
   filter.setWhereClause(""); 
   filter.setSearchOrder(com.esri.arcgisws.EsriSearchOrder.esriSearchOrderSpatial); 
   filter.setGeometryFieldName(""); 
   filter.setSpatialReferenceFieldName(""); 
   filter.setSpatialRelDescription(spatialType); 
   
   MapLayerInfo layerInfos[] = functionality.getLayerInfos(); 
   for(int layerIndex=0;layerIndex<layerInfos.length;layerIndex++){
    MapLayerInfo mapLayerInfo = (MapLayerInfo) layerInfos[layerIndex]; 
    Field[] fields=mapLayerInfo.getFields().getFieldArray();
    RecordSet recordSet = mapServer.queryFeatureData(mapName, layerIndex, filter); 
    ...
    }


第二種方式代碼如下:

 

Java代碼
  1. SpatialFilter spatialFilter= (SpatialFilter)serverContext.createObject(SpatialFilter.getClsid());   
  2.      
  3.   WebPolygon wPgon=(WebPolygon)event.getWebGeometry().toMapGeometry(event.getWebContext().getWebMap());   
  4.   GraphicElement ge = new GraphicElement();   
  5.   ge.setGeometry(wPgon);   
  6.    ge.setSymbol(this.getWebContext().getWebQuery().getPolygonGraphicSymbol());   
  7.    this.getWebContext().getWebGraphics().addGraphics(ge);   
  8.      
  9.    Geometry geom = AGSUtil.toAGSGeometry(wPgon);   
  10.    com.esri.arcgisws.PolygonN pgonN = (com.esri.arcgisws.PolygonN)geom;   
  11.    Polygon aoPgon = (Polygon)AGSUtil.createArcObjectFromStub(pgonN, serverContext);   
  12.       
  13.    for(int layerIndex=0;layerIndex<pMap.getLayerCount();layerIndex++){   
  14.     ILayer layer=pMap.getLayer(layerIndex);   
  15.     FeatureLayer featureLayer=(FeatureLayer)layer;   
  16.     IFeatureClass featureClass=featureLayer.getFeatureClass();   
  17.     spatialFilter.setGeometryByRef(aoPgon);   
  18.     spatialFilter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelWithin);   
  19.     spatialFilter.setGeometryField(featureClass.getShapeFieldName());   
  20.     IFeatureCursor featureCursor = featureClass.search(spatialFilter, true);   
  21.     IFeature feature = featureCursor.nextFeature();   
  22.     ...   
  23.     }  
SpatialFilter spatialFilter= (SpatialFilter)serverContext.createObject(SpatialFilter.getClsid());
  
  WebPolygon wPgon=(WebPolygon)event.getWebGeometry().toMapGeometry(event.getWebContext().getWebMap());
  GraphicElement ge = new GraphicElement();
  ge.setGeometry(wPgon);
   ge.setSymbol(this.getWebContext().getWebQuery().getPolygonGraphicSymbol());
   this.getWebContext().getWebGraphics().addGraphics(ge);
  
   Geometry geom = AGSUtil.toAGSGeometry(wPgon);
   com.esri.arcgisws.PolygonN pgonN = (com.esri.arcgisws.PolygonN)geom;
   Polygon aoPgon = (Polygon)AGSUtil.createArcObjectFromStub(pgonN, serverContext);
   
   for(int layerIndex=0;layerIndex<pMap.getLayerCount();layerIndex++){
    ILayer layer=pMap.getLayer(layerIndex);
    FeatureLayer featureLayer=(FeatureLayer)layer;
    IFeatureClass featureClass=featureLayer.getFeatureClass();
    spatialFilter.setGeometryByRef(aoPgon);
    spatialFilter.setSpatialRel(esriSpatialRelEnum.esriSpatialRelWithin);
    spatialFilter.setGeometryField(featureClass.getShapeFieldName());
    IFeatureCursor featureCursor = featureClass.search(spatialFilter, true);
    IFeature feature = featureCursor.nextFeature();
    ...
    }


在一般的情況下,建議使用第一種方式空間查詢




 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章